[FFmpeg-user] fMP4 generation speed

Ronak ronak2121 at yahoo.com
Fri Jun 22 22:53:33 EEST 2018



> On Jun 20, 2018, at 4:48 PM, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
> 
> 2018-06-20 18:37 GMT+02:00, Ronak <ronak2121-at-yahoo.com at ffmpeg.org>:
> 
>> That command took the following time:
>> 
>> real	3m19.316s
>> user	3m14.730s
>> sys	0m1.830s
>> 
>> I'm curious about your thoughts on this. With -codec copy, the decoder
>> should not be involved, so it shouldn't be a bottleneck.
> 
> Yes.
> 
>> I'm wondering if the extra file I/O is the culprit here?
> 
> Yes.
> 
> You can now specify "-loglevel verbose" to get some useful
> I/O info at the end of the console output.
> 
> Please remember not to top-post here, Carl Eugen


Hi Carl,

I got more logs, here's what I got:

[dash @ 0x22c3f80] Opening 'bk_potr_000006_22_64_1sec_test.m4s' for reading
[file @ 0x2382c80] Setting default whitelist 'file,crypto'
[AVIOContext @ 0x23b9140] Statistics: 4236 bytes read, 1 seeks
[dash @ 0x22c3f80] Representation 0 media segment 69894 written to: bk_potr_000006_22_64_1sec_test.m4s
[dash @ 0x22c3f80] Opening 'bk_potr_000006_22_64_1sec_test.mpd.tmp' for writing
[file @ 0x2382c80] Setting default whitelist 'file,crypto'
[AVIOContext @ 0x23b9140] Statistics: 0 seeks, 15 writeouts
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x22be580] stream 0, sample 1467754, dts 68162362630
size=N/A time=18:56:02.36 bitrate=N/A speed=9.37x    
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x22be580] stream 0, sample 1467755, dts 68162409070
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x22be580] stream 0, sample 1467756, dts 68162455510
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x22be580] stream 0, sample 1467757, dts 68162501950
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x22be580] stream 0, sample 1467758, dts 68162548390
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x22be580] stream 0, sample 1467759, dts 68162594830
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x22be580] stream 0, sample 1467760, dts 68162641270
No more output streams to write to, finishing.
[dash @ 0x22c3f80] Opening 'bk_potr_000006_22_64_1sec_test.m4s' for reading
[file @ 0x23540c0] Setting default whitelist 'file,crypto'
[AVIOContext @ 0x23b9140] Statistics: 0 bytes read, 1 seeks
[dash @ 0x22c3f80] Representation 0 media segment 69895 written to: bk_potr_000006_22_64_1sec_test.m4s
[dash @ 0x22c3f80] Opening 'bk_potr_000006_22_64_1sec_test.mpd.tmp' for writing
[file @ 0x2382c80] Setting default whitelist 'file,crypto'
[AVIOContext @ 0x23b9140] Statistics: 0 seeks, 15 writeouts
[AVIOContext @ 0x2310e80] Statistics: 0 seeks, 2107 writeouts
size=N/A time=18:56:02.64 bitrate=N/A speed=9.37x    
video:0kB audio:522488kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (bk_potr_000006_22_64.mp4):
  Input stream #0:0 (audio): 1467761 packets read (535027204 bytes); 
  Total: 1467761 packets (535027204 bytes) demuxed
Output file #0 (bk_potr_000006_22_64_1sec_test.mpd):
  Output stream #0:0 (audio): 1467761 packets muxed (535027204 bytes); 
  Total: 1467761 packets (535027204 bytes) muxed
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x22c72c0] Statistics: 541488832 bytes read, 2 seeks

This file took about 6 hours of clock time to get through on a 4 Core Computer running at 2.4 Ghz with 16 GB of RAM.

Are there any options for parallelization that we can use so the load is spread across the cores? Or does ffmpeg does this already?
If we're strictly I/O bound for this, is it possible to buffer more individual fragments in RAM before we write them out to disk?

Ronak

> _______________________________________________
> 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".



More information about the ffmpeg-user mailing list