Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-29-2009, 07:10 PM   #1
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375
Blog Entries: 24

Rep: Reputation: 43
Unhappy ffmpeg: converting and combine into ogv

Help! I've got two files: video.avi and music.mp3. I want to convert the music track into ogg and combine it with the video file to make an ogv movie (so I can embed it on the web). I can't seem to get it right, and I know very little about multimedia and ffmpeg.

Frustrating part is that I've done it successfully once before a month or so ago. I think, however, last time the video file was already an ogv and it didn't have its own audio track already.

After reading the ffmpeg MAN page, and looking at some online examples (which I mostly did not understand), I tried something like this:

ffmpeg -i video.avi intermediate.ogv
ffmpeg -i music.mp3 music.ogg
ffmpeg -i intermediate.ogv -i music.mp3 final.ogv
But the result is that I end up with a video with the video and sound from video.avi but apparently nothing from music.mp3. I saw in the MAN page that there is a -newaudio option but I cant seem to get that working (I think I am using it wrong on the command line).

If someone could give me some very specific examples on the command line of how to do this right I would appreciate it. The audio from video.avi doesn't necessarily need to be saved, if that makes any difference. Also, the music file is longer than the video file, so duration of the final ogv file should only be as long as the video file.
Old 12-30-2009, 02:50 AM   #2
Senior Member
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 223Reputation: 223Reputation: 223
OGV is only a container. If you are looking for ogg-theora files for HTML5 support, you'll have to convert your avi file to the supported formats. ffmpeg2theora is perhaps the easiest way to do this. HTML5 (for Mozilla at least) supports ogg-theora video and ogg-vorbis audio wrapped in the ogv container.

Much like .avi can contain a number of video codecs (Divx, Xvid, Indeo, Mjpeg, DV .....) and audio codecs (mp3, ulaw, wav, ....) .avi only defines the container and not the contents, same with ogv. It is only a container.
Old 10-04-2010, 02:08 AM   #3
Registered: Aug 2008
Distribution: Gentoo; VoidLinux; Funtoo
Posts: 216

Rep: Reputation: 18

Had same issue, resolution was to just run recordmydesktop and play the video without sound while playing the music file in another media player.
Old 10-04-2010, 07:13 PM   #4
Registered: Jan 2008
Location: Noble Park ,Victoria, Australia
Distribution: Mageia
Posts: 183
Blog Entries: 2

Rep: Reputation: 23
have a look at lives vidoe editor thats not too hard to use seams to work.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
converting animated gif to avi? (ffmpeg) zach014 Linux - Software 9 04-22-2010 09:09 AM
ffmpeg - no sound after converting matroska file DBabo Linux - Software 5 12-29-2009 09:14 PM
[SOLVED] how can I combine clips to form single video file with mencoder or ffmpeg sumeet inani Linux - Newbie 3 12-17-2009 06:01 AM
Converting flv to Mpg with Audio and ffmpeg btbx Linux - Software 7 06-12-2008 03:41 PM
converting vob to xvid using ffmpeg schneidz Linux - Software 3 12-07-2006 04:03 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:50 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration