Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I put theora/vorbis in a matroska container? (Solved)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
faern
n00b
n00b


Joined: 17 Oct 2007
Posts: 18
Location: Göteborg, Sweden

PostPosted: Thu Jan 03, 2008 9:14 pm    Post subject: How do I put theora/vorbis in a matroska container? (Solved) Reply with quote

Hi.

I want to re encode some movies & clips I have to a free format for archiving.
I want help in deciding upon a codec for audio, video and then a container for it.

My first choice was Theora for video and vorbis for audio. Then ogg as it's container.
The problem is that ogg doesn't seem to be too compatible with jumping in files and so on.
So I wanted to put my theora/vorbis into a matroska container, but ffmpeg doesn't like that
Code:
$ ffmpeg -i in.avi -vcodec theora -acodec vorbis out.mkv

Seems stream 0 codec frame rate differs from container frame rate: 29.98 (65535/2186) -> 29.97 (2997/100)
Input #0, avi, from 'in.avi':
  Duration: 00:29:25.1, start: 0.000000, bitrate: 1104 kb/s
  Stream #0.0: Video: mpeg4, yuv420p, 576x432, 29.97 fps(r)
  Stream #0.1: Audio: mp3, 48000 Hz, stereo, 112 kb/s
Unable for find a suitable output format for 'out.mkv'

From what I have read it should be possible to do this.

Now when I have this problem. Does anyone have any recommendations for any other codecs/containers (Any suggestion are welcome, but it must be free alternatives), or does anyone know how to successfully put my codecs into the matroska container?
_________________
http://www.faern.net - My page & blog about software & gadgets


Last edited by faern on Sat Jan 05, 2008 7:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
kKDu
Apprentice
Apprentice


Joined: 18 Aug 2003
Posts: 187

PostPosted: Thu Jan 03, 2008 9:37 pm    Post subject: Reply with quote

You could first make an ogg-file with ffmpeg and than use mkvmerge or mmg (graphical tool) to make your mkv-file. But theora video not always works with matroska (don't ask me why). Also I think you should use h.264 (x264) as your video codec for achieving, because it's output quality is better.

But one question: why you would reencode avi-files? You will always loose quality.
_________________
http://www.vim.org
Back to top
View user's profile Send private message
faern
n00b
n00b


Joined: 17 Oct 2007
Posts: 18
Location: Göteborg, Sweden

PostPosted: Thu Jan 03, 2008 9:41 pm    Post subject: Reply with quote

I know I loose quality.

I'm not going to do it on files where the quality is the most important thing (HD-video). I just want to store stuff in a free format. Thats why I cant use x264 either, I know it has better quality that theora, but from what I have heard there are some patents surrounding it.

Thats why I ask you, do you know any better free codecs?
_________________
http://www.faern.net - My page & blog about software & gadgets
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Fri Jan 04, 2008 12:27 am    Post subject: Reply with quote

When it comes to free, or at least, completely free codecs, there really aren't many choices. Everything in multimedia is patented, it's better to just get over it and move on with using whatever fits you best.

But, there is some other stuff, for audio at least. There's flac for lossless audio. musepack is free, but it's somewhat based off of MP2. I don't think there's other choices for video right now.

Also, I agree with kKDu in recommending to use mkvtoolnix to create the .mkv file instead of ffmpeg or another encoder. You'll have less problems that way, since I think the muxers for matroska are still new.
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
faern
n00b
n00b


Joined: 17 Oct 2007
Posts: 18
Location: Göteborg, Sweden

PostPosted: Fri Jan 04, 2008 7:47 am    Post subject: Reply with quote

Ok. maybe Ill go with x264 or something.

But for audio, isn't vorbis a good choise? Does it have any downsides?
_________________
http://www.faern.net - My page & blog about software & gadgets
Back to top
View user's profile Send private message
yngwin
Retired Dev
Retired Dev


Joined: 19 Dec 2002
Posts: 4572
Location: Suzhou, China

PostPosted: Fri Jan 04, 2008 11:40 am    Post subject: Reply with quote

Personally, I use x264 video and ogg vorbis audio in a matroska container for things like DVD-rips. As Avidemux' matroska support is not yet fully dependable, I use Avidemux for just the video encoding (sometimes with avisynth in wine as frameserver, when I need its more advanced filtering possibilities). I do the audio separately with oggenc, then mux the two (and sometimes subtitles as well) with mmg.
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
cjubon
Guru
Guru


Joined: 03 Jul 2007
Posts: 450
Location: Vienna/Europe

PostPosted: Fri Jan 04, 2008 1:33 pm    Post subject: Reply with quote

faern wrote:
But for audio, isn't vorbis a good choise? Does it have any downsides?

If you want lossy audio, vorbis is a good choice, better than mp3. On most home computer equipment, you won't hear any difference to uncompressed audio data or to a lossless codec such as flac. If you want lossless audio, on the other side, your choice will be flac, as beandog suggested above. Notice that you can also put flac files into an ogg container (with the --ogg switch, see man flac).

faern wrote:
does anyone know how to successfully put my codecs into the matroska container

In order to create mkv-containers, you may install media-video/mkvtoolnix and read http://www.bunkus.org/videotools/mkvtoolnix/docs.html
Back to top
View user's profile Send private message
kKDu
Apprentice
Apprentice


Joined: 18 Aug 2003
Posts: 187

PostPosted: Fri Jan 04, 2008 3:43 pm    Post subject: Reply with quote

faern wrote:
But for audio, isn't vorbis a good choise? Does it have any downsides?


It is a very good choice for stereo signals, but if you have 5.1 audio you need ac3 or aac.
_________________
http://www.vim.org
Back to top
View user's profile Send private message
linga
Tux's lil' helper
Tux's lil' helper


Joined: 11 Dec 2006
Posts: 131

PostPosted: Sat Jan 05, 2008 12:17 pm    Post subject: Re: How do I put theora/vorbis in a matroska container? Reply with quote

faern wrote:
Hi.

My first choice was Theora for video and vorbis for audio. Then ogg as it's container.
The problem is that ogg doesn't seem to be too compatible with jumping in files and so on.



http://www.xiph.org/ogg/ wrote:

Ogg is a stream oriented container, meaning it can be written and read in one pass, making it a natural fit for internet streaming and use in processing pipelines. This stream orientation is the major design difference over other file-based container formats.


Doesn't that mean that you can seek back and forth in it?
Back to top
View user's profile Send private message
faern
n00b
n00b


Joined: 17 Oct 2007
Posts: 18
Location: Göteborg, Sweden

PostPosted: Sat Jan 05, 2008 1:23 pm    Post subject: Reply with quote

Yes I can seek in it, I just noticed that it is slightly "buggier" than in other containers.

Thanks for all the help, all of you
_________________
http://www.faern.net - My page & blog about software & gadgets
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum