13

I've been using recordMyDesktop to record stuff. A little slow to compile but it records fine. However, when I try to convert from ogv to avi (I've used Devede and an mencoder script) the audio and video go out of sync.

Here's the script for reference:

#!/bin/bash
# ogv to avi
# Call this with multiple arguments
# for example : ls *.{ogv,OGV} | xargs ogv2avi
N=$#;
echo "Converting $N files !"
for ((i=0; i<=(N-1); i++))
do
echo "converting" $1
filename=${1%.*}
#mencoder "$1" -ovc xvid -oac mp3lame -xvidencopts pass=1 -o $filename.avi
mencoder "$1" -o $filename.avi -oac mp3lame -lameopts fast:preset=standard -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=4000
shift 1
done

Are there good reliable video converters out there? :)

4
  • Similar question: askubuntu.com/q/1691/667
    – dv3500ea
    Dec 14, 2010 at 17:54
  • i'm thinking the asker might be trying to use the command from that QA and is having an issue so he asked a different question about the a/v sync Dec 15, 2010 at 14:16
  • Yes, it's about sync issues. :) Dec 15, 2010 at 14:55
  • Just picked an answer. I don't know why, but it seems that different things work for different setups. Sucks though that we have to do research regarding this. Dec 15, 2010 at 15:55

9 Answers 9

7

You can use avconv to convert and optionally resize (it is included with ffmpeg):

avconv -i "input.ogv" -vcodec mjpeg -acodec mp2 -s 640x480 -vb 3000k -ab 160k "output.avi"

This converts your video to a .avi file with mjpeg and mp2 codecs for good compatibility.

avconv -i "input.ogv" -vcodec mjpeg -acodec mp2 -s 640x480 -qscale 5 "output.avi"

This converts your video using quality scale.

2
  • 3
    This preserved the quality the best, I used this without the resize part though. Thanks!
    – penner
    Jan 29, 2013 at 0:52
  • This is probably the only functional method on Ubuntu 14.04. There is a visible quality degradation (even removing the -s 640x480 bit) but the end result is acceptable. Oct 11, 2014 at 18:30
6

winff Install winff

Is a GUI for the command line video converter, FFMPEG. It will convert most any video file that FFmpeg will convert. WinFF does multiple files in multiple formats at one time. You can for example convert mpeg's, flv's, and mov's, all into avi's all at once.

2
5

You can try with ffmpeg:

ffmpeg -i input.ogv output.avi
3
  • 1
    So far it looks like the move from mencoder did it for me! Funny thing is, it used to convert properly with my script and with Devede. Then I noticed, about since a week ago, it got out of sync. Dec 15, 2010 at 14:59
  • 1
    *** THIS PROGRAM IS DEPRECATED *** This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
    – penner
    Jan 28, 2013 at 22:46
  • This method does not work on Ubuntu 14.04. Oct 11, 2014 at 17:58
2

In terminal type the following,

mencoder input.ogv -o output.avi -oac mp3lame -lameopts fast:preset=standard -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=4000
  • Change the input.ogv to the name of you of your ogv file.

  • You can also give the name for the output file by altering output.avi in the above command.

alt text

2

using the -idx switch fixed this for me...discussion here: http://ubuntuforums.org/showthread.php?t=665836

mencoder -idx input.ogv -ovc lavc -oac mp3lame -o output.avi

2
  • Hmm.. unfortunately, it didn't work for me. I'll be trying other stuff too. Dec 15, 2010 at 14:56
  • that's odd. this is why i switched to using ffmpeg to do screen capture. gtkrecord does weird stuff with the ogv container and you get unpredictable playback across different players. Dec 15, 2010 at 14:58
1

mencoder is very good at these sort of things. Earlier today I wrote about making screencasts in Ubuntu using recordmydesktop and then converting the ogv files into avi with xvid video and mp3 audio. You can find it at http://binwaheed.blogspot.com/2010/12/creating-screencast-in-ubuntu-linux.html

1
  • Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – fossfreedom
    Apr 22, 2012 at 16:32
1

for me the next combination works

sudo apt-get install ffmpeg
ffmpeg -sameq -i /home/xxxx/x.ogv /home/xxx/x.avi

more detail here http://linux.bzic.org/cum-fac-screencast-captura-de-pe-monitor-in-ubuntu-gnulinux/

0

Try Mobile Media Converter. It has a really simple GUI but it can do what you are trying to do.

0

Try avidemux Install avidemux , it's available in the repositories and has a intuitive GUI.

1
  • 2
    It can't open ogv files. Dec 15, 2010 at 15:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.