Results 1 to 10 of 20

Thread: Broken Theora support (libavcodec)

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Location
    London, UK
    Beans
    202
    Distro
    Ubuntu 12.04 Precise Pangolin

    Exclamation Broken Theora support (libavcodec)

    Hi guys,

    while writing this application ( http://qpsnr.youlink.org/ ) I noticed that Theora video streams are broken with current version of libavcodec library.
    I opened a bug here: https://bugs.launchpad.net/ubuntu/+s...eg/+bug/522812
    Apparently I have the same issue even on fresh virtualized environments.
    To reproduce the issue, do the following:
    1) Download http://launchpadlibrarian.net/393584...dec_sample.cpp
    2) Install sudo apt-get install g++ libavcodec-dev libavformat-dev libswscale-dev
    3) Compile g++ ./avcodec_sample.cpp -o av_test -O2 -g -pthread -lavformat -lavcodec -lswscale
    4) Download a reference OGV http://web.mit.edu/xiphmont/Public/t...rix-300-AQ.ogv
    5) Execute ./av_test ./matrix-300-AQ.ogv
    Now, you should have in your directory 10 corrupted ppm images (that should be the first 10 frames of the ogv file). If instead you run ./av_test any_other_video_type you should get the first 10 frames of the video file. It does work for all other formats but for Theora streams.

    Is there anyone able/willing to confirm this?

    Thanks in advance,
    Regards.

  2. #2
    Join Date
    Sep 2009
    Beans
    401
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Broken Theora support (libavcodec)

    Quote Originally Posted by Emanuele_Z View Post
    5) Execute ./av_test ./matrix-300-AQ.ogv
    Now, you should have in your directory 10 corrupted ppm images (that should be the first 10 frames of the ogv file).
    This command should yield the same result:
    Code:
    ffmpeg -vframes 10 -i matrix-300-AQ.ogv frame%d.ppm
    As you have seen in your bug report, people may tend to dispute the validity of your code rather than the validity of libavcodec. If you can showcase the bug with a standard tool such as ffmpeg, it will be easier to convince reviewers that the bug is in fact in the library rather than in your code.

  3. #3
    Join Date
    Nov 2008
    Location
    London, UK
    Beans
    202
    Distro
    Ubuntu 12.04 Precise Pangolin

    Exclamation Re: Broken Theora support (libavcodec)

    Quote Originally Posted by VertexPusher View Post
    This command should yield the same result:
    Code:
    ffmpeg -vframes 10 -i matrix-300-AQ.ogv frame%d.ppm
    As you have seen in your bug report, people may tend to dispute the validity of your code rather than the validity of libavcodec. If you can showcase the bug with a standard tool such as ffmpeg, it will be easier to convince reviewers that the bug is in fact in the library rather than in your code.
    I see, but the point is that my code is what is recommended by the libavcodec API, plus is short and compact. And, most of all, I'm sure that with my code I'm using libavcodec dynamically plus it works 100% with all other video streams (mpeg, mpeg2, mpeg4,wmv,flv,...).

    Actually, it's very simple code, just for the purpose to show the bug.
    Clearly it takes less than 5 minutes to spot any bug there.
    Naturally if there's an error in API usage, please do tell me.

    Cheers,

  4. #4
    Join Date
    Sep 2009
    Beans
    401
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Broken Theora support (libavcodec)

    I'm not saying that your code is wrong. But your bug report will have more impact if you make confirmation of the bug as easy as possible.

  5. #5
    Join Date
    Nov 2008
    Location
    London, UK
    Beans
    202
    Distro
    Ubuntu 12.04 Precise Pangolin

    Lightbulb Re: Broken Theora support (libavcodec)

    UPDATE:

    without recompiling the test executable, but recompiling the shared objects (libav*.so) from the latest cut of ffmpeg svn source code, it does work.
    Basically, once recompiled all the libav*.so.* libraries, just put them in the path of the test executable and
    export LD_LIBRARY_PATH=`pwd`
    Magically the executable will now properly decode Theora video streams!
    If changing the libraries (again without touching the executable) makes it work, am I wrong saying that the libav*.so.* libraries used in Ubuntu are broken?
    Honestly this is prof that against the default libav*.so.* theora streams can't be decoded with libavcodec.
    I'll post this on the bug report as well, hopefully this time it will be taken into account.

    Cheers,

  6. #6
    Join Date
    Sep 2009
    Beans
    401
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Broken Theora support (libavcodec)

    I think the reason why Reinhard is unable to confirm the bug is because he is using libavcodec52 instead of libavcodec-extra-52 (multiverse). I already mentioned this in the other thread.

    I have not tested libavcodec52, but with libavcodec-extra-52 I can easily reproduce the problem with ffmpeg on the command line.

    Which libavcodec package have you installed? Maybe you should add this info to the bug report as well.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •