LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to mass convert media files to .ogg (https://www.linuxquestions.org/questions/linux-software-2/how-to-mass-convert-media-files-to-ogg-796856/)

Gegenzeit 03-21-2010 09:20 AM

How to mass convert media files to .ogg
 
Hi,

I search a tool to convert my media files to ogg-files. I've managed to to do so with VLC - but only file by file. Is there a way to just convert whole folders to ogg. Even if the files contained are in a lot of different formats?

Thanks

Jörg

smoker 03-21-2010 09:34 AM

Ogg is only the container, ogg vorbis is for audio files and ogg theora is for video files. The compression codec is vorbis or theora.
Here's a way to convert mp3s to ogg vorbis :
http://www.ghacks.net/2009/08/31/con...rbis-in-linux/

Gegenzeit 03-21-2010 11:30 AM

Thanks! That's a great tool! Easy to get and easy to use. Perfect!

Only downturn: It just grabs the audi part of my videos (which only makes for a small percentage of my collection ... so I'm already done with my largest 'problem')

Do you (or anyone else) know something similar, but with the option to keep the video information? - I guess it would be the the same than this, but with ogg theora.

Jörg

jschiwal 03-21-2010 12:10 PM

Look into ffmpeg or mencoder. You can run them in a loop.

Encoding programs will take what you give them, recognizing the video and audio streams in the input. The work is in determining the settings for the video file you want to produce, which will depend mainly on what device you will use, and the quality you want. Once you get the command nailed down, you can create a one-liner and put it in your $HOME/bin/ directory.

For example, I have a mencoder script I named vid2sansap2 that I use to convert videos to play on my sansa p2 player. I simply need to run "vid2sansap2 <filename>" to convert a file. I tweaked the settings to my liking once, and after that I don't need to remember all those options.

Also look at the mediainfo program. It is great at analysing the video and audio streams of various media files. I use it to display the tag info, which I input (in a similar script) into lame to not only convert files to mp3, but also copy the tags in the process.

Raveolution 03-22-2010 01:09 AM

Quote:

Originally Posted by Gegenzeit (Post 3906604)
Thanks! That's a great tool! Easy to get and easy to use. Perfect!

Only downturn: It just grabs the audi part of my videos (which only makes for a small percentage of my collection ... so I'm already done with my largest 'problem')

Do you (or anyone else) know something similar, but with the option to keep the video information? - I guess it would be the the same than this, but with ogg theora.

Jörg

Might you be looking for the ffmpeg2theora utility?
http://en.wikipedia.org/wiki/Ffmpeg2theora
http://www.v2v.cc/~j/ffmpeg2theora/

tonya00henson 05-23-2010 08:19 PM

Hi you can do it online through here: http://www.oggconvert.com/ no need to download anything :)

Shadow_7 05-23-2010 11:28 PM

Unless you're on dialup and don't have the time.


ffmpeg -i in.type .... -acodec vorbis .... -vcodec libtheora ....... -y out.ogv

Where ...'s are any additional parameters you want. Note: ffmpeg defaults -b 200k (okay for SD, hideous for HD), and -r 25 (not to great in NTSC land).

ffmpeg -codecs
ffmpeg -formats

mencoder -list-options

Any reason that you need ogg? Some PDA type device with limited abilities? Upload to blip.tv or something? Many native linux players handle whatever formats, no need to do any conversion. Unless your machine isn't fast enough to play or scale it in realtime. With every conversion you loose quality. And ogg isn't that great for filesize when it comes to video. Relative to libx264 and other options.

H_TeXMeX_H 05-24-2010 04:52 AM

This tonya00henson looks suspect. This is all he ever posts, this site, and while resurrecting old threads. The site looks innocent enough I suppose and is posted in context as a solution, which it is, but it just seems odd to me that this is all he would even post, and he's using Window$. I wonder if I should report it.


All times are GMT -5. The time now is 10:17 PM.