ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i m trying to store h.264 in avi container using ffmpeg....is it possible using ffmpeg.i m using v4l to capture a image and compressed in to h.264,now please help me out how i can store it in avi container,any programming example,header format for avi container,and what other information required to store in a container.
How exactly are you obtaining and converting this video ? using what and how ?
Quote:
Originally Posted by Simon Bridge
You convert it to theora and store it in an ogg container.
It is not a good idea to use encumbered formats unless you cannot avoid it.
You can always say that a format is for sure patent encumbered, but you can never say that a format is for sure not patent encumbered. The only time you will be able to tell is in court when some company calls you up and says you are breaking their patent.
i m getting h.264 from renesas board i m able to display on sdl using ffmpeg converting it in to yuv format,i need to store it in a avi container,any websites or any sample code which can help me to store?
can i encode h.264 in avi container,i didnt find ant id to convert,as i have seen some example outputexample.c in ffmpeg ther it guess the format,will this converted format be in avi or mpeg4 format..can any one help regarding this..tell me any links which would help regarding this.
AIUI, there are some 3rd-party hacks out there that supposedly make it possible, but in general .avi is not a good match for mpeg4 AVC, mostly due to a lack of b-frame support. I don't know if any of the hacks are available in Linux.
In any case, it seems that some hacking of the .avi format is needed to crowbar in just about any of the modern codecs. It's much better to simply go with a newer container that has proper support. What's keeping you from simply using the .mp4 container that was specifically designed for mpeg4? Or matroska, which supports just about everything?
Technically yes you can do it but why would you want to hassle with it at all? Using the matroska (.mkv) container is a far better option and anything that can play h264 in an avi should also support mkv.
Technically yes you can do it but why would you want to hassle with it at all? Using the matroska (.mkv) container is a far better option and anything that can play h264 in an avi should also support mkv.
I agree, mkv is the way to go unless you need to use avi so it plays on Divx compatible players, in which case you would use xvid/mpeg4 video instead.
You can always say that a format is for sure patent encumbered, but you can never say that a format is for sure not patent encumbered. The only time you will be able to tell is in court when some company calls you up and says you are breaking their patent.
Which is why I suggested theora.
Theora is for sure a patent-bearing format, however it is available royalty-free under public domain. Thus, it is not "encumbered" by the patent.
Patents and software or data-formats are troublesome for exactly the reason you describe - there is no telling if some troll has a patent which could arguably cover the stuff we have been using and who can afford to defend?
It is thus generally and always good advise to avoid known encumbered formats in favour of those which have been around long enough to attract an infringement notice and/or court action but which have failed to do so.
Fully published and open formats with a legally binding royalty waiver are good for this. It kinda gives patent trolls notice to act quickly or forever hold their peace. Favouring this sort of approach even for our personal stuff, discourages this patent silliness in the long run.
As good community members, we should act with knowledge of how our actions affect things outside our immediate wants.
I would like to take your advice, and have tried to, but as tuxdev says, it just doesn't cut it for good quality. And, sometimes I have to use a specific format, because it's the only thing the player will play (like Divx/Xvid).
I've also tried dirac, and it really sucks.
I'll be using the good quality patent-encumbered codecs (in US only) until they are taken down, then I'll be forced to use something else, and by that time, maybe one of there projects will have produced something good.
Free is nice and all, but the quality out of Theora is terrible. The format fundamentally can't support some of the more recent advances in encoders.
Please support those assertions: which research are you using? What do you mean by "fundamentally"? Which "recent advances"?
Bear in mind that Theora is targeted at competing with MPEG-4 (e.g., XviD and DivX), RealVideo, Windows Media Video, and similar lower-bitrate video compression schemes. Thus it will suffer in comparison with recent high-bitrate schemes. OP wanted H.264 (which is a specification, not a codec) in an avi container...
You realise that MPEG-LA have extended H.264 specification royalties (for internet streaming) only until 2016? After that you have to pay. http://arstechnica.com/media/news/20...64-license.ars
... if you are going to use an h264 implementation, you are best advised to make sure you understand the license terms.
The royalties were supposed to come in this year - most likely the open competition with a free format in html5 has prompted them to hold off. They may be convinced to hold off some more, if they decide that they can use ubiquitous h264 streaming to leverage royalties for encoders. In that case, it may become the new gif.
http://www.osnews.com/story/19019/Theora-vs.-h.264
... theora used to lag H264 compression, but the inclusion as an internet streaming standard in html5 as well as head-to-head comparisons like this one have focussed development considerably: http://news.slashdot.org/article.pl?.../05/07/2352203
... development is ongoing - if you want a feature, first check that it is what theora is supposed to do, then request it. The more people join in, the faster this will go.
I will not advise someone to sacrifice their freedom, or that of others, in return for a prettier picture.
At the moment, theora is the only viable fee codec for internet streaming. Contenders are Dirac/Schodinger and VP8 - we've got 6 years to sort it out: fingers crossed.
I would like to take your advice, and have tried to, but as tuxdev says, it just doesn't cut it for good quality. And, sometimes I have to use a specific format, because it's the only thing the player will play (like Divx/Xvid).
Yeah, some of us are stuck with vendor lock-in. You don't have to - firefox is a theora player for example, so is VLC: both cross-platform.
Sometimes it happens to be what the encoder (eg. in a video camera) uses - transcoding can do funny things to the bitrate and resolution. Unlike vorbis, we don't seem to be seeing native theora support in HW encoders ... yet.
You have not said what it is that "just doesn't cut it for good quality" - have you tried a recent encoder? How are you measuring quality?
Whatever - I understood that you may have a particular reason you weren't telling us for choosing the container+specification you did rather than just assuming that "video = avi+mpeg4" like so many people assume "music=mp3". That is why I also pointed you to methods of getting what you specified.
Not everyone asking for that combination needs it.
Quote:
I've also tried dirac, and it really sucks.
Nobody claims otherwise - the practical implementation is called "schrodinger". But the only reason to try it is if you want to stream High Definition and you are a developer. It is still very experimental - but note: it is usually the encoder or the player which messes up, not intrinsic to the codec itself.
If your aim is to encode high definition video for personal storage, then theora will certainly not work well - it's not intended for that. You can get HD resolutions, but at the expense of the bitrate.
Quote:
I'll be using the good quality patent-encumbered codecs (in US only) until they are taken down, then I'll be forced to use something else, and by that time, maybe one of there projects will have produced something good.
You have until 2016 - after which, internet streaming could face similar royalty schemes to TV broadcast (erk!)
There is some speculation that the extension on the royalty deadline is a bait and switch tactic.
But look what you are saying: you'd rather be chained to a comfy chair than stand or sit on an uncomfortable one.
I know everyone is supposed to have a price these days, I just hoped it would be a bit higher than that.
We are in a transition period - if we want comfy chairs to come without annoying inquisitors, we have to start using the less comfy ones for preference. But hey - no worries right? Enjoy.
I've done my own comparisons, and I've seen many internet comparisons, and I'm sorry but, at the moment theora is the lowest quality of the major codecs, at the same file size or almost. I think if h264 will be taken down because of patents, development of theora will increase greatly, because people will realize that this is the way to go, and then maybe the quality will increase a lot.
I guess there's no chance of repealing software patents, cuz that would be nice, easy solution.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.