Converting Ogg Theora to AVI, MPEG, DivX, etc?

Status
Not open for further replies.

CalcProgrammer1

Fully Optimized
Messages
2,363
Location
Illinois, USA
I can't find anything to do this with. I use Gtk-RecordMyDesktop to make screencasts of Linux sessions, but it only outputs in Ogg Theora format. I want to edit these clips together using a commercial video editor for Windows, but it only takes MPEG, AVI, WMV, DivX, etc (standard Windows codecs). The only thing I've found is mencoder, which is a commandline tool. I don't like typing stuff for every conversion, so a GUI tool would be nice (even a decent mencoder frontend, I haven't found a good one).
 
Use your mencoder command to make a nautilus script.


I have yet to find a good GUI for converting stuff under Linux. I don't mind the command line, though.
 
You could try something as simple as this:
Code:
#!/bin/bash

for i in "$@"; do

xterm -e #insert mencoder command here and use "$i" as the input file

done
You'd have to put that in your "/home/USER/.gnome2/nautilus-scripts" directory and make it executable.
 
The commandline for mencoder is:

mencoder <input_file.ogg> -ovc lavc -o <output_file.avi>

to convert ogg theora to avi.

So,
Code:
#!/bin/bash
for i in "$@"; do
xterm -e mencoder $i -ovc -lavc -o output.avi
done

I figure that would always make "output.avi", is there a way to make it append .avi instead of .ogg to the source file, or even ".ogg.avi"?

EDIT:
That doesn't seem to work. I click it to use it on an ogg file, but it flashes a terminal and it goes away.
 
avidemux might do it, dunno if it takes ogg/theora input though

mencoder sucks for mpeg output too, pipe it into mpeg2enc instead
 
Code:
#!/bin/bash
for i in "$@"; do
xterm -hold -e mencoder $i -ovc -lavc -o  $i.avi
done
That "-hold" will make xterm stay open so you can see if it's giving you any errors.

If you really wanted I could figure out a sed command so the output file would just be *.avi rather than *.ogg.avi

I've never used mpeg2enc like horndude suggested, but figure out the command you'd need and it shouldn't be too hard to modify our little script.
 
Ok, so I finally wrote the Mencoder script, installed it, and converted some of the videos that I had in Theora format to "lavc" AVI format (lavc is libavcodec). I then shut down and booted Windows XP, where my Screenblast video editing software is. Pulled up the new AVI files and they wouldn't play, nor would they play in Windows Media Player (complained about a codec error). Then, I tried it in Windows VLC, and it worked (cause VLC is awesome like that and knows everything...). I booted back into Linux, edited the script to use "x264" or whatever, re-encoded, went back into Windows, and still, only VLC can read the files.

What codec should I convert to for Windows to be able to read it? Can I get a Windows video codec for these types, or is there a way I can encode the file into native Windows AVI format?

I tried "raw" on mencoder, but the output (when played back in Linux anyways) had really messed up color (default Ubuntu interface is orange/brown, but in the raw video it was ...blue...). Should I try using raw in Windows? I don't think my Windows install has a DivX/XviD codec installed, so I don't know that those formats would work.
 
Never mind...even better than converting, I found Ogg DirectShow codecs that let you run Ogg Theora as a native codec. illiminable Ogg Directshow Filters for Speex, Vorbis, Theora and FLAC

Ok, so that DOESN'T work in video editors, only WMP :(

I think FFMpeg will work...I have a Windows EXE, does the Linux version use the same commands? If so I'll write a script...too bad Windows doesn't have that kind of drag-and-drop functionality (or can it be done?) Basically, is there a way to "script" Windows so you can just drag OGG files into FFMPEG and get MPG? I edit video in Windows, so I would want to convert the OGG videos in Windows (as well as Linux, but I already know how to do that, just change the script for FFMPEG).
 
Calc I am sorry if this seems OT but have you found any way to get divix working? I am having a hard time with it.
 
Status
Not open for further replies.
Back
Top Bottom