[FFmpeg-user] The efficacy of speed up a .ts file
Carl Eugen Hoyos
ceffmpeg at gmail.com
Thu May 11 15:18:25 EEST 2017
2017-05-11 5:04 GMT+02:00 Champion <championch1805 at gmail.com>:
> 1. I use JAVA to call the ffmpeg command, and the command  is too slow,
> I run my code in AWS EC2(c3.xlarge) and input a 6min30sec .mp4 video,
> the process time about 250 sec, do I have some idea to speed up the
> process time?
Only if you show us the tested command line together with the complete,
uncut console output.
> - I change input and output to .ts file,  just cost 1/6 time which
> compare to output .mp4 file,
> but the output quality is down(although they are the same pixel rate
> is this cause by speed up .ts file will lose I frame?
Video quality is never affected by the container format.
Transport streams and mp4 have difference video encoder
defaults though, try to specify the encoder or video format you want.
> - I try to add "-preset ultrafast" , the process time will become about
> 40 sec, but we think this still too slow, do you have some idea to improve
While this is not FFmpeg but x264-related, the answer is probably:
Throw more CPU (or a hardware encoder) on the task.
> 2. When ffmpeg is running, the CPU rate is too high.
> my server(4 core) just run one  command, the CPU rate almost
> how can I optimize the cost?
> - I try to use "-threads 1", the CPU rate down to 90-100%, but the
> process time is slower.
Yes, you can't have the cake and eat it.
The option -threads 1 optimizes both encoding and decoding with
respect to unnecessary overhead but takes of course longer in
More information about the ffmpeg-user