#!/bin/bash FILE=${1:-0*.ts} cat $(ls -1 ${FILE} | sort -n) | ffmpeg -er 2 -i /dev/stdin -f null /dev/null 2>&1 | tee ffmpeg.log