Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Broken Theora support (libavcodec)

  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.

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

    Re: Broken Theora support (libavcodec)

    Hi mate,

    I've been able to reproduce the issue even on vanilla 9.10 i386, on a virtual machine...
    Btw I do not have the libav*-extra installed neither on my main x86-64 neither on the virtualized i386.

    I have installed (on both architectures):
    libavcodec-dev

    Really hopefully this should bring some attention.

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

    Unhappy Re: Broken Theora support (libavcodec)

    Reinhard wrote ( https://bugs.launchpad.net/ubuntu/+s...eg/+bug/522812 ):
    On Fr, Feb 19, 2010 at 10:10:42 (CET), Emanem wrote:

    > And I used against this reference:
    > http://web.mit.edu/xiphmont/Public/t...rix-300-AQ.ogv

    this file is broken even with current trunk of ffmpeg, so updating
    ffmpeg would not help anyways.

    please report it upstream using these guidelines:
    http://ffmpeg.org/bugreports.html

    note that there are already a lot of other open issues with avcodecs
    theora decoder.
    So, as seen as that file ( http://web.mit.edu/xiphmont/Public/t...rix-300-AQ.ogv ) is not broken (according to Theora devs that file is made against the finalized Theora video stream format) libavcodec and the other ffmpeg libraries (I suppose) are broken in current Ubuntu packages.
    Or better, it doesn't support the finalized Theora format...
    Why are you able to playback that file with other players? Because probably those players are statically linked against an updated version of libavcodec...

    As I wrote over there, when are we going to support the finalized format of Theora through libavcodec in Ubuntu?

    Should the fact that Theora is the open source format should catch special attention of maintainers?

    Cheers,

  9. #9
    Join Date
    Jun 2007
    Beans
    17,337

    Re: Broken Theora support (libavcodec)

    The ffmpeg ver. in karmic and lucid cannot decode video encoded with the new theora - libtheora-1.1.X (has nothing to extra or not

    This has been discussed on launchpad previously for karmic and there is no intention of using a newer ffmpeg version for either karmic or lucid.

    ( The 0.5 vs. 0.6 arg. is a bit of a mystery, the version used now is 0.5+svn20090706, there is actually no great reason why +svnXXXXXXXX can't be moved forward - while the benefit of doing that may be minimal to gstreamer apps/plugins it would be seen in vlc, mplayer, and some other apps, both in repo and ppa versions.


    What you may wish to try is to build the karmic/lucid ffmpeg source off of the newer libtheora-1.1, and see if it makes a difference, don't know here as I don't use the repo supplied ffmpeg or the shared libs, (odds are it won't

    (I always replace the shared once per install with newer deb packages, ffmpeg itself is updated quite often

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

    Arrow Re: Broken Theora support (libavcodec)

    Thanks for confirmation...
    This makes sense, as seen as I'm able to encode/decode with a lot of software which links to libavcodec statically or use other libraries to encode/decode video.

    But what you call new theora is the finalized format/bitstream.
    So actually I guess that not ffmpeg, but the underlying libraries should be updated.

    Cheers,

Page 1 of 2 12 LastLast

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
  •