After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 574725 - avenc_dnxhd: Undocumented restrictions to width/height/framerate/bitrate settings
avenc_dnxhd: Undocumented restrictions to width/height/framerate/bitrate sett...
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 580573 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-03-10 08:48 UTC by Sebastian Dröge (slomo)
Modified: 2018-11-03 12:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2009-03-10 08:48:26 UTC
Hi,
ffenc_dnxhd only allows some very restrictive width/height/framerate/bitrate settings, see libavcodec/dnxhddata.c the ff_dnxhd_cid_table.

We should document this and specify this in the caps and tell the ffmpeg people to simply choose the nearest possible bitrate instead or requiring a bitrate the exactly fits with the width/height/framerate combination.
Comment 1 Sebastian Dröge (slomo) 2009-03-10 09:25:45 UTC
The allowed profiles are listed also on http://itbroadcastanddigitalcinema.com/ffmpeg_howto.html#Encoding_VC-3
Comment 2 Sebastian Dröge (slomo) 2009-03-16 09:47:35 UTC
https://roundup.ffmpeg.org/roundup/ffmpeg/issue909
Comment 3 Edward Hervey 2009-03-16 11:56:59 UTC
Actually... the dnxhd AVCodec has the proper PixFmt in pix_fmts.

The code in gstffmpegenc's getcaps implementation was slightly wrong in that regards, I've got a patch for that in #575545

Then it would only leave the bitrate issue.
Comment 4 Sebastian Dröge (slomo) 2009-03-16 13:25:51 UTC
Does it also have the correct width/height/framerate combinations?
Comment 5 Edward Hervey 2009-03-16 14:24:14 UTC
where ?

in ffmpeg, no

in gst-ffmpeg, we only hardcode the width/height (currently to 1920x1080). We could add the various 'exact' combinations.

Only the following combinations seem acceptable:
* 1920x1080 interlaced : 30000/1001 and 25/1
* 1920x1080 progressive : 24000/10001, 24, 25, 30000/1001
* 1280x720 progressive : 24000/1001, 25, 60000/1001 (yes, really)
Comment 6 Sebastian Dröge (slomo) 2009-03-16 15:28:52 UTC
Ok, sounds good then :)
Comment 7 Sebastian Dröge (slomo) 2009-04-02 10:41:12 UTC
Hm, there's even more interesting stuff :)

    if (buf_size < ctx->cid_table->frame_size) {
        av_log(avctx, AV_LOG_ERROR, "output buffer is too small to compress picture\n");
        return -1;
    }


And this actually happens...
Comment 8 Sebastian Dröge (slomo) 2009-04-28 12:41:32 UTC
*** Bug 580573 has been marked as a duplicate of this bug. ***
Comment 9 Christian Fredrik Kalager Schaller 2011-05-26 09:43:39 UTC
Noticed that 575545 has been closed and fixed. What is remaining on this one?
Comment 10 Sebastian Dröge (slomo) 2011-05-26 09:45:57 UTC
The framerate restrictions are not there yet and the interesting frame_size/buf_size restriction is not handled either.
Comment 11 Tim-Philipp Müller 2012-12-13 23:57:11 UTC
The input format and width/height restrictions seem to be there now:

    Capabilities:
      video/x-raw
                  width: 1920
                 height: 1080
              framerate: [ 0/1, 2147483647/1 ]
                 format: { Y42B, I422_10LE }
      video/x-raw
                  width: 1280
                 height: 720
              framerate: [ 0/1, 2147483647/1 ]
                 format: { Y42B, I422_10LE }

What's missing:

 - for 1280x720 only progressive is allowed - does libav provide this info?

 - framerates? (no restrictions provided it seems?)

 - anything else?
Comment 12 Sebastian Dröge (slomo) 2012-12-17 09:36:33 UTC
libav doesn't provide any information on top of these, and apparently the restrictions are even more complicated than what Edward mentioned in comment #5.

For there are a few width/height/depth/interlacedness combinations that are allowed, and for each of these only a fixed number of bitrates is allowed. I don't see any framerate restrictions in the code.
Not sure what to do about this
Comment 13 Edward Hervey 2013-07-17 12:28:51 UTC
We really need to be able to query libav on what input formats are accepted for a specific formats. Otherwise we'll just end up copying again-and-again everything.
Comment 14 GStreamer system administrator 2018-11-03 12:55:05 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-libav/issues/2.