Computer ForumsComputers  

Go Back   Computer Forums > PC Technology Zone > Linux, BSD, other *nixes & Open Source Software

Reply
 
LinkBack Thread Tools Display Modes
Old 12-30-2007, 01:54 PM   #1 (permalink)
Monster Techie
 
Join Date: Nov 2006
Location: Illinois, USA
Posts: 1,328
Default Converting Ogg Theora to AVI, MPEG, DivX, etc?

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).
__________________

CalcProgrammer1 is online now   Reply With Quote
Old 12-30-2007, 04:24 PM   #2 (permalink)
Indeed.
 
Greg's Avatar
 
Join Date: Dec 2004
Posts: 1,531
Default Re: Converting Ogg Theora to AVI, MPEG, DivX, etc?

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.
__________________
Greg is offline   Reply With Quote
Old 12-30-2007, 09:20 PM   #3 (permalink)
Monster Techie
 
Join Date: Nov 2006
Location: Illinois, USA
Posts: 1,328
Default Re: Converting Ogg Theora to AVI, MPEG, DivX, etc?

No clue how to write Nautilus scripts...I tried making one but couldn't figure out how to use it.
__________________

CalcProgrammer1 is online now   Reply With Quote
Old 12-31-2007, 05:54 AM   #4 (permalink)
Indeed.
 
Greg's Avatar
 
Join Date: Dec 2004
Posts: 1,531
Default Re: Converting Ogg Theora to AVI, MPEG, DivX, etc?

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.
__________________
Greg is offline   Reply With Quote
Old 12-31-2007, 12:26 PM   #5 (permalink)
Monster Techie
 
Join Date: Nov 2006
Location: Illinois, USA
Posts: 1,328
Default Re: Converting Ogg Theora to AVI, MPEG, DivX, etc?

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.
__________________


Last edited by CalcProgrammer1; 12-31-2007 at 12:30 PM.
CalcProgrammer1 is online now   Reply With Quote
Old 12-31-2007, 12:28 PM   #6 (permalink)
Master Techie
 
Join Date: Apr 2004
Posts: 2,532
Default Re: Converting Ogg Theora to AVI, MPEG, DivX, etc?

avidemux might do it, dunno if it takes ogg/theora input though

mencoder sucks for mpeg output too, pipe it into mpeg2enc instead
horndude is offline   Reply With Quote
Old 12-31-2007, 03:43 PM   #7 (permalink)
Indeed.
 
Greg's Avatar
 
Join Date: Dec 2004
Posts: 1,531
Default Re: Converting Ogg Theora to AVI, MPEG, DivX, etc?

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.
__________________
Greg is offline   Reply With Quote
Old 01-04-2008, 08:26 PM   #8 (permalink)
Monster Techie
 
Join Date: Nov 2006
Location: Illinois, USA
Posts: 1,328
Default Re: Converting Ogg Theora to AVI, MPEG, DivX, etc?

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.
__________________

CalcProgrammer1 is online now   Reply With Quote
Old 01-04-2008, 09:22 PM   #9 (permalink)
Monster Techie
 
Join Date: Nov 2006
Location: Illinois, USA
Posts: 1,328
Default Re: Converting Ogg Theora to AVI, MPEG, DivX, etc?

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).
__________________


Last edited by CalcProgrammer1; 01-04-2008 at 09:52 PM.
CalcProgrammer1 is online now   Reply With Quote
Old 01-05-2008, 08:19 PM   #10 (permalink)
call me... tater salad
 
Saxon's Avatar
 
Join Date: Feb 2007
Posts: 3,752
Default Re: Converting Ogg Theora to AVI, MPEG, DivX, etc?

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.
__________________
8GB DDR2 800, Asus M2N-SLI, AMD 4200+ X2, 500GB SATA + 250 SATA, Asus 8500GTS silent 512mb,
Debian Linux, FreeBSD7, Solaris.

Isaac is coming...

Saxon is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mpeg to Avi (divx or xvid) coversion cnico88 Windows Operating Systems and Software 1 12-10-2007 11:52 PM
Dvd to Avi or mpeg converting Xadian Computer Audio & Multimedia 2 10-31-2007 05:00 PM


All times are GMT -5. The time now is 07:05 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0