[FFmpeg-devel] [PATCH 18/24] fftools/ffmpeg: add thread-aware transcode scheduling infrastructure

Michael Niedermayer michael at niedermayer.cc
Sat Nov 4 20:44:09 EET 2023


On Sat, Nov 04, 2023 at 08:56:27AM +0100, Anton Khirnov wrote:
> See the comment block at the top of fftools/ffmpeg_sched.h for more
> details on what this scheduler is for.
> 
> This commit adds the scheduling code itself, along with minimal
> integration with the rest of the program:
> * allocating and freeing the scheduler
> * passing it throughout the call stack in order to register the
>   individual components (demuxers/decoders/filtergraphs/encoders/muxers)
>   with the scheduler
> 
> The scheduler is not actually used as of this commit, so it should not
> result in any change in behavior. That will change in future commits.
> ---
>  fftools/Makefile          |    1 +
>  fftools/ffmpeg.c          |   18 +-
>  fftools/ffmpeg.h          |   24 +-
>  fftools/ffmpeg_dec.c      |   10 +-
>  fftools/ffmpeg_demux.c    |   46 +-
>  fftools/ffmpeg_enc.c      |   13 +-
>  fftools/ffmpeg_filter.c   |   37 +-
>  fftools/ffmpeg_mux.c      |   17 +-
>  fftools/ffmpeg_mux.h      |   11 +
>  fftools/ffmpeg_mux_init.c |   82 +-
>  fftools/ffmpeg_opt.c      |   22 +-
>  fftools/ffmpeg_sched.c    | 2072 +++++++++++++++++++++++++++++++++++++
>  fftools/ffmpeg_sched.h    |  461 +++++++++
>  13 files changed, 2758 insertions(+), 56 deletions(-)
>  create mode 100644 fftools/ffmpeg_sched.c
>  create mode 100644 fftools/ffmpeg_sched.h

Is fate intended to pass for each point in the patchset ?

make -j32 fate-h264-skip-nointra
seems to fail after this

[h264 @ 0x5598133bccc0] non-existing PPS 0 referenced
    Last message repeated 5 times
[h264 @ 0x5598133bccc0] decode_slice_header error
[h264 @ 0x5598133bccc0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x5598133bccc0] decode_slice_header error
[h264 @ 0x5598133bccc0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x5598133bccc0] decode_slice_header error
[h264 @ 0x5598133bccc0] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x5598133bccc0] decode_slice_header error
[h264 @ 0x5598133bccc0] non-existing PPS 0 referenced
    Last message repeated 3 times
[h264 @ 0x5598133bccc0] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 0x5598133bccc0] number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one
[mpegts @ 0x5598133b7080] PES packet size mismatch
[mpegts @ 0x5598133b7080] Packet corrupt (stream = 2, dts = 212088417).
[mpegts @ 0x5598133b7080] PES packet size mismatch
[mpegts @ 0x5598133b7080] Packet corrupt (stream = 1, dts = 212089857).
[mpegts @ 0x5598133b7080] PES packet size mismatch
[mpegts @ 0x5598133b7080] Packet corrupt (stream = 2, dts = 212088417).
[mpegts @ 0x5598133b7080] PES packet size mismatch
[mpegts @ 0x5598133b7080] Packet corrupt (stream = 1, dts = 212089857).
Input #0, mpegts, from 'fatesamples/fate/fate-suite//h264/h264_intra_first-small.ts':
  Duration: 00:00:02.48, start: 2355.577967, bitrate: 4961 kb/s
  Program 41
  Stream #0:0[0x12b5]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn
  Stream #0:1[0x12b4](swe): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 224 kb/s
  Stream #0:2[0x12b2](nor): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 224 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
  Stream #0:1 -> #0:1 (mp2 (native) -> pcm_s16le (native))
[aost#0:1/pcm_s16le @ 0x5598134536c0] Too many packets buffered for output stream 0:1.
[aost#0:1/pcm_s16le @ 0x5598134536c0] Error submitting a packet to the muxer: No space left on deviceError while filtering: No space left on device
[out#0/framecrc @ 0x5598133bedc0] Nothing was written into output file, because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.19 bitrate=   0.0kbits/s speed=68.4x
Conversion failed!
threads=1
tests/Makefile:307: recipe for target 'fate-h264-skip-nointra' failed
make: *** [fate-h264-skip-nointra] Error 228


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship: All citizens are under surveillance, all their steps and
actions recorded, for the politicians to enforce control.
Democracy: All politicians are under surveillance, all their steps and
actions recorded, for the citizens to enforce control.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20231104/09da2e61/attachment.sig>


More information about the ffmpeg-devel mailing list