libavcodec doesn't decode Theora
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ffmpeg (Ubuntu) |
Undecided
|
Unassigned |
Bug Description
Binary package hint: ffmpeg
The current version of libavcodec is old (doesn't export the function avcodec_
Simply use the avcodec API to try to read a frame with the function avcodec_
Testing the same code against a newer version of libavcodec (from the FFmpeg website) is ok, Theora streams work (plus the avcodec_
Emanem (emaentra) wrote : | #2 |
Hi, the bug is confirmed by other users as well: http://
The problem is present for sure when you load libavcodec as a dynamic library. For some reason this version of libavcodec.so is not able to decode Theora video.
If you want I can attach a piece of code that will show you that every other format is being decoded but Theora.
Cheers,
On Mi, Feb 17, 2010 at 09:28:36 (CET), Emanem wrote:
yes, code examples would help to further examine this issue, but please
consider doing so on the upstream mailing lists and propose a fix for
inclusion into the 0.5 branches.
lucid will not be updated to current trunk. Lucid+1 has chances to get
updated to a 0.6 release branch once that is created.
--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4
Emanem (emaentra) wrote : | #4 |
Ok, what is the upstream mailing list?
Thanks again,
Emanem (emaentra) wrote : | #6 |
I already sent them a mail.
Now, what do I have to do to convince you of this issue in current Ubuntu distribution?
Post the source code (so you can compile and verify yourself) would be ok?
Cheers,
Reinhard Tartler (siretart) wrote : | #7 |
attaching a clean example could help to understand the issue, but
without a seeing what exact changes you request, I cannot promise
anything.
Emanem (emaentra) wrote : | #8 |
I've attached a simple source that, given the name of a video file, will print the first 10 frames (as ppm).
To compile you'll need the following packages installed:
libavcodec-dev
Compile with:
g++ ./avcodec_
example use:
./av_sample ./my.video.ogv
On Ubuntu 9.10 x86-64 all video streams (vob,mov,
Reinhard Tartler (siretart) wrote : | #9 |
for the theora sample I have on my laptop, I get this output:
siretart@
ffprobe /srv/media/
FFprobe version SVN-r20090707, Copyright (c) 2007-2009 Stefano Sabatini
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
built on Jan 19 2010 21:59:04, gcc: 4.4.3 20100116 (prerelease)
[theora @ 0x8412270]7 bits left in packet 82
Input #0, ogg, from '/srv/media/
Duration: 00:04:56.33, start: 0.000000, bitrate: 5477 kb/s
Stream #0.0: Invalid Codec type -1
Stream #0.1: Video: theora, yuv420p, 1024x768, PAR 1:1 DAR 4:3, 24 tbr, 24 tbn, 24 tbc
Unsupported codec (id=0) for input stream 0
[theora @ 0x8412270]7 bits left in packet 82
moreover, 10 non-garbled ppm files gets created for me.
perhaps either I or you have a funky theora file to test. Perhaps you
get better results by using the 'libtheora' codec instead of the
'theora' one?
In any case, this is not the right forum to discuss such
questions. Please try on the libav-user mailing list.
--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4
Emanem (emaentra) wrote : | #10 |
Hi Reinhard,
I'm sorry to post again but this issue is affecting Ubuntu 9.10 32 bit as well.
On a clean virtual machine (so no strange things/
sudo apt-get install g++ libavcodec-dev libavformat-dev libswscale-dev
Then I compiled the test app:
g++ ./avcodec_
And I used against this reference:
http://
(this is an ogv file created by Theora devs)
./av_test ./matrix-300-AQ.ogv
Again, I had same results as before, corrupted ppm.
Please bear in mind that I've done this with a clean Ubuntu 9.10 32bit host.
Regards,
Emanem (emaentra) wrote : | #11 |
Update:
without recompiling the test executable (so it gets compiled against the default Ubuntu libraries/shared objects), but using the latest shared objects compiled from svn ffmpeg code cut, theora decoding does work.
Again I hope this is not only sufficient but you can consider it as definitive proof of what is happening:
with:
default libav*.so.* from Ubuntu ==> doesn't work
latest svn cut libav*.so.* from ffmpeg website ==> does work
Again I didn't recompile the executable, just changed the shared objects.
Regards,
Reinhard Tartler (siretart) wrote : | #12 |
On Fr, Feb 19, 2010 at 10:10:42 (CET), Emanem wrote:
> And I used against this reference:
> http://
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://
note that there are already a lot of other open issues with avcodecs
theora decoder.
--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4
Emanem (emaentra) wrote : | #13 |
Ah-ah, so basically you're saying that the current Theora decoder (exposed via libavcodec.so) in Ubuntu is broken because it doesn't support the finalized Theora video stream?
That file is not broken, according to Theora devs this file is done against the finalized Theora format (and I guess they know what they're talking about).
Again, I'm not saying that in Ubuntu you can't playback that file, just you can't with libavcodec that is shipping.
So I would guess that a lot of other players that use libavcodec are statically linked to an updated version.
I've already reported to ffmpeg. Actually is not an issue because this has already been fixed.
My question is, when will Ubuntu update libavcodec (and all other utility libraries that ship with it)?
On a side note, if all other video software would be dynamically linked to libavcodec maybe we would see this issue more frequently.
Cheers,
Reinhard Tartler (siretart) wrote : | #14 |
On Fr, Feb 19, 2010 at 15:58:35 (CET), Emanem wrote:
> Ah-ah, so basically you're saying that the current Theora decoder
> (exposed via libavcodec.so) in Ubuntu is broken because it doesn't
> support the finalized Theora video stream?
libavcodec.so exposes 2 decoders for theora. An internal one and a
wrapper for libtheora. I assume that libtheora is able to playback that
particular file.
> That file is not broken, according to Theora devs this file is done
> against the finalized Theora format (and I guess they know what
> they're talking about).
I didn't claim it broken
> Again, I'm not saying that in Ubuntu you can't playback that file,
> just you can't with libavcodec that is shipping.
I'd rather argue that libavcodec picks the internal decoder by default,
which fails to playback that file. What is so special about this file,
and why do other theora files work? I can only guess that it uses a
colorspace format that libswscale or libavcodec doesn't handle correctly.
> So I would guess that a lot of other players that use libavcodec are
> statically linked to an updated version.
we avoid statically linked players in ubuntu.
> I've already reported to ffmpeg. Actually is not an issue because this
> has already been fixed.
references please, which roundup issue are you talking about? I can
reproduce the problem with your file with current trunk, and I haven't
read you on libav-user mailing list either.
> My question is, when will Ubuntu update libavcodec (and all other
> utility libraries that ship with it)?
as soon as good fix is known
> On a side note, if all other video software would be dynamically linked
> to libavcodec maybe we would see this issue more frequently.
This issue has nothing to do with static vs. dynamic linking.
--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4
Emanem (emaentra) wrote : | #15 |
Hi, about this file, it has been encoded with latest libtheora (1.1).
Regarding avcodec, do you know how can I tell it to use libtheora instead of the internal?
Because looking into the sources I can only see one codec id defined:
http://
And apparently it's only one available that I can choose.
How can I choose the external?
Regarding the email to ffmpeg list, I've sent one a couple of days ago. If they didn't bother to answer, honestly, is not my fault.
Add the fact that the most recent release of ffmpeg libraries don't have any issues, I'm assuming they consider it a non issue.
Cheers,
this bug as such is invalid, as I have theora material on my laptop that plays just fine with ubuntu's ffplay.
as for avcodec_ decode_ video2, yes, it was added by this commit:
------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --
r18351 | rbultje | 2009-04-07 17:59:50 +0200 (Di, 07. Apr 2009) | 9 Zeilen
Implement avcodec_ decode_ video2( ), _audio3() and _subtitle2() which takes an
AVPacket argument rather than a const uint8_t *buf + int buf_size. This allows
passing of packet-specific flags from demuxer to decoder, such as the keyframe
flag, which appears necessary to playback corePNG P-frames.
Patch by Thilo Borgmann thilo.borgmann googlemail com, see also the thread ------- ------- ------- ------- ------- ------- ------- ------- ------- -
"Google Summer of Code participation" on the mailinglist.
-------
it will be included in ffmpeg 0.6, but lucid will got with ffmpeg 0.5.
as ffplay does work just fine, I'm marking this bug as invalid for ubuntu. It might be valid for upstream, though. Please discuss it there, this issue should be fixed there (e.g. in the 0.5 release branch) anyways.