Id Kong
2010-Feb-12 13:15 UTC
[theora-dev] Ogg files incompatible, was: Video encoded using libtheora-1.1.1 and libogg-1.1.4 plays too fast...
> Date: Thu, 11 Feb 2010 10:54:01 -0500 > From: tterribe at email.unc.edu > CC: theora-dev at xiph.org > > > This resulted in a slight larger file but no discernible difference in > > the movie play length. It''s certainly not playing the expected duration. > > What do you think? > > Since you''re just compressing the same frame over and over again, what > you''re likely getting is a keyframe followed by a bunch of zero-byte > packets, which is Theora''s cheap way of saying "keep showing the last > frame". Some (broken) players treat these as semantically different, > however, and will end playback early when they appear at the end of a > stream. I suggest running ogginfo or oggzinfo on the file and see what > it says the real length is. You may also be interested in oggz-validate, > which can confirm that you are writing out all of the pages in the > proper order.Thank you for your help! According to oggz-validate, the previously generated ogg file was missing an EOS packet. With the new packet writing loop, there appears to be nothing wrong with these ogg streams, again according to oggz-validate. It looks like you may be right about broken players. When I feed my code actual video frames, the files play at normal speed. However, something is still wrong. My DirectShow filter, ffdshow, can''t play these ogg files at all and, instead, show a very short sequence of random colours, crashing most of the time. VLC player can play these files but I''m afraid that''s not good enough for my purposes. My ultimate goal is to upload these theora videos to YouTube but they have the same problems as ffdshow. The reason I still think the problem is with my code is that both players and YouTube can play other ogg files not made by my software. Here are two examples: http://www.osnews.com/img/19020/qvga.ogghttp://www.osnews.com/img/19020/720p-theora.ogg I haven''t actually uploaded these to YouTube but, in general, people have had success uploading Ogg/Theora video files to YouTube and these play fine with my DirectShow filter... Should my code just work?> By the way, please do not use a constant for the stream serial number. > Multiple streams in the same file must have unique serial numbers, and > if someone later wants to concatenate multiple streams you produce, they > will have to rewrite the stream with a new serial number or (more > likely) will generate an invalid file.Can you explain this further please? Can''t they simply assign their new stream a number unique to any existing one in the ogg file? Thank you very much... _________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/theora-dev/attachments/20100212/15cc54ec/attachment.htm
Timothy B. Terriberry
2010-Feb-12 13:30 UTC
[theora-dev] Ogg files incompatible, was: Video encoded using libtheora-1.1.1 and libogg-1.1.4 plays too fast...
Id Kong wrote:> However, something is still wrong. My DirectShow filter, ffdshow, can''t > play these ogg files at all and, instead, show a very short sequence of > random colours, crashing most of the time. VLC player can play theseUnless it''s using a very recent build of ffmpeg, ffdshow does not properly support Theora. Its decoder was limited to the old VP3 subset, and did not support any new things we included in the spec, despite the fact that it was published in 2004. It only worked because the mainline encoder didn''t use any of these extensions either, until the recent 1.1 release. Most of these issues have been fixed (thanks to David Conrad), though ffmpeg still does not properly support cropping rectangles with a non-zero offset for video that doesn''t have a multiple-of-16 frame size (they don''t support this feature for H.264, either). Have you tried our DirectShow filters: http://www.xiph.org/dshow/ ? If these do not work, we would like to know.> files but I''m afraid that''s not good enough for my purposes. My > ultimate goal is to upload these theora videos to YouTube but they have > the same problems as ffdshow.Right. As far as I know, they are using some old build of ffmpeg to transcode Theora. This situation is, shall we say, less than ideal.> The reason I still think the problem is with my code is that both > players and YouTube can play other ogg files not made by my software. > Here are two examples: > > http://www.osnews.com/img/19020/qvga.ogg > http://www.osnews.com/img/19020/720p-theora.oggVendor: Xiph.Org libTheora I 20071025 3 2 1 These are using an encoder from before the 1.1 release, which is why they work with the broken ffmpeg.> Can you explain this further please? Can''t they simply assign their new > stream a number unique to any existing one in the ogg file? > Thank you very much...I''m talking about tools that edit existing streams. Assigning a stream a new serial number means rewriting all of the pages, and computing a new checksum for them.
> Date: Fri, 12 Feb 2010 08:30:50 -0500 > From: tterribe at email.unc.edu > CC: theora-dev at xiph.org > > Id Kong wrote: > > However, something is still wrong. My DirectShow filter, ffdshow, can''t > > play these ogg files at all and, instead, show a very short sequence of > > random colours, crashing most of the time. VLC player can play these > > Unless it''s using a very recent build of ffmpeg, ffdshow does not > properly support Theora. Its decoder was limited to the old VP3 subset, > and did not support any new things we included in the spec, despite the > fact that it was published in 2004. It only worked because the mainline > encoder didn''t use any of these extensions either, until the recent 1.1 > release. Most of these issues have been fixed (thanks to David Conrad), > though ffmpeg still does not properly support cropping rectangles with a > non-zero offset for video that doesn''t have a multiple-of-16 frame size > (they don''t support this feature for H.264, either). Have you tried our > DirectShow filters: http://www.xiph.org/dshow/ ? If these do not work, > we would like to know.Thank you for this information. It''s an eye opener!> > files but I''m afraid that''s not good enough for my purposes. My > > ultimate goal is to upload these theora videos to YouTube but they have > > the same problems as ffdshow. > > Right. As far as I know, they are using some old build of ffmpeg to > transcode Theora. This situation is, shall we say, less than ideal.Indeed, it''s much less than ideal. Do you know where I can find source code for older versions of libtheora? I can''t find any on the site and a Google search wasn''t fruitful. Since my ultimate goal is to upload video to YouTube, what matters is that it actually work, so compatibility is my priority...> > The reason I still think the problem is with my code is that both > > players and YouTube can play other ogg files not made by my software. > > Here are two examples: > > > > http://www.osnews.com/img/19020/qvga.ogg > > http://www.osnews.com/img/19020/720p-theora.ogg > > Vendor: Xiph.Org libTheora I 20071025 3 2 1 > > These are using an encoder from before the 1.1 release, which is why > they work with the broken ffmpeg.If I''m not mistaken, they were encoded using ffmpeg2theora so that it''s compatible with (the broken) ffmpeg shouldn''t be surprising. So basically, no one''s using the "new" specification...> > Can you explain this further please? Can''t they simply assign their new > > stream a number unique to any existing one in the ogg file? > > Thank you very much... > > I''m talking about tools that edit existing streams. Assigning a stream a > new serial number means rewriting all of the pages, and computing a new > checksum for them.I was talking about editing existing streams. Assuming whatever made the ogg file gave each stream a unique but non-random serial number, if I wanted to add to it, can''t I simply choose another non-random serial number that''s unique to whatever numbers are already used in the ogg file? What am I missing here? Thank you... _________________________________________________________________ Check your Hotmail from your phone. http://go.microsoft.com/?linkid=9708121 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/theora-dev/attachments/20100212/e702f342/attachment.htm
On 2/12/10, Id Kong <spam_receptacle_ at hotmail.com> wrote:> Do you know where I can find source code for older versions of > libtheora?https://svn.xiph.org/releases/theora
>> Right. As far as I know, they are using some old build of ffmpeg to >> transcode Theora. This situation is, shall we say, less than ideal. > > Indeed, it''s much less than ideal. ?Do you know where I can find source code > for older versions of libtheora? ?I can''t find any on the site and a Google > search wasn''t fruitful. ?Since my ultimate goal is to upload video to > YouTube, what matters is that it actually work, so compatibility is my > priority...There''s a better way than using an old libtheora. We anticipated the need for continued compatability with VP3 and the new encoder can be run in VP3 compat mode. In this mode it will not use any features that weren''t available in VP3. This obviously penalizes efficiency, but it does work.> If I''m not mistaken, they were encoded using ffmpeg2theora so that it''s > compatible with (the broken) ffmpeg shouldn''t be surprising. ?So basically, > no one''s using the "new" specification...Plenty of people are using the new spec, but ffmpeg was very very late to the party. Monty
>> If I''m not mistaken, they were encoded using ffmpeg2theora so that it''s >> compatible with (the broken) ffmpeg shouldn''t be surprising. ?So basically, >> no one''s using the "new" specification... > > Plenty of people are using the new spec, but ffmpeg was very very late > to the party.Oops, I should clarify--- There is no ''new spec'' and ''old spec''. There has always been only one Theora spec, which has always included more features than the original VP3. Ffmpeg, however, has always mistakenly treated Theora as just a rebadged VP3 and for a long time our own encoder defaulted to outputting VP3 compatible bitstreams. During this period, ffmpeg refused to implement the full Theora spec as it wasn''t important to them (traditionally, a large fraction of the ffmpeg community have been h264 activitsts, and this faction considers Theora an irritating distraction). Monty
Id Kong
2010-Feb-12 22:13 UTC
[theora-dev] litheora encoding speed, was: Ogg files incompatible
> Date: Fri, 12 Feb 2010 11:19:10 -0500 > From: xiphmont at xiph.org > > > Indeed, it''s much less than ideal. Do you know where I can find source code > > for older versions of libtheora? I can''t find any on the site and a Google > > search wasn''t fruitful. Since my ultimate goal is to upload video to > > YouTube, what matters is that it actually work, so compatibility is my > > priority... > > There''s a better way than using an old libtheora. We anticipated the > need for continued compatability with VP3 and the new encoder can be > run in VP3 compat mode. In this mode it will not use any features > that weren''t available in VP3. This obviously penalizes efficiency, > but it does work.I was wondering what that VP3 compatibility constant was for! It all makes sense now... Thank you very much. My videos now work in every respect! It''s a shame about the efficiency but it''s better than not having video at all... Actually, I have another (hopefully final) issue to deal with involving a different kind of efficiency. My application is encoding in real time and was computationally expensive to begin with, even before libtheora! Obviously libtheora adds enormous CPU time, perhaps even more than the original application alone! How much effort was put into computational efficiency for libtheora? Do you think there''s much room for improvement? Do you (or anyone, please!) think you know somewhere that can improved in this regard? Thank you so much...> > If I''m not mistaken, they were encoded using ffmpeg2theora so that it''s > > compatible with (the broken) ffmpeg shouldn''t be surprising. So basically, > > no one''s using the "new" specification... > > Plenty of people are using the new spec, but ffmpeg was very very late > to the party.I''m sorry, I thought that ffmpeg was "it." I mean, does anyone not use it? What''s the alternative? I get the impression that integrated video encoding is not commonly needed so people just used these established command line utilities... Of course, many thanks to Tim, who answered all my initial questions... _________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/theora-dev/attachments/20100212/02d1a032/attachment.htm
Basil Mohamed Gohar
2010-Feb-12 22:21 UTC
[theora-dev] litheora encoding speed, was: Ogg files incompatible
On 02/12/2010 05:13 PM, Id Kong wrote:> > Date: Fri, 12 Feb 2010 11:19:10 -0500 > > From: xiphmont at xiph.org > > > > > > There''s a better way than using an old libtheora. We anticipated the > > need for continued compatability with VP3 and the new encoder can be > > run in VP3 compat mode. In this mode it will not use any features > > that weren''t available in VP3. This obviously penalizes efficiency, > > but it does work. > > I was wondering what that VP3 compatibility constant was for! It all > makes sense now... > Thank you very much. My videos now work in every respect! It''s a > shame about the efficiency but it''s better than not having video at all... > > Actually, I have another (hopefully final) issue to deal with > involving a different kind of efficiency. My application is encoding > in real time and was computationally expensive to begin with, even > before libtheora! Obviously libtheora adds enormous CPU time, perhaps > even more than the original application alone! > How much effort was put into computational efficiency for libtheora? > Do you think there''s much room for improvement? Do you (or anyone, > please!) think you know somewhere that can improved in this regard? > Thank you so much...Performance optimization is definitely a priority for the Theora devs (amongst which I am not...yet, but I don''t mind speaking for them!), but quality has been as well. Real-time encoding of Theora is not currently as important for most uses as final quality and efficiency are, because, for the most part, videos are going to be encoded once and then used many times thereafter, so encoding time isn''t such a big factor in usability. Incidentally, libtheora is still faster than, for example, x264 is for encoding, and decoding Theora video with libtheora is likewise faster than decoding H.264 video. At least, this has been my personal experience with my own personal test samples.> > > > > Plenty of people are using the new spec, but ffmpeg was very very late > > to the party. > > I''m sorry, I thought that ffmpeg was "it." I mean, does anyone not > use it? What''s the alternative? I get the impression that integrated > video encoding is not commonly needed so people just used these > established command line utilities...I think Monty''s reply before this post addressed your concern. ffmpeg is "it" for certain things, but Theora development and support have not been as much a priority for the core ffmpeg developers as has been, say, support for H.264. I do not think they are against it, so to speak, they just don''t care much for it. I''m sure if someone else put in the work, they''d accept it, though, which has been the case for most of the recent Theora improvements, if I''m not mistaken.> > Of course, many thanks to Tim, who answered all my initial questions...And thank you for choosing a free-as-in-freedom format for your video needs! The world appreciates your decision!
On Sat, Feb 13, 2010 at 2:22 AM, Id Kong <spam_receptacle_ at hotmail.com> wrote:> > >> Date: Fri, 12 Feb 2010 08:30:50 -0500 >> From: tterribe at email.unc.edu >> CC: theora-dev at xiph.org >> >> Id Kong wrote: >> > However, something is still wrong. My DirectShow filter, ffdshow, can''t >> > play these ogg files at all and, instead, show a very short sequence of >> > random colours, crashing most of the time. VLC player can play these >> >> Unless it''s using a very recent build of ffmpeg, ffdshow does not >> properly support Theora. Its decoder was limited to the old VP3 subset, >> and did not support any new things we included in the spec, despite the >> fact that it was published in 2004. It only worked because the mainline >> encoder didn''t use any of these extensions either, until the recent 1.1 >> release. Most of these issues have been fixed (thanks to David Conrad), >> though ffmpeg still does not properly support cropping rectangles with a >> non-zero offset for video that doesn''t have a multiple-of-16 frame size >> (they don''t support this feature for H.264, either). Have you tried our >> DirectShow filters: http://www.xiph.org/dshow/ ? If these do not work, >> we would like to know. > > Thank you for this information. ?It''s an eye opener! > >> > files but I''m afraid that''s not good enough for my purposes. My >> > ultimate goal is to upload these theora videos to YouTube but they have >> > the same problems as ffdshow. >> >> Right. As far as I know, they are using some old build of ffmpeg to >> transcode Theora. This situation is, shall we say, less than ideal. > > Indeed, it''s much less than ideal. ?Do you know where I can find source code > for older versions of libtheora? ?I can''t find any on the site and a Google > search wasn''t fruitful. ?Since my ultimate goal is to upload video to > YouTube, what matters is that it actually work, so compatibility is my > priority... > >> > The reason I still think the problem is with my code is that both >> > players and YouTube can play other ogg files not made by my software. >> > Here are two examples: >> > >> > http://www.osnews.com/img/19020/qvga.ogg >> > http://www.osnews.com/img/19020/720p-theora.ogg >> >> Vendor: Xiph.Org libTheora I 20071025 3 2 1 >> >> These are using an encoder from before the 1.1 release, which is why >> they work with the broken ffmpeg. > If I''m not mistaken, they were encoded using ffmpeg2theora so that it''s > compatible with (the broken) ffmpeg shouldn''t be surprising. ?So basically, > no one''s using the "new" specification...ffmpeg2theora doesn''t use the ffmpeg theora encoder, but the xiph theora encoder. And the new ffmpeg also uses the full feature set. So, all new encoding software uses the "new" specification (i.e. full specification). If YouTube haven''t updated their encoding pipeline, that''s a different issue. Cheers, Silvia.