Ubuntu – convert video file to .ogg

encodingmediaogg-vorbisvideo conversion

I've been having trouble with this because I'm new to Linux:
I would like to convert different video formats to ogv. I found some terminal commands like this: ffmpeg -i input.avi -acodec libvorbis -ac 1 -b 768k output.ogg

The problem with these type of commands is that they are intended to change bit rate, fps, or even resolution. I would like to just change the file format without changing anything else about the video.

I looked at the man pages for ffmpeg and found some useful info but I don't know how to space command-line options.

Are there any easy ways to do this? In addition, is there a command to change the bit rate so that it doesn't go over a certain rate?

Best Answer

You can simply run this to do the conversion.

ffmpeg -i neha.avi -acodec libvorbis output.ogg

Dont bother to put any options for bitrate or aspect ratio. It will choose for itself. You can set the max audio bitrate to 192000 (or whatever value you want, upto 320000 AFAIK) by adding -ab 192000 anywhere in the command. Also, you set the video bitrate at say, 1200kb (or any other value), by including -b 1200kb in the command.

So here is the command in the end, (the order of options dont matter, since you asked. nothing to worry)

ffmpeg -i neha.avi -acodec libvorbis -ab 192000 -b 1200kb output.ogg

Here is a good guide to all that you might want to do.