GNOME Bugzilla – Bug 792900
Update to ffmpeg 4.0 API
Last modified: 2018-07-12 23:57:56 UTC
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888326 There are various API changes that make the build fail currently.
Is this the same as bug #789193 for 3.4 or are there additional changes from 3.4 -> 3.5 ?
More changes, yes
I did a quick and dirty port today, against 4.0, which seems to have similar ABI, it's not fully correct, and codec private config aren't implemented, but works, which is good news. At least this time dropping the deprecated top/left padding works. https://gitlab.collabora.com/nicolas/gst-ffmpeg/commit/b529e05a6ad5a8226d2fcbdcc2cde1be09e5ecba It's still manageable to support 3.4 and 3.5+ ABI, would benefit distros, as it's a bit heterogeneous.
Updating the title accordingly.
(In reply to Edward Hervey from comment #4) > Updating the title accordingly. That's ok, I didn't change it since 3.5 has the same ABI (looks like a dev release for integration).
Interesting, I was to start adding 3.4 support to my patch, and found that it's already compatible. I'll start cleaning up, and re-adding the config when they where move to codec private config.
*** Bug 795787 has been marked as a duplicate of this bug. ***
*** Bug 768279 has been marked as a duplicate of this bug. ***
*** Bug 768283 has been marked as a duplicate of this bug. ***
*** Bug 789193 has been marked as a duplicate of this bug. ***
(In reply to Nicolas Dufresne (ndufresne) from comment #6) > Interesting, I was to start adding 3.4 support to my patch, and found that > it's already compatible. I'll start cleaning up, and re-adding the config > when they where move to codec private config. Hey, what's the status on that ? :) I've been using your WIP patch for a while now, would be nice if a final version could go in :)
I could not allocate any time to that yet. It's rewriting the config system that takes time, we have been ignoring the deprecation for way too long.
I pushed a branch finalizing the port at https://github.com/MathieuDuponchelle/gst-libav/ , it doesn't use any deprecated API anymore. The changes are significant, and not backward-compatible, I've run gst-validate-launcher, no regressions :)
(In reply to Mathieu Duponchelle from comment #13) > > The changes are significant, and not backward-compatible I wouldn't worry about the backwards compatibility, but we would have to wait until 1.16 in that case. Can't be included in 1.14.
Nice work, I've went over the code and it looks quite good. I'm currently testing, here's couple of things I have found. The number of "generic" and possible none working properties is huge, we should try and reduce that. Profiles/level is done in caps, should not be exposed in properties. It's also weird to find profile on mjpeg encoder that says aac_main, aac_low, etc. Maybe a bug ? color-* + colorimetry should not be exposed as properties. Same for field-order. I wasn't sure how well the generic option interface was, clearly it's not yet as good as it should be, unless we have a bug in this branch, as so many unrelated properties get added in elements.
Created attachment 373013 [details] [review] Don't include deprecated avfiltergraph.h header
Created attachment 373014 [details] [review] Use AV_ namespace for INPUT_BUFFER_PADDING_SIZE
Created attachment 373015 [details] [review] Use AV_ namespace for all CODEC_ macro The remaining use of CODEC_ are codec flags that has been moved into the new codec private properties or have been deperated. Will be fixed in later patches.
Created attachment 373016 [details] [review] avviddec: Stop using deperated EDGE API
Created attachment 373017 [details] [review] Refactor avcfg / avvidenc We were previously installing hardcoded properties for all video encoders, refactor to instead use FFmpeg's AVOption API. avvidenc still exposes a few properties related to the pass mechanism: while the AVOption API allows specifying both passes as flags at the same time, this is not practical in GStreamer's context, where passes need to be run separately using a stats file.
Created attachment 373018 [details] [review] avaudenc: remove obsolete setting of rc_strategy
Created attachment 373019 [details] [review] Remove all uses of AVPicture
Created attachment 373020 [details] [review] avmux: port to AVCodecParameters
Created attachment 373021 [details] [review] avdemux: port to AVCodecParameters
Created attachment 373022 [details] [review] av_codec_next (deprecated) -> av_codec_iterate
Created attachment 373023 [details] [review] avauddec: remove obsolete version check
Created attachment 373024 [details] [review] av_iformat_next (deprecated) -> av_demuxer_iterate
Created attachment 373025 [details] [review] av_oformat_next (deprecated) -> av_muxer_iterate
Created attachment 373026 [details] [review] auddec: stop using deprecated getters
Created attachment 373027 [details] [review] gstav: stop calling deprecated registration methods
Created attachment 373028 [details] [review] avvidec: port to new decoding API
Created attachment 373029 [details] [review] avviddec: fix signed/unsigned comparisons
Created attachment 373030 [details] [review] avaudenc: install options generically
Created attachment 373031 [details] [review] avaudenc: further cleanup
Created attachment 373032 [details] [review] avauddec: port to new decoding API
Created attachment 373033 [details] [review] avauddec: fix remaining warnings
Created attachment 373034 [details] [review] avmux: fix remaining warnings
Created attachment 373035 [details] [review] avaudenc: port to send_frame / receive_packet
Created attachment 373036 [details] [review] avviddec: fix invalid alignment calculations. avcodec_align_dimensions2 uses context->pix_fmt to make its calculations, we thus need to make sure it is adequately set when calling it. Fixes: gst-launch-1.0 videotestsrc ! video/x-raw, width=1920, height=1080 \ ! avenc_mpeg4 ! avdec_mpeg4 ! xvimagesink This showed invalid writes under valgrind, then segfault.
Created attachment 373037 [details] [review] avvidenc: port to send_frame / receive_packet
Created attachment 373038 [details] [review] meson: stop ignoring deprecation warnings!
Created attachment 373039 [details] [review] libav: Update to n4.0.1 release
Created attachment 373040 [details] [review] configure: update libav configure args
Created attachment 373041 [details] [review] Remove obsolete scale and resample sources
Created attachment 373042 [details] [review] Update ffmpeg version requirements
Created attachment 373043 [details] [review] auddec: fix luck-based sinkpad access
Created attachment 373044 [details] [review] meson: add FFmpeg meson as a fallback
Created attachment 373045 [details] [review] avcfg: add skip support to overrides system
Created attachment 373046 [details] [review] avcfg: ignore some generic properties We expose profile, level and colorimetry / colorspaces through caps.
Attachment 373013 [details] pushed as 2485cc5 - Don't include deprecated avfiltergraph.h header Attachment 373014 [details] pushed as 7b3e41e - Use AV_ namespace for INPUT_BUFFER_PADDING_SIZE Attachment 373015 [details] pushed as aa724e2 - Use AV_ namespace for all CODEC_ macro Attachment 373016 [details] pushed as d8dfa46 - avviddec: Stop using deperated EDGE API Attachment 373017 [details] pushed as 1e4529c - Refactor avcfg / avvidenc Attachment 373018 [details] pushed as 9cc57a7 - avaudenc: remove obsolete setting of rc_strategy Attachment 373019 [details] pushed as 4f28ea2 - Remove all uses of AVPicture Attachment 373020 [details] pushed as 4116117 - avmux: port to AVCodecParameters Attachment 373021 [details] pushed as 37b58e0 - avdemux: port to AVCodecParameters Attachment 373022 [details] pushed as e4bf614 - av_codec_next (deprecated) -> av_codec_iterate Attachment 373023 [details] pushed as d059922 - avauddec: remove obsolete version check Attachment 373024 [details] pushed as bc7160d - av_iformat_next (deprecated) -> av_demuxer_iterate Attachment 373025 [details] pushed as 2ec542f - av_oformat_next (deprecated) -> av_muxer_iterate Attachment 373026 [details] pushed as 1035d6c - auddec: stop using deprecated getters Attachment 373027 [details] pushed as c214205 - gstav: stop calling deprecated registration methods Attachment 373028 [details] pushed as d191fb2 - avvidec: port to new decoding API Attachment 373029 [details] pushed as 965cd81 - avviddec: fix signed/unsigned comparisons Attachment 373030 [details] pushed as 59b9e66 - avaudenc: install options generically Attachment 373031 [details] pushed as 8f3bc07 - avaudenc: further cleanup Attachment 373032 [details] pushed as 6243197 - avauddec: port to new decoding API Attachment 373033 [details] pushed as 066acfa - avauddec: fix remaining warnings Attachment 373034 [details] pushed as 3e8709d - avmux: fix remaining warnings Attachment 373035 [details] pushed as 8562f10 - avaudenc: port to send_frame / receive_packet Attachment 373036 [details] pushed as be9b696 - avviddec: fix invalid alignment calculations. Attachment 373037 [details] pushed as 8f15438 - avvidenc: port to send_frame / receive_packet Attachment 373038 [details] pushed as fb9b70c - meson: stop ignoring deprecation warnings! Attachment 373039 [details] pushed as 3b65971 - libav: Update to n4.0.1 release Attachment 373040 [details] pushed as aedcf43 - configure: update libav configure args Attachment 373041 [details] pushed as 8b6516d - Remove obsolete scale and resample sources Attachment 373042 [details] pushed as f42ce26 - Update ffmpeg version requirements Attachment 373043 [details] pushed as e1d0d73 - auddec: fix luck-based sinkpad access Attachment 373044 [details] pushed as b3dc5c2 - meson: add FFmpeg meson as a fallback Attachment 373045 [details] pushed as 9c0dd8e - avcfg: add skip support to overrides system Attachment 373046 [details] pushed as c34dd9b - avcfg: ignore some generic properties