ffmpeg failed to convert between the formats using VAAPI with Intel GPU when decode streams

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ffmpeg failed to convert between the formats using VAAPI with Intel GPU when decode streams

Davie Kim
Hi, I am using vaapi with Intel GPU(Iris Pro Graphics P580) to decode/encode streams,
but failed with the following message listed as 4,please give me some advice to help solve this。

1、 ffmpeg command:

ffmpeg -init_hw_device  vaapi=intel:/dev/dri/renderD128 -hwaccel_device intel -filter_hw_device intel  -hwaccel vaapi   \
-i ${overlay} \
-i ${pic1} \
-filter_complex " \
[1:v] setpts=PTS-STARTPTS,setsar=sar=1/1,split [p1-lay][p2-lay];\
color=c=white:s=${width}x${height},split[p1-back][p2-back];\
[p1-back] trim=start_frame=0:end_frame=284 [p1-back];\
[p1-lay] trim=start_frame=0:end_frame=284, scale=w='if(gte(iw/ih,${p1_w}/${p1_h}),-1,${p1_w})':h='if(gte(iw/ih,${p1_w}/${p1_h}),${p1_h},-1)',crop=${p1_w}:${p1_h}[p1-lay];\
[p1-back][p1-lay] overlay=x=${p1_x}:y=${p1_y},fade=t=out:s=275:n=10:c=white[p1];\
[p2-back] trim=start_frame=0:end_frame=102 [p2-back];\
[p2-lay] trim=start_frame=0:end_frame=102, scale=w='if(gte(iw/ih,${p2_w}/${p2_h}),-1,${p2_w})':h='if(gte(iw/ih,${p2_w}/${p2_h}),${p2_h},-1)',crop=${p2_w}:${p2_h}[p2-lay];\
[p2-back][p2-lay] overlay=x=${p2_x}:y=${p2_y},fade=t=in:s=0:n=20:c=white[p2];\
[p1][p2] concat=2[base];\
[base][0:v] overlay
" -i ${audio} -c:v h264_vaapi -movflags faststart  -c:a libfdk_aac   $output 2>>$err

2、And ${overlay} are PNG files.

3、vainfo output:

error: can't connect to X server!
libva info: VA-API version 1.4.1
libva info: va_getDriverName() returns 0
libva info: User requested driver 'i965'
libva info: Trying to open /opt/intel/mediasdk/lib64/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.4 (libva 2.1.1.pre1)
vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 2.3.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointStats
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264Main               : VAEntrypointFEI
      VAProfileH264Main               : VAEntrypointStats
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointFEI
      VAProfileH264High               : VAEntrypointStats
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice

4、fail message output by FFmpeg:

ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-36)
  configuration: --prefix=/usr/local/ffmpeg4.1.0_build --extra-cflags=-I/usr/local/ffmpeg4.1.0_build/include --extra-ldflags=-L/usr/local/ffmpeg4.1.0_build/lib --bindir=/usr/local/ffmpeg4.1.0_build/bin --extra-libs=-lpthread --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-pthreads --enable-libass --enable-libfontconfig
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, image2, from '/root/xuantu-test/xuantu-scripts-master-hwaccl/material/xts1p01/overlay720/1_%05d.png':
  Duration: 00:00:15.44, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgba(pc), 720x1280 [SAR 1:1 DAR 9:16], 25 fps, 25 tbr, 25 tbn, 25 tbc
Input #1, image2, from '/root/xuantu-test/xuantu-scripts-master-hwaccl/material/xts1p01/input/test.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 92147 kb/s
    Stream #1:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 720x640 [SAR 1:1 DAR 9:8], 25 tbr, 25 tbn, 25 tbc
[mp3 @ 0x2cc4fc0] Estimating duration from bitrate, this may be inaccurate
Input #2, mp3, from '/root/xuantu-test/xuantu-scripts-master-hwaccl/material/xts1p01/audio.mp3':
  Metadata:
    date            : 2019-01-23 14:58
    id3v2_priv.XMP  : <?xpacket begin="\xef\xbb\xbf" id="W5M0MpCehiHzreSzNTczkc9d"?>\x0a<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c143 79.161210, 2017/08/11-10:28:36        ">\x0a <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">\x0a  <rdf
  Duration: 00:00:16.16, start: 0.000000, bitrate: 132 kb/s
    Stream #2:0: Audio: mp3, 48000 Hz, stereo, fltp, 128 kb/s
Stream mapping:
  Stream #0:0 (png) -> overlay:overlay (graph 0)
  Stream #1:0 (mjpeg) -> setpts (graph 0)
  overlay (graph 0) -> Stream #0:0 (h264_vaapi)
  Stream #2:0 -> #0:1 (mp3 (mp3float) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
[image2 @ 0x2cbcf40] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
Impossible to convert between the formats supported by the filter 'Parsed_overlay_18' and the filter 'auto_scaler_4'
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!

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg failed to convert between the formats using VAAPI with Intel GPU when decode streams

Carl Eugen Hoyos-2
Am So., 12. Mai 2019 um 12:01 Uhr schrieb Davie Kim <[hidden email]>:

>
> Hi, I am using vaapi with Intel GPU(Iris Pro Graphics P580) to decode/encode streams,
> but failed with the following message listed as 4,please give me some advice to help solve this。
>
> 1、 ffmpeg command:
>
> ffmpeg -init_hw_device  vaapi=intel:/dev/dri/renderD128 -hwaccel_device intel -filter_hw_device intel  -hwaccel vaapi   \
> -i ${overlay} \
> -i ${pic1} \
> -filter_complex " \
> [1:v] setpts=PTS-STARTPTS,setsar=sar=1/1,split [p1-lay][p2-lay];\
> color=c=white:s=${width}x${height},split[p1-back][p2-back];\
> [p1-back] trim=start_frame=0:end_frame=284 [p1-back];\
> [p1-lay] trim=start_frame=0:end_frame=284, scale=w='if(gte(iw/ih,${p1_w}/${p1_h}),-1,${p1_w})':h='if(gte(iw/ih,${p1_w}/${p1_h}),${p1_h},-1)',crop=${p1_w}:${p1_h}[p1-lay];\
> [p1-back][p1-lay] overlay=x=${p1_x}:y=${p1_y},fade=t=out:s=275:n=10:c=white[p1];\
> [p2-back] trim=start_frame=0:end_frame=102 [p2-back];\
> [p2-lay] trim=start_frame=0:end_frame=102, scale=w='if(gte(iw/ih,${p2_w}/${p2_h}),-1,${p2_w})':h='if(gte(iw/ih,${p2_w}/${p2_h}),${p2_h},-1)',crop=${p2_w}:${p2_h}[p2-lay];\
> [p2-back][p2-lay] overlay=x=${p2_x}:y=${p2_y},fade=t=in:s=0:n=20:c=white[p2];\
> [p1][p2] concat=2[base];\
> [base][0:v] overlay
> " -i ${audio} -c:v h264_vaapi -movflags faststart  -c:a libfdk_aac   $output 2>>$err

Please test current FFmpeg git head (nothing else is supported here),
simplify your
command line and remove the variables if it still fails.
(There may be a "format" filter missing but above is quite complex.)

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg failed to convert between the formats using VAAPI with Intel GPU when decode streams

Davie Kim
Thank you ,Carl, here is my simplified command which failed with the same reason:

ffmpeg -init_hw_device  vaapi=intel:/dev/dri/renderD128  \
-hwaccel_device intel -filter_hw_device intel  -hwaccel vaapi   \
-i png_files \
-i single_picture \
-filter_complex " \
[1:v] setpts=PTS-STARTPTS,setsar=sar=1/1,split [p1-lay][p2-lay];\
[p1-lay][p2-lay] overlay
" -i audio_file -c:v h264_vaapi -movflags faststart  -c:a libfdk_aac   output_file
On 05/12/2019 18:54,Carl Eugen Hoyos<[hidden email]><mailto:[hidden email]> wrote:
Am So., 12. Mai 2019 um 12:01 Uhr schrieb Davie Kim <[hidden email]>:

Hi, I am using vaapi with Intel GPU(Iris Pro Graphics P580) to decode/encode streams,
but failed with the following message listed as 4,please give me some advice to help solve this。

1、 ffmpeg command:

ffmpeg -init_hw_device  vaapi=intel:/dev/dri/renderD128 -hwaccel_device intel -filter_hw_device intel  -hwaccel vaapi   \
-i ${overlay} \
-i ${pic1} \
-filter_complex " \
[1:v] setpts=PTS-STARTPTS,setsar=sar=1/1,split [p1-lay][p2-lay];\
color=c=white:s=${width}x${height},split[p1-back][p2-back];\
[p1-back] trim=start_frame=0:end_frame=284 [p1-back];\
[p1-lay] trim=start_frame=0:end_frame=284, scale=w='if(gte(iw/ih,${p1_w}/${p1_h}),-1,${p1_w})':h='if(gte(iw/ih,${p1_w}/${p1_h}),${p1_h},-1)',crop=${p1_w}:${p1_h}[p1-lay];\
[p1-back][p1-lay] overlay=x=${p1_x}:y=${p1_y},fade=t=out:s=275:n=10:c=white[p1];\
[p2-back] trim=start_frame=0:end_frame=102 [p2-back];\
[p2-lay] trim=start_frame=0:end_frame=102, scale=w='if(gte(iw/ih,${p2_w}/${p2_h}),-1,${p2_w})':h='if(gte(iw/ih,${p2_w}/${p2_h}),${p2_h},-1)',crop=${p2_w}:${p2_h}[p2-lay];\
[p2-back][p2-lay] overlay=x=${p2_x}:y=${p2_y},fade=t=in:s=0:n=20:c=white[p2];\
[p1][p2] concat=2[base];\
[base][0:v] overlay
" -i ${audio} -c:v h264_vaapi -movflags faststart  -c:a libfdk_aac   $output 2>>$err

Please test current FFmpeg git head (nothing else is supported here),
simplify your
command line and remove the variables if it still fails.
(There may be a "format" filter missing but above is quite complex.)

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".