LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   ffmpeg: converting and combine into ogv (http://www.linuxquestions.org/questions/linux-software-2/ffmpeg-converting-and-combine-into-ogv-778776/)

CoderMan 12-29-2009 06:10 PM

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:

Code:

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.

disturbed1 12-30-2009 01:50 AM

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.

http://en.wikipedia.org/wiki/Use_of_...rmats_in_HTML5

darthaxul 10-04-2010 01:08 AM

same
 
Had same issue, resolution was to just run recordmydesktop and play the video without sound while playing the music file in another media player.

mecelec415 10-04-2010 06:13 PM

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


All times are GMT -5. The time now is 10:40 AM.