Opened 12 days ago

Last modified 3 days ago

#7724 new defect

[FFmpeg-vaapi] HEVC 4K/FHD to AVC 4K/FHD transcoding failed

Reported by: andreyor Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: vaapi
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

How to reproduce:

ffmpeg -y -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i <crowd_run_3840x2160_500_50.2160p30_500_40M.265> -frames 500 -c:v h264_vaapi -b:v 25000k -minrate:v 25000k -maxrate:v 25000k -compression_level 4 -g 256 -bf 2 0001_4K02_1_0.h264

ffmpeg version N-93001-g87c165c237

Output:

 [hevc @ 0x55c5541d4180] Stream #0: not enough frames to estimate rate; consider increasing probesize
 Input #0, hevc, from '/msdk/MEDIASDK_STREAMS/_System_Validation/performance/set001/crowd_run_3840x2160_500_50.2160p30_500_40M.265':
   Duration: N/A, bitrate: N/A
     Stream #0:0: Video: hevc (Main), yuv420p(tv), 3840x2160, 30 fps, 30 tbr, 1200k tbn, 30 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_vaapi))
 Press [q] to stop, [?] for help
 frame=    0 fps=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
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
 Conversion failed!

Change History (4)

comment:1 Changed 12 days ago by cehoyos

  • Component changed from ffmpeg to undetermined
  • Keywords vaapi added; ffmpeg-vaapi removed

Please provide an input sample that allows to reproduce and add the command line you tested together with the complete, uncut console output to make this a valid ticket.

comment:2 Changed 8 days ago by fulinjie

Can not reproduce on my side without the sample.
Tested with the same ffmpeg version, and it works.

ffmpeg -hwaccel vaapi -y -vaapi_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i /home/linjiefu/Videos/sourceVideo/4K_hevc.h265 -c:v h264_vaapi -b:v 25000k -minrate:v 25000k -maxrate:v 25000k -compression_level 4 -g 256 -bf 2 0001_4K02_1_0.h264
ffmpeg version N-93001-g87c165c237 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
  configuration: --enable-libmfx --disable-optimizations --enable-debug=3 --disable-stripping --enable-gpl --enable-libopenh264 --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --samples=fate-suite/
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 44.100 / 58. 44.100
  libavformat    58. 26.100 / 58. 26.100
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 48.100 /  7. 48.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Input #0, hevc, from '/home/linjiefu/Videos/sourceVideo/4K_hevc.h265':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: hevc (Main), yuv420p(tv), 3840x2160 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 1200k tbn, 50 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_vaapi))
Press [q] to stop, [?] for help
Output #0, h264, to '0001_4K02_1_0.h264':
  Metadata:
    encoder         : Lavf58.26.100
    Stream #0:0: Video: h264 (h264_vaapi) (High), vaapi_vld, 3840x2160 [SAR 1:1 DAR 16:9], q=-1--1, 25000 kb/s, 50 fps, 50 tbn, 50 tbc
    Metadata:
      encoder         : Lavc58.44.100 h264_vaapi
frame=   30 fps=0.0 q=-0.0 Lsize=    2092kB time=00:00:00.58 bitrate=29544.4kbits/s speed=0.999x    

comment:3 Changed 5 days ago by andreyor

Input stream:
http://fate-suite.ffmpeg.org/hevc-conformance/AMP_A_Samsung_4.bit

Full output:

./ffmpeg.N-93001-g87c165c237 -y -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i AMP_A_Samsung_4.bit -frames 500 -c:v h264_vaapi -b:v 25000k -minrate:v 25000k -maxrate:v 25000k -compression_level 4 -g 256 -bf 2 0001_4K02_1_0.h264 ffmpeg version N-93001-g87c165c237 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
  configuration: --prefix=/msdk/FFmpeg/ffmpeg_build --enable-libmfx
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 44.100 / 58. 44.100
  libavformat    58. 26.100 / 58. 26.100
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 48.100 /  7. 48.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
Input #0, hevc, from 'AMP_A_Samsung_4.bit':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: hevc (Main), yuv420p(tv), 2560x1600, 25 fps, 25 tbr, 1200k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_vaapi))
Press [q] to stop, [?] for help
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
Conversion failed!
Last edited 5 days ago by andreyor (previous) (diff)

comment:4 Changed 3 days ago by fulinjie

Still can not reproduce with the provided input stream.
Maybe you could try the latest version of iHD driver/libva/libva-util and provide the commit id if the clips still fails.

ffmpeg -y -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i /home/linjiefu/Videos/sourceVideo/AMP_A_Samsung_4.bit -frames 500 -c:v h264_vaapi -b:v 25000k -minrate:v 25000k -maxrate:v 25000k -compression_level 4 -g 256 -bf 2 0001_4K02_1_0.h264
ffmpeg version N-93125-gdbfd042983 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
  configuration: --enable-libmfx --disable-optimizations --enable-debug=3 --disable-stripping --enable-gpl --enable-libopenh264 --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --samples=fate-suite/
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 47.100 / 58. 47.100
  libavformat    58. 26.101 / 58. 26.101
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 48.100 /  7. 48.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Input #0, hevc, from '/home/linjiefu/Videos/sourceVideo/AMP_A_Samsung_4.bit':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: hevc (Main), yuv420p(tv), 2560x1600, 25 fps, 25 tbr, 1200k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_vaapi))
Press [q] to stop, [?] for help
Output #0, h264, to '0001_4K02_1_0.h264':
  Metadata:
    encoder         : Lavf58.26.101
    Stream #0:0: Video: h264 (h264_vaapi) (High), vaapi_vld, 2560x1600, q=-1--1, 25000 kb/s, 25 fps, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.47.100 h264_vaapi
frame=   60 fps=0.0 q=-0.0 Lsize=    7998kB time=00:00:02.36 bitrate=27763.2kbits/s speed=3.62x    
video:7998kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%

Note: See TracTickets for help on using tickets.