Opened 8 years ago
Last modified 6 years ago
#6418 open defect
ffmpeg QSV doesnt work with live streams
Reported by: | rycius | Owned by: | |
---|---|---|---|
Priority: | important | Component: | undetermined |
Version: | git-master | Keywords: | qsv regression |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
How to reproduce:
% ffmpeg -hwaccel qsv -c:v mpeg2_qsv -i udp://@239.0.1.1:1234 -c:v h264_qsv -b:v 3M -maxrate 3M -look_ahead 0 -c:a copy -f mpegts udp://127.0.0.1:1234 ffmpeg version 3.3.1 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --enable-libmfx --enable-nonfree --enable-ffplay libavutil 55. 58.100 / 55. 58.100 libavcodec 57. 89.100 / 57. 89.100 libavformat 57. 71.100 / 57. 71.100 libavdevice 57. 6.100 / 57. 6.100 libavfilter 6. 82.100 / 6. 82.100 libswscale 4. 6.100 / 4. 6.100 libswresample 2. 7.100 / 2. 7.100 [mpeg2video @ 0x36c6220] Invalid frame dimensions 0x0. Last message repeated 12 times Input #0, mpegts, from 'udp://@239.0.1.1:1234': Duration: N/A, start: 22672.662644, bitrate: 4218 kb/s Program 157 Metadata: service_name : Info tv service_provider: Noname Stream #0:0[0x623]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 4026 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x624]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s (clean effects) Stream mapping: Stream #0:0 -> #0:0 (mpeg2video (mpeg2_qsv) -> h264 (h264_qsv)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x36cd100] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented Too many packets buffered for output stream 0:1. Conversion failed!
If i dump a stream to file:
% ffmpeg -i udp://@239.0.1.1:1234 -map 0 -c copy -f mpegts test_stream.ts ffmpeg version 3.3.1 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --enable-libmfx --enable-nonfree --enable-ffplay libavutil 55. 58.100 / 55. 58.100 libavcodec 57. 89.100 / 57. 89.100 libavformat 57. 71.100 / 57. 71.100 libavdevice 57. 6.100 / 57. 6.100 libavfilter 6. 82.100 / 6. 82.100 libswscale 4. 6.100 / 4. 6.100 libswresample 2. 7.100 / 2. 7.100 [mpeg2video @ 0x258d000] Invalid frame dimensions 0x0. Last message repeated 13 times Input #0, mpegts, from 'udp://@239.0.1.1:1234': Duration: N/A, start: 22881.846644, bitrate: 4218 kb/s Program 157 Metadata: service_name : Info tv service_provider: Noname Stream #0:0[0x623]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 4026 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x624]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s (clean effects) Output #0, mpegts, to 'test_stream.ts': Metadata: encoder : Lavf57.71.100 Stream #0:0: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], q=2-31, 4026 kb/s, 25 fps, 25 tbr, 90k tbn, 90k tbc Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s (clean effects) Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help frame= 400 fps= 35 q=-1.0 Lsize= 8928kB time=00:00:16.90 bitrate=4326.9kbits/s speed=1.46x video:7864kB audio:389kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.178244%
and then try to transcode and stream it - it works, dont pay attention to errors, i know it's a bug wih qsv interlaced video encoding.
ffmpeg -hwaccel qsv -c:v mpeg2_qsv -i test_stream.ts -c:v h264_qsv -b:v 3M -maxrate 3M -look_ahead 0 -c:a copy -f mpegts udp://127.0.0.1:1234 ffmpeg version 3.3.1 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --enable-libmfx --enable-nonfree --enable-ffplay libavutil 55. 58.100 / 55. 58.100 libavcodec 57. 89.100 / 57. 89.100 libavformat 57. 71.100 / 57. 71.100 libavdevice 57. 6.100 / 57. 6.100 libavfilter 6. 82.100 / 6. 82.100 libswscale 4. 6.100 / 4. 6.100 libswresample 2. 7.100 / 2. 7.100 Input #0, mpegts, from 'test_stream.ts': Duration: 00:00:17.06, start: 1.400000, bitrate: 4286 kb/s Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 4026 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s (clean effects) Stream mapping: Stream #0:0 -> #0:0 (mpeg2video (mpeg2_qsv) -> h264 (h264_qsv)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help libva info: VA-API version 0.99.0 libva info: va_getDriverName() returns 0 libva info: User requested driver 'iHD' libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so libva info: Found init function __vaDriverInit_0_32 libva info: va_openDriver() returns 0 Output #0, mpegts, to 'udp://127.0.0.1:1234': Metadata: encoder : Lavf57.71.100 Stream #0:0: Video: h264 (h264_qsv), qsv, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 3000 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.89.100 h264_qsv Side data: cpb: bitrate max/min/avg: 3000000/0/3000000 buffer size: 0 vbv_delay: -1 Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s (clean effects) [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 18 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 154800, current: 136800; changing to 154801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 154801, current: 151200; changing to 154802. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 6 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 187200, current: 187200; changing to 187201. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 248400, current: 248400; changing to 248401. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 295200, current: 295200; changing to 295201. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 356400, current: 356400; changing to 356401. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 403200, current: 403200; changing to 403201. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 464400, current: 464400; changing to 464401. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 511200, current: 511200; changing to 511201. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 572400, current: 572400; changing to 572401. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 619200, current: 619200; changing to 619201. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 680400, current: 680400; changing to 680401. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 727200, current: 727200; changing to 727201. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 788400, current: 788400; changing to 788401. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 835200, current: 835200; changing to 835201. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 896400, current: 896400; changing to 896401. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 23 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 990000, current: 990000; changing to 990001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 1 times [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) speed=22.9x Last message repeated 13 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 1054800, current: 1054800; changing to 1054801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 13 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 1108800, current: 1108800; changing to 1108801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 27 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 1216800, current: 1216800; changing to 1216801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 27 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 1324800, current: 1324800; changing to 1324801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 27 times [mpegts @ 0x3da97a0] Non-monotonous DTS in output stream 0:0; previous: 1432800, current: 1432800; changing to 1432801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) Last message repeated 13 times [mpeg2_qsv @ 0x3da8840] A decode call did not consume any data: expect more data at input (-10) Last message repeated 1 times [h264_qsv @ 0x3dcd420] Warning during encoding: incompatible video parameters (5) [mpeg2_qsv @ 0x3da8840] A decode call did not consume any data: expect more data at input (-10) Last message repeated 1 times frame= 368 fps=0.0 q=-0.0 Lsize= 6210kB time=00:00:16.92 bitrate=3006.8kbits/s dup=0 drop=5 speed=22.1x video:5322kB audio:389kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.741579%
If i try to use software decoder, and qsv encoder, i get partial HW acceleration, in practice it's software because and get load on CPU and no GPU:
ffmpeg -i udp://@239.0.1.1:1234 -vf yadif -c:v h264_qsv -b:v 3M -maxrate 3M -look_ahead 0 -c:a copy -f mpegts udp://127.0.0.1:1234 ffmpeg version 3.3.1 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --enable-libmfx --enable-nonfree --enable-ffplay libavutil 55. 58.100 / 55. 58.100 libavcodec 57. 89.100 / 57. 89.100 libavformat 57. 71.100 / 57. 71.100 libavdevice 57. 6.100 / 57. 6.100 libavfilter 6. 82.100 / 6. 82.100 libswscale 4. 6.100 / 4. 6.100 libswresample 2. 7.100 / 2. 7.100 [mpeg2video @ 0x2e1d000] Invalid frame dimensions 0x0. Last message repeated 1 times Input #0, mpegts, from 'udp://@239.0.1.1:1234': Duration: N/A, start: 23492.598644, bitrate: 4218 kb/s Program 157 Metadata: service_name : Info tv service_provider: Noname Stream #0:0[0x623]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 4026 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x624]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s (clean effects) Stream mapping: Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (h264_qsv)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [h264_qsv @ 0x2e119a0] Warning in encoder initialization: partial acceleration (4) Output #0, mpegts, to 'udp://127.0.0.1:1234': Metadata: encoder : Lavf57.71.100 Stream #0:0: Video: h264 (h264_qsv), nv12, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 3000 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.89.100 h264_qsv Side data: cpb: bitrate max/min/avg: 3000000/0/3000000 buffer size: 0 vbv_delay: -1 Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s (clean effects) frame= 272 fps= 44 q=-0.0 Lsize= 4486kB time=00:00:11.28 bitrate=3258.0kbits/s speed=1.83x video:3864kB audio:262kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.732510%
Tested on OS:
Ubuntu 16.04LTS + Intel Media SDK 2017 r2
Centos 7.2.1511 + Intel Media SDK 2017 r2
Centos 7.1.1503 + Intel Media SDK 2016
% vainfo error: can't connect to X server! libva info: VA-API version 0.99.0 libva info: va_getDriverName() returns 0 libva info: User requested driver 'iHD' libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so libva info: Found init function __vaDriverInit_0_32 libva info: va_openDriver() returns 0 vainfo: VA-API version: 0.99 (libva 1.67.0.pre1) vainfo: Driver version: 16.5.1.59511-ubit vainfo: Supported profile and entrypoints VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: <unknown entrypoint> VAProfileH264ConstrainedBaseline: <unknown entrypoint> VAProfileH264Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointEncSlice VAProfileH264Main : <unknown entrypoint> VAProfileH264Main : <unknown entrypoint> VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSlice VAProfileH264High : <unknown entrypoint> VAProfileH264High : <unknown entrypoint> VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Simple : VAEntrypointVLD VAProfileJPEGBaseline : VAEntrypointVLD VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileVP8Version0_3 : VAEntrypointEncSlice VAProfileVP8Version0_3 : VAEntrypointVLD VAProfileVP8Version0_3 : <unknown entrypoint> VAProfileVP9Profile0 : <unknown entrypoint> <unknown profile> : VAEntrypointVideoProc VAProfileNone : VAEntrypointVideoProc VAProfileNone : <unknown entrypoint>
sys_analyzer_linux.py -------------------------- Hardware readiness checks: -------------------------- [ OK ] Processor name: Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz -------------------------- OS readiness checks: -------------------------- [ OK ] GPU visible to OS -------------------------- Intel(R) Media Server Studio Install: -------------------------- [ OK ] user in video group [ OK ] libva.so.1 found [ OK ] vainfo reports valid codec entry points [ OK ] /dev/dri/renderD128 connects to Intel i915 -------------------------- Media SDK Plugins available: (for more info see /opt/intel/mediasdk/plugins/plugins.cfg) -------------------------- H264LA Encoder = 588f1185d47b42968dea377bb5d0dcb4 VP8 Decoder = f622394d8d87452f878c51f2fc9b4131 HEVC Decoder = 33a61c0b4c27454ca8d85dde757c6f8e HEVC Encoder = 6fadc791a0c2eb479ab6dcd5ea9da347 -------------------------- Component Smoke Tests: -------------------------- [ OK ] Media SDK HW API level:1.21 [ OK ] Media SDK SW API level:1.21 [ OK ] OpenCL check:platform:Intel(R) OpenCL GPU OK CPU FAIL
I have tested the same transcoding scenarios with ffmpeg 2.8.11 and it works in all cases.
Attachments (13)
Change History (33)
comment:2 by , 8 years ago
Keywords: | regression added |
---|---|
Priority: | normal → important |
Please confirm that the issue is reproducible with current FFmpeg git head (nothing else is supported on this bug tracker) and use git bisect
to find the change that introduced the regression.
comment:3 by , 8 years ago
I can confirm that the issue is reproducible with current git head:
% git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg % cd ffmpeg % ./configure --enable-libmfx --enable-nonfree --enable-ffplay % make -j4 % ./ffmpeg -hwaccel qsv -c:v mpeg2_qsv -i udp://@239.0.1.1:1234 -c:v h264_qsv -b:v 3M -maxrate 3M -look_ahead 0 -c:a copy -f mpegts udp://127.0.0.1:1234 ffmpeg version N-86258-g5782e0b Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --enable-libmfx --enable-nonfree --enable-ffplay libavutil 55. 63.100 / 55. 63.100 libavcodec 57. 96.101 / 57. 96.101 libavformat 57. 72.101 / 57. 72.101 libavdevice 57. 7.100 / 57. 7.100 libavfilter 6. 90.100 / 6. 90.100 libswscale 4. 7.101 / 4. 7.101 libswresample 2. 8.100 / 2. 8.100 [mpeg2video @ 0x3b780e0] Invalid frame dimensions 0x0. Last message repeated 4 times Input #0, mpegts, from 'udp://@239.0.1.1:1234': Duration: N/A, start: 71781.750644, bitrate: 4218 kb/s Program 157 Metadata: service_name : Info tv service_provider: Noname Stream #0:0[0x623]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 4026 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x624]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s (clean effects) Stream mapping: Stream #0:0 -> #0:0 (mpeg2video (mpeg2_qsv) -> h264 (h264_qsv)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x3b79dc0] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented Too many packets buffered for output stream 0:1. Conversion failed!
comment:4 by , 7 years ago
Ok, i have tried to find bad commit by playing around with git bisect, and ended with:
git bisect bad 1f26a231bb065276cd80ce02957c759f3197edfa is the first bad commit commit 1f26a231bb065276cd80ce02957c759f3197edfa Author: Mark Thompson <sw@jkqxz.net> Date: Fri Oct 21 18:57:12 2016 +0100 qsv: Merge libav implementation Merged as-at libav 398f015, and therefore includes outstanding skipped merges 04b17ff and 130e1f1. All features not in libav are preserved, and no options change. :040000 040000 3792b0cd35c1fe73f5163d9c29462fc7dfacfccd 76730bcd0a03d55288ac756f5405e453b4fd8652 M libavcodec
it looks like refusal to use external SPS parser MFXVideoDECODE_DecodeHeader() broken decoding.
comment:5 by , 7 years ago
Status: | new → open |
---|
comment:7 by , 7 years ago
Where i can upload it ? In http://ffmpeg.org/bugreports.html is written to upload to ftp://upload.ffmpeg.org, but it's not working:
nmap upload.ffmpeg.org Starting Nmap 7.01 ( https://nmap.org ) at 2017-05-26 10:09 EEST Nmap scan report for upload.ffmpeg.org (88.191.250.119) Host is up (0.046s latency). Other addresses for upload.ffmpeg.org (not scanned): 2a01:e0d:1:3:58bf:fa77:f00d:face rDNS record for 88.191.250.119: natalya.videolan.org Not shown: 996 filtered ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 443/tcp open https 5000/tcp open upnp Nmap done: 1 IP address (1 host up) scanned in 4.90 seconds
comment:9 by , 7 years ago
At this time i made ts dump with TS Analyzer, and this dump doesn't work as like live stream.
You can download this one sample from https://www.dropbox.com/s/wv9yg0co57mv6ey/stream_dump.ts?dl=0
ffmpeg output:
ffmpeg -hwaccel qsv -c:v mpeg2_qsv -i stream_dump.ts -c:v h264_qsv -b:v 3M -maxrate 3M -look_ahead 0 -c:a copy -f mpegts udp://127.0.0.1:1234 ffmpeg version N-86258-g5782e0b Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --enable-libmfx --enable-nonfree --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc libavutil 55. 63.100 / 55. 63.100 libavcodec 57. 96.101 / 57. 96.101 libavformat 57. 72.101 / 57. 72.101 libavdevice 57. 7.100 / 57. 7.100 libavfilter 6. 90.100 / 6. 90.100 libswscale 4. 7.101 / 4. 7.101 libswresample 2. 8.100 / 2. 8.100 [mpeg2video @ 0x27c6d20] Invalid frame dimensions 0x0. Last message repeated 2 times Input #0, mpegts, from 'stream_dump.ts': Duration: 00:00:25.73, start: 57544.144956, bitrate: 5428 kb/s Program 157 Metadata: service_name : Info tv service_provider: xxxx Stream #0:0[0x623]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 4026 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x624]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s (clean effects) Stream mapping: Stream #0:0 -> #0:0 (mpeg2video (mpeg2_qsv) -> h264 (h264_qsv)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x27c8420] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented Too many packets buffered for output stream 0:1. Conversion failed!
comment:11 by , 7 years ago
Reproducable:
% dd if=stream_dump.ts of=stream_dump_1st2MB.ts bs=2M count=1 1+0 records in 1+0 records out 2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.00477455 s, 439 MB/s
% ffmpeg -hwaccel qsv -c:v mpeg2_qsv -i stream_dump_1st2MB.ts -c:v h264_qsv -b:v 3M -maxrate 3M -look_ahead 0 -c:a copy -f mpegts udp://127.0.0.1:1234 ffmpeg version N-86258-g5782e0b Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --enable-libmfx --enable-nonfree --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc libavutil 55. 63.100 / 55. 63.100 libavcodec 57. 96.101 / 57. 96.101 libavformat 57. 72.101 / 57. 72.101 libavdevice 57. 7.100 / 57. 7.100 libavfilter 6. 90.100 / 6. 90.100 libswscale 4. 7.101 / 4. 7.101 libswresample 2. 8.100 / 2. 8.100 [mpeg2video @ 0x21b9d40] Invalid frame dimensions 0x0. Last message repeated 2 times Input #0, mpegts, from 'stream_dump_1st2MB.ts': Duration: 00:00:03.53, start: 57544.144956, bitrate: 4755 kb/s Program 157 Metadata: service_name : Info tv service_provider: xxxx Stream #0:0[0x623]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 4026 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x624]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s (clean effects) Stream mapping: Stream #0:0 -> #0:0 (mpeg2video (mpeg2_qsv) -> h264 (h264_qsv)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented [mpeg2_qsv @ 0x21ef000] Decoding pixel format '(null)' is not supported [mpeg2_qsv @ 0x21ef000] Too many errors when draining, this is a bug. Stop draining and force EOF. Error while decoding stream #0:0: Internal bug, should not have happened Finishing stream 0:0 without any data written to it. [h264_qsv @ 0x21bc800] Encoder will work with partial HW acceleration [h264_qsv @ 0x21bc800] Warning in encoder initialization: partial acceleration (4) Output #0, mpegts, to 'udp://127.0.0.1:1234': Metadata: encoder : Lavf57.72.101 Stream #0:0: Video: h264 (h264_qsv), nv12, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 3000 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.96.101 h264_qsv Side data: cpb: bitrate max/min/avg: 3000000/0/3000000 buffer size: 0 vbv_delay: -1 Stream #0:1(lit): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s (clean effects) frame= 0 fps=0.0 q=0.0 Lsize= 80kB time=00:00:03.04 bitrate= 214.6kbits/s speed= 146x video:0kB audio:72kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 10.921224% Conversion failed!
comment:12 by , 7 years ago
with TS analyzer figured out that first I-Frame is on packet 476, if i cut file to that point - transcoding start's to work:
dd if=stream_dump.ts of=stream_dump_skip.ts bs=188 skip=475
ffmpeg -hwaccel qsv -c:v mpeg2_qsv -i stream_dump_skip.ts -c:v h264_qsv -b:v 3M -maxrate 3M -look_ahead 0 -c:a copy -f mpegts udp://127.0.0.1:123 ffmpeg version N-86258-g5782e0b Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --enable-libmfx --enable-nonfree --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc libavutil 55. 63.100 / 55. 63.100 libavcodec 57. 96.101 / 57. 96.101 libavformat 57. 72.101 / 57. 72.101 libavdevice 57. 7.100 / 57. 7.100 libavfilter 6. 90.100 / 6. 90.100 libswscale 4. 7.101 / 4. 7.101 libswresample 2. 8.100 / 2. 8.100 Input #0, mpegts, from 'stream_dump_skip.ts': Duration: 00:00:25.63, start: 57544.240956, bitrate: 5420 kb/s Program 157 Metadata: service_name : Info tv service_provider: xxxx Stream #0:0[0x623]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 4026 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x624]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s (clean effects) Stream mapping: Stream #0:0 -> #0:0 (mpeg2video (mpeg2_qsv) -> h264 (h264_qsv)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help libva info: VA-API version 0.99.0 libva info: va_getDriverName() returns 0 libva info: User requested driver 'iHD' libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so libva info: Found init function __vaDriverInit_0_32 libva info: va_openDriver() returns 0 Output #0, mpegts, to 'udp://127.0.0.1:123': Metadata: encoder : Lavf57.72.101 Stream #0:0: Video: h264 (h264_qsv), qsv, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 3000 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.96.101 h264_qsv Side data: cpb: bitrate max/min/avg: 3000000/0/3000000 buffer size: 0 vbv_delay: -1 Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s (clean effects) [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 18 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 104400, current: 86400; changing to 104401. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 104401, current: 100800; changing to 104402. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 6 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 136800, current: 136800; changing to 136801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 198000, current: 198000; changing to 198001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 244800, current: 244800; changing to 244801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 306000, current: 306000; changing to 306001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 352800, current: 352800; changing to 352801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 414000, current: 414000; changing to 414001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 460800, current: 460800; changing to 460801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 522000, current: 522000; changing to 522001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 568800, current: 568800; changing to 568801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 630000, current: 630000; changing to 630001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 676800, current: 676800; changing to 676801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 738000, current: 738000; changing to 738001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 784800, current: 784800; changing to 784801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 846000, current: 846000; changing to 846001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 892800, current: 892800; changing to 892801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 954000, current: 954000; changing to 954001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 4 times [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) speed=21.8x Last message repeated 6 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 1000800, current: 1000800; changing to 1000801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 13 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 1054800, current: 1054800; changing to 1054801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 1116000, current: 1116000; changing to 1116001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 1162800, current: 1162800; changing to 1162801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 1224000, current: 1224000; changing to 1224001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 1270800, current: 1270800; changing to 1270801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 1332000, current: 1332000; changing to 1332001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 1378800, current: 1378800; changing to 1378801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 1440000, current: 1440000; changing to 1440001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 1486800, current: 1486800; changing to 1486801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 15 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 1548000, current: 1548000; changing to 1548001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 11 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 1594800, current: 1594800; changing to 1594801. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 19 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 1674000, current: 1674000; changing to 1674001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 27 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 1782000, current: 1782000; changing to 1782001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 27 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 1890000, current: 1890000; changing to 1890001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 2 times [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) speed=21.2x Last message repeated 38 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 2052000, current: 2052000; changing to 2052001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 27 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 2160000, current: 2160000; changing to 2160001. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 19 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 2239200, current: 2239200; changing to 2239201. This may result in incorrect timestamps in the output file. [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) Last message repeated 5 times [mpeg2_qsv @ 0x2eaf980] A decode call did not consume any data: expect more data at input (-10) [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) [mpeg2_qsv @ 0x2eaf980] A decode call did not consume any data: expect more data at input (-10) [h264_qsv @ 0x2ed41a0] Warning during encoding: incompatible video parameters (5) [mpeg2_qsv @ 0x2eaf980] A decode call did not consume any data: expect more data at input (-10) Last message repeated 1 times [mpegts @ 0x2eb0520] Non-monotonous DTS in output stream 0:0; previous: 2286000, current: 2286000; changing to 2286001. This may result in incorrect timestamps in the output file. frame= 583 fps=482 q=-0.0 Lsize= 10048kB time=00:00:25.60 bitrate=3215.3kbits/s dup=0 drop=4 speed=21.2x video:8652kB audio:594kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.670417%
follow-up: 15 comment:13 by , 7 years ago
What do you need to get some traction in fixing this bug/regression? This stopa us using quicksync for decoding MPEG2VIDEO.
Many Thanks
Krs
Mark
comment:14 by , 7 years ago
You could offer a bounty or sponsor a fix, but it's not guaranteed to result in someone fixing it.
You could provide a patch if you're familiar with the topic, technically inclined, and know C.
We are just a loose group of individual volunteers interested in multimedia, so there is no official roadmap or timeline for getting things fixed or implemented.
Four months have passed since master branch was tested. Is the issue still reproducible on the master branch?
comment:15 by , 7 years ago
Replying to mgibbons:
What do you need to get some traction in fixing this bug/regression? This stopa us using quicksync for decoding MPEG2VIDEO.
Many Thanks
Krs
Mark
Not only MPEG2, all qsv decoders behaves the same.
You can use 2.8 release if you really want to use it.
comment:16 by , 7 years ago
According to my findings ir looks like that ff_qsv_process_data in libavcodec/qsvdec.c doesn't consume any data from input if first frame is not I Frame, so it's stuck in loop on trying to decode the same first frame.
by , 7 years ago
Attachment: | qsvdec.patch added |
---|
Fix QSV dec doesnt consume frames if first frame is not key frame
comment:17 by , 7 years ago
I can confirm that this issue affects not only MPEG2, but also H.264 as rycius has said. And it really has something to do with SPS/PPS parsing: It treats recovery point I frames that are not IDR frames as keyframes if they have SPS and PPS inband; if the SPS and PPS is merely available via extradata, it refuses to decode. IDR frames are always treated as keyframes and it works with extradata, too, not only in-band extradata.
I tested rycius' patch and it really makes qsv not give up if the first frame it finds is not a keyframe; but it does not change which frames qsv treats as keyframes. It should probably be posted on the developers mailing list to be merged as they see fit.
I'll attach some H.264 samples so that developers have something tangible to work with.
IDR.No.Inband.SPPS.mkv contains two GOPs: First an open GOP with a keyframe (with a recovery message SEI) and then a second GOP with an IDR frame at the beginning. There are no in-band SPS/PPS. With the patch, the first GOP produces some errors, but the second GOP is correctly decoded. Without the patch, nothing is decoded at all.
The other samples are all variations of the same sample. They all have no IDR frames and start with a closed GOP; the keyframes are all correctly flagged with recovery point SEI messages. They differ in the amount of in-band extradata (the SPS and PPS don't change within the stream at all): Inband.SPPS.No.IDR.mkv has SPS/PPS in front of every keyframe; No.Inband.SPPS.No.IDR.mkv has no in-band extradata; and Partially.Inband.SPPS.No.IDR.mkv has SPS/PPS in front of every keyframe except the very first. Of course, all these files contain the necessary extradata in the CodecPrivate, too. Decoding Inband.SPPS.No.IDR.mkv succeeds both with and without the patch; decoding No.Inband.SPPS.No.IDR.mkv fails with and without the patch. Decoding Partially.Inband.SPPS.No.IDR.mkv fails without the patch. With the patch, the first GOP can't be decoded, but all subsequent ones can.
by , 7 years ago
Attachment: | IDR.No.Inband.SPPS.mkv added |
---|
by , 7 years ago
Attachment: | Inband.SPPS.No.IDR.mkv added |
---|
by , 7 years ago
Attachment: | No.Inband.SPPS.No.IDR.mkv added |
---|
by , 7 years ago
Attachment: | Partially.Inband.SPPS.No.IDR.mkv added |
---|
by , 7 years ago
Attachment: | IDR.No.Inband.SPPS.Patch.applied.log added |
---|
by , 7 years ago
Attachment: | IDR.No.Inband.SPPS.Patch.not.applied.log added |
---|
by , 7 years ago
Attachment: | Inband.SPPS.No.IDR.Patch.applied.log added |
---|
by , 7 years ago
Attachment: | Inband.SPPS.No.IDR.Patch.not.applied.log added |
---|
by , 7 years ago
Attachment: | No.Inband.SPPS.No.IDR.Patch.applied.log added |
---|
by , 7 years ago
Attachment: | No.Inband.SPPS.No.IDR.Patch.not.applied.log added |
---|
by , 7 years ago
Attachment: | Partially.Inband.SPPS.No.IDR.Patch.applied.log added |
---|
by , 7 years ago
Attachment: | Partially.Inband.SPPS.No.IDR.Patch.not.applied.log added |
---|
comment:18 by , 6 years ago
Same problem here with 4.0.2
Ubuntu 16.04LTS + Intel Media SDK 2018 r1
ffmpeg -loglevel debug -hwaccel qsv -vcodec mpeg2_qsv -i /tmp/tmp.ts output.ts [mpeg2_qsv @ 0x38e8d00] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented cur_dts is invalid (this is harmless if it occurs once at the start per stream) [mpeg2_qsv @ 0x38e8d00] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented cur_dts is invalid (this is harmless if it occurs once at the start per stream) Last message repeated 4 times [mpeg2_qsv @ 0x38e8d00] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented cur_dts is invalid (this is harmless if it occurs once at the start per stream) Last message repeated 2 times [mpeg2_qsv @ 0x38e8d00] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented cur_dts is invalid (this is harmless if it occurs once at the start per stream) [mpeg2_qsv @ 0x38e8d00] Decoding pixel format '(null)' is not supported Error while decoding stream #0:0: Function not implemented cur_dts is invalid (this is harmless if it occurs once at the start per stream) Last message repeated 1 times Too many packets buffered for output stream 0:1.
comment:19 by , 6 years ago
Commit 559370f2c45110afd8308eec7194437736c323d4 should fix h264/h265 issue. But it doesn't fix mpeg2 and similar patch is needed.
Where I can download the mpeg2 file "tmp.ts" of comments 18?
commit 559370f2c45110afd8308eec7194437736c323d4
Author: Ruiling, Song <ruiling.song@intel.com>
Date: Wed Jan 24 10:14:51 2018 +0800
qsv: Skip the packet if decoding failure
MediaSDK may fail to decode some frame, just skip it.
Otherwise, it will keep decoding the failure packet repeatedly
without processing any packet afterwards.
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c
index 83880dc..78a7b61 100644
--- a/libavcodec/qsvdec_h2645.c
+++ b/libavcodec/qsvdec_h2645.c
@@ -153,8 +153,12 @@ static int qsv_decode_frame(AVCodecContext *avctx, void *data,
}
ret = ff_qsv_process_data(avctx, &s->qsv, frame, got_frame, &s->buffer_pkt);
- if (ret < 0)
+ if (ret < 0){
+ /* Drop buffer_pkt when failed to decode the packet. Otherwise,
+ the decoder will keep decoding the failure packet. */
+ av_packet_unref(&s->buffer_pkt);
return ret;
+ }
comment:20 by , 6 years ago
commit f6042a603f61ab2ef496402e11c99864e243b542 should fix the decoding
issue of No Inband video: No.Inband.SPPS.No.IDR.mkv
commit f6042a603f61ab2ef496402e11c99864e243b542
Author: Linjie Fu <linjie.fu@intel.com>
Date: Thu, 16 Aug 2018 15:02:35 +0800
Subject: [PATCH V2] avcodec/h264_mp4toannexb_bsf: add No IDR frame situation
Fix the live stream encoding problem using qsv when the first frame
is not an IDR frame.
Add the extradata information when the IDR frame is missing in the
first GOP.
Fix the bug reported in ticket #6418.
[PATCH V2] Fix the coding style.
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
---
libavcodec/h264_mp4toannexb_bsf.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c
index 794c82e650..fbb9f1fe20 100644
--- a/libavcodec/h264_mp4toannexb_bsf.c
+++ b/libavcodec/h264_mp4toannexb_bsf.c
@@ -33,6 +33,7 @@ typedef struct H264BSFContext {
int32_t pps_offset;
uint8_t length_size;
uint8_t new_idr;
+ uint8_t new_nal_slice;
uint8_t idr_sps_seen;
uint8_t idr_pps_seen;
int extradata_parsed;
@@ -243,6 +244,7 @@ static int h264_mp4toannexb_filter(AVBSFContext *ctx, AVPacket *out)
buf, nal_size, 1)) < 0)
goto fail;
s->new_idr = 0;
+ s->new_nal_slice = 1;
/* if only SPS has been seen, also insert PPS */
} else if (s->new_idr && unit_type == H264_NAL_IDR_SLICE && s->idr_sps_seen && !s->idr_pps_seen) {
if (s->pps_offset == -1) {
@@ -253,6 +255,12 @@ static int h264_mp4toannexb_filter(AVBSFContext *ctx, AVPacket *out)
ctx->par_out->extradata + s->pps_offset, ctx->par_out->extradata_size - s->pps_offset,
buf, nal_size, 1)) < 0)
goto fail;
+ } else if (s->new_idr && !s->new_nal_slice && H264_NAL_SLICE == unit_type && !s->idr_sps_seen && !s->idr_pps_seen){
+ av_log(ctx, AV_LOG_WARNING, "first H264_NAL_SLICE when there is no IDR.\n");
+ if ((ret = alloc_and_copy(out, ctx->par_out->extradata, ctx->par_out->extradata_size, buf, nal_size, 1)) < 0)
+ goto fail;
+ s->new_nal_slice = 1;
+ s->new_idr = 0;
} else {
if ((ret=alloc_and_copy(out, NULL, 0, buf, nal_size, unit_type == H264_NAL_SPS unit_type == H264_NAL_PPS)) < 0) goto fail;
--
I think that a problem is that for QSV decoder first fed frame must be I-Frame, then dumping stream -c:v copy option by default drops all non key frames.
I made a test to confirm that by adding -copyinkf option on stream dump:
then tried to transcode it: