[FFmpeg-user] Difference in ffmpeg command execution time

Vivek Jain vivek.jain at mindtickle.com
Tue Feb 28 09:42:03 EET 2017


Hi Carl,

I tried with benchmark options and varying no of threads but I could not
find differences in execution time on EC2 instance.
They all took almost ~6 minutes.

Command:

ffmpeg -safe 0 -f concat -i /tmp/config.txt -i /tmp/audio.mp3 -y -pix_fmt
yuv444p -shortest -threads $THREADS -benchmark /tmp/out_ffff.mp4


Also, I observe there is a point where the command gets stuck for a
considerable time (log line below). I have a feeling there is something
here...

frame= 3826 fps= 84 q=28.0 size=    2700kB time=00:02:30.68 bitrate=
146.8kbits/s dup=3824 drop=0 speed= 3.3x (threads = 12)

frame= 3826 fps= 85 q=28.0 size=    2708kB time=00:02:31.28 bitrate=
146.7kbits/s dup=3824 drop=0 speed=3.37x (threads = 1)

frame= 3826 fps= 83 q=28.0 size=    2717kB time=00:02:31.08 bitrate=
147.3kbits/s dup=3824 drop=0 speed=3.28x (threads = 2)

frame= 3826 fps= 10 q=28.0 size=    2853kB time=00:02:31.08 bitrate=
154.7kbits/s dup=3824 drop=0 speed=0.408x (threads =2) this time, speed
extremely slow.

frame= 3826 fps= 83 q=28.0 size=    2717kB time=00:02:31.04 bitrate=
147.4kbits/s dup=3824 drop=0 speed=3.27x (threads = 3)

frame= 3826 fps= 83 q=28.0 size=    2712kB time=00:02:31.00 bitrate=
147.1kbits/s dup=3824 drop=0 speed=3.28x (threads = 4)
Logs attached.

I have couple of questions to deep dive here, and may be find an
alternative:

1. Can we determine at points it is stuck or slow, what is it actually
doing? If it's an encoder issue, may be I can try switching to some other
one?
2. Alternatively, is there a way we can create video using images & an
audio in lesser time? My worry is I want to run it over AWS lambda which
can't for more than 5 minutes.
3. Can we somehow maintain state (partial output) of ffmpeg so that it can
be passed in the next call to lambda.

Highly appreciate your help!

On Fri, Feb 24, 2017 at 4:49 PM, Carl Eugen Hoyos <ceffmpeg at gmail.com>
wrote:

> 2017-02-24 8:08 GMT+01:00 Vivek Jain <vivek.jain at mindtickle.com>:
>
> > ffmpeg -safe 0 -f concat -i /tmp/config.txt -i /tmp/audio.mp3 -y -pix_fmt
> > yuv444p -shortest /tmp/out_ffff.mp4
>
> Missing time and / or benchmark option.
> Please also try with -threads 1 and different values for -threads.
>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".




-- 
Thanks,
Vivek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ec2_t3.log
Type: application/octet-stream
Size: 4844 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20170228/3e03fe73/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ec2_t12.log
Type: application/octet-stream
Size: 4853 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20170228/3e03fe73/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ec2_t4.log
Type: application/octet-stream
Size: 4852 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20170228/3e03fe73/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ec2_t1.log
Type: application/octet-stream
Size: 4853 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20170228/3e03fe73/attachment-0003.obj>


More information about the ffmpeg-user mailing list