xxxxxxxxxx
//ffmpeg batch convert ts to mp4 files in a folder inside src folder
for %i in (*.ts) do ffmpeg -i "%i" -c:v libx264 -c:a aac "converted\%i"
xxxxxxxxxx
//On Windows CMD
for %i in (*.ts) do ffmpeg -i "%i" -c:v libx264 -c:a aac "%~ni.mp4"
// for keeping data rate same to get same file size
for %i in (*.ts) do ffmpeg -i "%i" -c:v libx264 -b:v 2M -maxrate 1.4M -bufsize 1M -c:a aac "../%~ni.mp4"
xxxxxxxxxx
// Windows
copy /b segment1_0_av.ts+segment2_0_av.ts+segment3_0_av.ts all.ts
ffmpeg -i all.ts -acodec copy -vcodec copy all.mp4
// GNU/Linux, using bash:
cat segment1_0_av.ts segment2_0_av.ts segment3_0_av.ts > all.ts
ffmpeg -i all.ts -acodec copy -vcodec copy all.mp4
xxxxxxxxxx
ffmpeg -i rtsp://xxx:xxx@192.168.1.57:554/h264Preview_01_main -r 10 -t 60 -vcodec copy -acodec copy -y