[FFmpeg-user] How to convert video.ts to video.mp4 efficiently?

Carl Zwanzig cpz at tuunq.com
Tue Apr 13 19:01:34 EEST 2021

On 4/13/2021 8:49 AM, Bo Berglund wrote:
> set COMMAND=ffmpeg -hide_banner -i %INFILE% -vf scale=w=-4:h=%VSIZE% -c:v
> libx264 -preset fast -crf 20 -c:a copy %OUTFILE%

a) you should add " -movflags +faststart" if writing to an mp4 file
b) always post the complete command _and_ it's output without -hide_banner 
c) always use the latest ffmpeg build for testing
(pls read the list FAQ- https://ffmpeg.org/mailing-list-faq.html

> This works but it takes about 10 min to convert one 44 min video and meanwhile
> the PC runs at almost 100% CPU load.

That could be expected, we don't know anything about your PC. Also, some 
steps can use multiple cpu cores and some can't.

> Question:
> Is there a quicker way to just go from ts to mp4 so the file format is OK even
> though the video size remains at 1280x720

Probably not, you're changing the codec so have to decode/encode the file 
and that just takes time & effort.


More information about the ffmpeg-user mailing list