Build fail with ffmpeg 3.0 and --avformat-vdpau
Brought to you by:
ddennedy,
lilo_booter
Hi,
mlt 6.0.0 doesn't build against ffmpeg 3.0 if build with --avformat-vdpau
I've removed warnings related to deprecated functions.
In file included from producer_avformat.c:141:0: vdpau.c: In function ‘vdpau_get_buffer’: vdpau.c:159:9: error: ‘AVFrame {aka struct AVFrame}’ has no member named ‘type’ frame->type = FF_BUFFER_TYPE_USER; ^ vdpau.c:159:18: error: ‘FF_BUFFER_TYPE_USER’ undeclared (first use in this function) frame->type = FF_BUFFER_TYPE_USER; ^ vdpau.c:159:18: note: each undeclared identifier is reported only once for each function it appears in In file included from producer_avformat.c:141:0: vdpau.c:162:14: error: ‘AVFrame {aka struct AVFrame}’ has no member named ‘reference’ if ( frame->reference ) ^ In file included from producer_avformat.c:141:0: vdpau.c: In function ‘vdpau_decoder_init’: vdpau.c:236:19: error: ‘AVCodecContext {aka struct AVCodecContext}’ has no member named ‘get_buffer’ self->video_codec->get_buffer = vdpau_get_buffer; ^ vdpau.c:237:19: error: ‘AVCodecContext {aka struct AVCodecContext}’ has no member named ‘release_buffer’ self->video_codec->release_buffer = vdpau_release_buffer;
I will proably resolve this by removing support for VDPAU. If you do not like that resolution, I require someone to provide a patch.
It's your code...
So I tried my hand in making a patch for this. I wound up with something that compiles -- but I'm not sure how to test it. I'm not sure I understand the mechanics well enough to be sure I'm managing the buffers right, either. The documentation for ffmpeg is woefully incomplete and I'm not really very familiar with video processing.
I'll attach what I have, but can someone take a look and make suggestions for testing?
Thank you for your work, I'm desperate not to be able to use vdpau with melt (and kdenlive).
I've just tried your patch (mlt 6.4.1, ffmpeg 3.2.2), with this command line
melt compet.mp4 -debug 2>&1 | grep vdpau
I have a white screen and those messages
[h264_vdpau @ 0x1aa8b00] nal_unit_type: 7, nal_ref_idc: 3
[h264_vdpau @ 0x1aa8b00] nal_unit_type: 8, nal_ref_idc: 3
[h264_vdpau @ 0x1aa8b00] nal_unit_type: 6, nal_ref_idc: 0
[h264_vdpau @ 0x1aa8b00] nal_unit_type: 5, nal_ref_idc: 3
[h264_vdpau @ 0x1aa8b00] user data:"x264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x11
3 me=hex subme=4 psy=1 psy_rd=1,00:0,00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=1 lookahead_threads=1 sliced_thre
ads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=120 keyint_min=12 scenecut=40
intra_refresh=0 rc_lookahead=20 rc=crf mbtree=1 crf=23,0 qcomp=0,60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1,40 aq=1:1,00"
[h264_vdpau @ 0x1aa8b00] Reinit context to 1920x1088, pix_fmt: vdpau_h264
vdpau_get_buffer
[h264_vdpau @ 0x1aa8b00] no picture
[h264_vdpau @ 0x1aa8b00] nal_unit_type: 1, nal_ref_idc: 2
vdpau_get_buffer
[h264_vdpau @ 0x1aa8b00] no picture
[h264_vdpau @ 0x1aa8b00] nal_unit_type: 1, nal_ref_idc: 2
vdpau_get_buffer
[h264_vdpau @ 0x1aa8b00] nal_unit_type: 1, nal_ref_idc: 0
vdpau_get_buffer
[h264_vdpau @ 0x1aa8b00] get_buffer() failed
[h264_vdpau @ 0x1aa8b00] thread_get_buffer() failed
[h264_vdpau @ 0x1aa8b00] decode_slice_header error
[h264_vdpau @ 0x1aa8b00] no frame!
[h264_vdpau @ 0x1aa8b00] nal_unit_type: 1, nal_ref_idc: 0
vdpau_get_buffer
[h264_vdpau @ 0x1aa8b00] get_buffer() failed
[h264_vdpau @ 0x1aa8b00] thread_get_buffer() failed
[h264_vdpau @ 0x1aa8b00] decode_slice_header error
[h264_vdpau @ 0x1aa8b00] no frame!
[h264_vdpau @ 0x1aa8b00] nal_unit_type: 1, nal_ref_idc: 2
vdpau_get_buffer
[h264_vdpau @ 0x1aa8b00] get_buffer() failed
[h264_vdpau @ 0x1aa8b00] thread_get_buffer() failed
[h264_vdpau @ 0x1aa8b00] decode_slice_header error
[h264_vdpau @ 0x1aa8b00] no frame!
[h264_vdpau @ 0x1aa8b00] nal_unit_type: 1, nal_ref_idc: 2
[h264_vdpau @ 0x1aa8b00] Frame num gap 4 2
vdpau_get_buffer
[h264_vdpau @ 0x1aa8b00] get_buffer() failed
[h264_vdpau @ 0x1aa8b00] thread_get_buffer() failed
[h264_vdpau @ 0x1aa8b00] decode_slice_header error
[h264_vdpau @ 0x1aa8b00] no frame!
[h264_vdpau @ 0x1aa8b00] nal_unit_type: 1, nal_ref_idc: 0
[h264_vdpau @ 0x1aa8b00] Frame num gap 5 2
vdpau_get_buffer
[h264_vdpau @ 0x1aa8b00] get_buffer() failed
[h264_vdpau @ 0x1aa8b00] thread_get_buffer() failed
[h264_vdpau @ 0x1aa8b00] decode_slice_header error
[h264_vdpau @ 0x1aa8b00] no frame!
[h264_vdpau @ 0x1aa8b00] nal_unit_type: 1, nal_ref_idc: 0
[h264_vdpau @ 0x1aa8b00] Frame num gap 5
Hmm. I'm afraid I'm not sure what steps to try next. I'm just not familiar enough with ffmpeg and mlt. There was some code in there that involved reference counting, but that whole system has changed and I'm not sure what replaced it.