Unable to use hardware encoder h264_rkmpp with software decoded ATSC OTA transmission using rk
When attempting to hardware encode to h264 using the Rockchip MPP encoder h264_rkmpp from an ATSC source, FFMPEG errors out with: "Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scaler_0'" The sample file used in this example can be downloaded here: https://transfer.sh/BRMej/out.ts The full command used and resulting output is as follows: $ ffmpeg -loglevel 48 -c:v mpeg2video -f mpegts -i out.ts -f mp4 -c:v h264_rkmpp -c:a libfdk_aac -preset ultrafast -mbd rd -copyinkf -flags +ilme+ildct -fflags +genpts out.mp4 -y ffmpeg version 589de66a0b Copyright (c) 2000-2018 the FFmpeg developers built with gcc 9.3.0 (GCC) configuration: --prefix=/usr/local --extra-libs='-lpthread -lm' --enable-hardcoded-tables --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-rkmpp --enable-version3 --enable-libdrm --enable-libx265 --enable-nonfree libavutil 56. 14.100 / 56. 14.100 libavcodec 58. 18.100 / 58. 18.100 libavformat 58. 12.100 / 58. 12.100 libavdevice 58. 3.100 / 58. 3.100 libavfilter 7. 16.100 / 7. 16.100 libswscale 5. 1.100 / 5. 1.100 libswresample 3. 1.100 / 3. 1.100 libpostproc 55. 1.100 / 55. 1.100 Splitting the commandline. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '48'. Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'mpeg2video'. Reading option '-f' ... matched as option 'f' (force format) with argument 'mpegts'. Reading option '-i' ... matched as input url with argument 'out.ts'. Reading option '-f' ... matched as option 'f' (force format) with argument 'mp4'. Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'h264_rkmpp'. Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'libfdk_aac'. Reading option '-preset' ... matched as AVOption 'preset' with argument 'ultrafast'. Reading option '-mbd' ... matched as AVOption 'mbd' with argument 'rd'. Reading option '-copyinkf' ... matched as option 'copyinkf' (copy initial non-keyframes) with argument '1'. Reading option '-flags' ... matched as AVOption 'flags' with argument '+ilme+ildct'. Reading option '-fflags' ... matched as AVOption 'fflags' with argument '+genpts'. Reading option 'out.mp4' ... matched as output url. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Finished splitting the commandline. Parsing a group of options: global . Applying option loglevel (set logging level) with argument 48. Applying option y (overwrite output files) with argument 1. Successfully parsed a group of options. Parsing a group of options: input url out.ts. Applying option c:v (codec name) with argument mpeg2video. Applying option f (force format) with argument mpegts. Successfully parsed a group of options. Opening an input file: out.ts. [mpegts @ 0xaaab03c8df20] Opening 'out.ts' for reading [file @ 0xaaab03c8e820] Setting default whitelist 'file,crypto' [mpegts @ 0xaaab03c8df20] Before avformat_find_stream_info() pos: 0 bytes read:5013504 seeks:1 nb_streams:0 [mpegts @ 0xaaab03c8df20] stream=0 stream_type=0 pid=31 prog_reg_desc= [mpegts @ 0xaaab03c8df20] probing stream 0 pp:2500 [mpegts @ 0xaaab03c8df20] Probe with size=204749, packets=1 detected mpegvideo with score=25 [mpegts @ 0xaaab03c8df20] probed stream 0 [mpegts @ 0xaaab03c8df20] stream=1 stream_type=0 pid=34 prog_reg_desc= [mpeg2video @ 0xaaab03cab640] Format yuv420p chosen by get_format(). [mpegts @ 0xaaab03c8df20] probing stream 1 pp:2500 [mpegts @ 0xaaab03c8df20] Probe with size=7680, packets=1 detected ac3 with score=25 [mpegts @ 0xaaab03c8df20] probed stream 1 [mpegts @ 0xaaab03c8df20] max_analyze_duration 5000000 reached at 5005000 microseconds st:0 [mpegts @ 0xaaab03c8df20] PES packet size mismatch [mpegts @ 0xaaab03c8df20] After avformat_find_stream_info() pos: 0 bytes read:9195664 seeks:3 frames:306 Input #0, mpegts, from 'out.ts': Duration: 00:00:18.42, start: 29234.532200, bitrate: 5406 kb/s Stream #0:0[0x31], 152, 1/90000: Video: mpeg2video (Main), 1 reference frame, yuv420p(yuv420p) (tv, bt709, top first, left), 1920x1080 [SAR 1:1 DAR 16:9], 0/1, Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc Stream #0:1[0x34], 154, 1/90000: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s Successfully opened the file. Parsing a group of options: output url out.mp4. Applying option f (force format) with argument mp4. Applying option c:v (codec name) with argument h264_rkmpp. Applying option c:a (codec name) with argument libfdk_aac. Applying option copyinkf (copy initial non-keyframes) with argument 1. Successfully parsed a group of options. Opening an output file: out.mp4. Codec AVOption preset (Set the encoding preset (cf. x264 --fullhelp)) specified for output file #0 (out.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. [file @ 0xaaab03cadfd0] Setting default whitelist 'file,crypto' Successfully opened the file. detected 4 logical cores Stream mapping: Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (h264_rkmpp)) Stream #0:1 -> #0:1 (ac3 (native) -> aac (libfdk_aac)) Press [q] to stop, [?] for help cur_dts is invalid (this is harmless if it occurs once at the start per stream) [mpeg2video @ 0xaaab03caf190] Format yuv420p chosen by get_format(). cur_dts is invalid (this is harmless if it occurs once at the start per stream) [mpeg2video @ 0xaaab03caf190] Skipping B slice due to open GOP Last message repeated 67 times cur_dts is invalid (this is harmless if it occurs once at the start per stream) [mpeg2video @ 0xaaab03caf190] Skipping B slice due to open GOP Last message repeated 67 times cur_dts is invalid (this is harmless if it occurs once at the start per stream) [graph 0 input from stream 0:0 @ 0xaaab03fa2030] Setting 'video_size' to value '1920x1080' [graph 0 input from stream 0:0 @ 0xaaab03fa2030] Setting 'pix_fmt' to value '0' [graph 0 input from stream 0:0 @ 0xaaab03fa2030] Setting 'time_base' to value '1/90000' [graph 0 input from stream 0:0 @ 0xaaab03fa2030] Setting 'pixel_aspect' to value '1/1' [graph 0 input from stream 0:0 @ 0xaaab03fa2030] Setting 'sws_param' to value 'flags=2' [graph 0 input from stream 0:0 @ 0xaaab03fa2030] Setting 'frame_rate' to value '30000/1001' [graph 0 input from stream 0:0 @ 0xaaab03fa2030] w:1920 h:1080 pixfmt:yuv420p tb:1/90000 fr:30000/1001 sar:1/1 sws_param:flags=2 [format @ 0xaaab03d12a00] Setting 'pix_fmts' to value 'drm_prime' [auto_scaler_0 @ 0xaaab03cedac0] Setting 'flags' to value 'bicubic' [auto_scaler_0 @ 0xaaab03cedac0] w:iw h:ih flags:'bicubic' interl:0 [format @ 0xaaab03d12a00] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format' Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scaler_0' Error reinitializing filters! Failed to inject frame into filter network: Function not implemented Error while processing the decoded data for stream #0:0 [AVIOContext @ 0xaaab03d0a4c0] Statistics: 0 seeks, 0 writeouts [AVIOContext @ 0xaaab03c968f0] Statistics: 9556112 bytes read, 3 seeks Conversion failed!
On 8/13/2020 12:28 PM, Brad Bruggemann wrote:
ffmpeg version 589de66a0b Copyright (c) 2000-2018 the FFmpeg developers
Always the first question- have you tried an up-to-date build of ffmpeg? If not, please do. Later, z!
Just recompiled with the latest and greatest. The following is the command and output. It appears to have made no difference. ffmpeg -loglevel 48 -c:v mpeg2video -f mpegts -i out.ts -f mp4 -c:v h264_rkmpp -c:a libfdk_aac -preset ultrafast -mbd rd -copyinkf -flags +ilme+ildct -fflags +genpts out.mp4 -y ffmpeg version N-98732-g9f702fc8f4 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9.3.0 (GCC) configuration: --prefix=/usr/local --extra-libs='-lpthread -lm' --enable-hardcoded-tables --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-rkmpp --enable-version3 --enable-libdrm --enable-libx265 --enable-nonfree libavutil 56. 58.100 / 56. 58.100 libavcodec 58.100.100 / 58.100.100 libavformat 58. 51.100 / 58. 51.100 libavdevice 58. 11.101 / 58. 11.101 libavfilter 7. 87.100 / 7. 87.100 libswscale 5. 8.100 / 5. 8.100 libswresample 3. 8.100 / 3. 8.100 libpostproc 55. 8.100 / 55. 8.100 Splitting the commandline. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '48'. Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'mpeg2video'. Reading option '-f' ... matched as option 'f' (force format) with argument 'mpegts'. Reading option '-i' ... matched as input url with argument 'out.ts'. Reading option '-f' ... matched as option 'f' (force format) with argument 'mp4'. Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'h264_rkmpp'. Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'libfdk_aac'. Reading option '-preset' ... matched as AVOption 'preset' with argument 'ultrafast'. Reading option '-mbd' ... matched as AVOption 'mbd' with argument 'rd'. Reading option '-copyinkf' ... matched as option 'copyinkf' (copy initial non-keyframes) with argument '1'. Reading option '-flags' ... matched as AVOption 'flags' with argument '+ilme+ildct'. Reading option '-fflags' ... matched as AVOption 'fflags' with argument '+genpts'. Reading option 'out.mp4' ... matched as output url. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Finished splitting the commandline. Parsing a group of options: global . Applying option loglevel (set logging level) with argument 48. Applying option y (overwrite output files) with argument 1. Successfully parsed a group of options. Parsing a group of options: input url out.ts. Applying option c:v (codec name) with argument mpeg2video. Applying option f (force format) with argument mpegts. Successfully parsed a group of options. Opening an input file: out.ts. [mpegts @ 0xaaaaec9acf20] Opening 'out.ts' for reading [file @ 0xaaaaec9ad830] Setting default whitelist 'file,crypto,data' [mpegts @ 0xaaaaec9acf20] Before avformat_find_stream_info() pos: 0 bytes read:5013504 seeks:1 nb_streams:0 [mpegts @ 0xaaaaec9acf20] stream=0 stream_type=0 pid=31 prog_reg_desc= [mpegts @ 0xaaaaec9acf20] probing stream 0 pp:2500 [mpegts @ 0xaaaaec9acf20] Probe with size=204749, packets=1 detected mpegvideo with score=25 [mpegts @ 0xaaaaec9acf20] probed stream 0 [mpegts @ 0xaaaaec9acf20] stream=1 stream_type=0 pid=34 prog_reg_desc= [mpeg2video @ 0xaaaaec9cb7d0] Format yuv420p chosen by get_format(). [mpegts @ 0xaaaaec9acf20] probing stream 1 pp:2500 [mpegts @ 0xaaaaec9acf20] Probe with size=7680, packets=1 detected ac3 with score=25 [mpegts @ 0xaaaaec9acf20] probed stream 1 [mpegts @ 0xaaaaec9acf20] max_analyze_duration 5000000 reached at 5005000 microseconds st:0 [mpegts @ 0xaaaaec9acf20] PES packet size mismatch [mpegts @ 0xaaaaec9acf20] Packet corrupt (stream = 1, dts = 2632691898). [mpegts @ 0xaaaaec9acf20] After avformat_find_stream_info() pos: 0 bytes read:9195664 seeks:3 frames:306 Input #0, mpegts, from 'out.ts': Duration: 00:00:18.42, start: 29234.532200, bitrate: 5406 kb/s Stream #0:0[0x31], 152, 1/90000: Video: mpeg2video (Main), 1 reference frame, yuv420p(yuv420p) (tv, bt709, top first, left), 1920x1080 [SAR 1:1 DAR 16:9], 0/1, Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc Side data: cpb: bitrate max/min/avg: 15000000/0/0 buffer size: 7995392 vbv_delay: N/A Stream #0:1[0x34], 154, 1/90000: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s Successfully opened the file. Parsing a group of options: output url out.mp4. Applying option f (force format) with argument mp4. Applying option c:v (codec name) with argument h264_rkmpp. Applying option c:a (codec name) with argument libfdk_aac. Applying option copyinkf (copy initial non-keyframes) with argument 1. Successfully parsed a group of options. Opening an output file: out.mp4. Codec AVOption preset (Set the encoding preset (cf. x264 --fullhelp)) specified for output file #0 (out.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. [file @ 0xaaaaec9cef20] Setting default whitelist 'file,crypto,data' Successfully opened the file. detected 4 logical cores Stream mapping: Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (h264_rkmpp)) Stream #0:1 -> #0:1 (ac3 (native) -> aac (libfdk_aac)) Press [q] to stop, [?] for help cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [mpeg2video @ 0xaaaaec9cf7b0] Format yuv420p chosen by get_format(). cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [mpeg2video @ 0xaaaaec9cf7b0] Skipping B slice due to open GOP Last message repeated 67 times cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [mpeg2video @ 0xaaaaec9cf7b0] Skipping B slice due to open GOP Last message repeated 67 times cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [graph 0 input from stream 0:0 @ 0xaaaaecd8c290] Setting 'video_size' to value '1920x1080' [graph 0 input from stream 0:0 @ 0xaaaaecd8c290] Setting 'pix_fmt' to value '0' [graph 0 input from stream 0:0 @ 0xaaaaecd8c290] Setting 'time_base' to value '1/90000' [graph 0 input from stream 0:0 @ 0xaaaaecd8c290] Setting 'pixel_aspect' to value '1/1' [graph 0 input from stream 0:0 @ 0xaaaaecd8c290] Setting 'frame_rate' to value '30000/1001' [graph 0 input from stream 0:0 @ 0xaaaaecd8c290] w:1920 h:1080 pixfmt:yuv420p tb:1/90000 fr:30000/1001 sar:1/1 [format @ 0xaaaaecadf950] Setting 'pix_fmts' to value 'drm_prime' [auto_scaler_0 @ 0xaaaaecd80070] Setting 'flags' to value 'bicubic' [auto_scaler_0 @ 0xaaaaecd80070] w:iw h:ih flags:'bicubic' interl:0 [format @ 0xaaaaecadf950] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format' Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scaler_0' Error reinitializing filters! Failed to inject frame into filter network: Function not implemented Error while processing the decoded data for stream #0:0 [AVIOContext @ 0xaaaaec9cf190] Statistics: 0 seeks, 0 writeouts [AVIOContext @ 0xaaaaec9b5900] Statistics: 9556112 bytes read, 3 seeks Conversion failed! On Thu, Aug 13, 2020 at 3:56 PM Carl Zwanzig <cpz@tuunq.com> wrote:
On 8/13/2020 12:28 PM, Brad Bruggemann wrote:
ffmpeg version 589de66a0b Copyright (c) 2000-2018 the FFmpeg developers
Always the first question- have you tried an up-to-date build of ffmpeg? If not, please do.
Later,
z! _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
participants (2)
-
Brad Bruggemann -
Carl Zwanzig