LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 01-02-2003, 05:59 AM   #1
MrGreg
Member
 
Registered: Apr 2001
Location: Hamilton
Distribution: RedHat 7.2, 9.0
Posts: 52

Rep: Reputation: 15
[AVI, mencoder, merge files]


Greetings,

I recently got a nice little (inexpensive;-) digital camera that I can access as a USB mass-storage device directly in Linux. It is a Fuji FinePix A101 (probed as 1400Z). I had no problem setting it up.

My question is about the MOVIE feature of this camera. I can create short AVI formatted clips with it. I'm searching for more information about adding a soundtrack to the clips.

I believe I already have the tools necessary to do this, but can't find any practical examples. Mencoder seems to be the likely candidate, but I get lost in it's massive man pages.

Has anyone had sucess in merging a soundfile (or live raw audio) to an existing AVI file? What format should the soundfile be in? Can anyone provide a link to a specific HOW-TO on this subject that I haven't been able to find yet?

There has to be a one-liner for this...

thanks,
 
Old 01-02-2003, 06:14 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
It would appear so. Browsing over the docs, I found this:
http://www.mplayerhq.hu/DOCS/encoding.html

On that page it talks about using --audiofile to mux together an audio file and a video. So maybe something like:
mencoder --audiofile filename.mp3 /home/video/shortclip.avi -o output.avi
might work?

HTH

Cool
 
Old 01-02-2003, 06:19 AM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Also, it looks like a straight up file merge might work:
file.mp3 file.avi > file.avi

http://www.mplayerhq.hu/DOCS/faq.html#encoding

It's the 3rd question down.

I'm still searchin for ya, and will let you know if I find anything truly solid.

Cool
 
Old 01-02-2003, 06:43 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
no, catting them together will certainly not work. you will have a file which is first half avi, second half mp3, the result of which would be completely useless.
 
Old 01-02-2003, 06:45 AM   #5
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
http://www.mplayerhq.hu/pipermail/mp...er/025225.html
Follow the "next" links for the replies.

This talks about merging 2 avi files, but should work with audio as well. I am assuming you mean different audio, not even needing to be really synced. Something like you take a video of someone racing, and put some cool music to it.

Anyway, here's some more info from the mail lists:
http://www.mplayerhq.hu/pipermail/mp...er/005885.html
again, follow the next links for the replies

...........................................................
This one seems to really show you how:
http://www.mplayerhq.hu/pipermail/mp...ly/018339.html

Ok, so The snippet that seems to help:
Quote:
Step 3: Use mencoder to remux your new mp3 file with the movie:

mencoder -audiofile out.mp3 -oac copy ...

You can either copy video as-is (with -ovc copy) or re-encode it at
the same time you merge in the audio like this.
So you can just stream you current video, maybe a command like:
mencoder --audiofile audio.mp3 -oac copy -ovc copy -o filename.avi

Actually that should be it.

HTH

Cool
 
Old 01-02-2003, 06:46 AM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Quote:
Originally posted by acid_kewpie
no, catting them together will certainly not work. you will have a file which is first half avi, second half mp3, the result of which would be completely useless.
Yes sir, you are absolutely right. I should have realized that, thanks.

Cool
 
  


Reply


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
mencoder compress avi zuessh Linux - Software 9 02-21-2007 06:54 PM
using mencoder to convert directory to avi ogross74 Linux - Software 2 07-05-2005 10:04 AM
mencoder problem converting *.jpg to .avi whistl Linux - Software 9 06-29-2005 02:32 PM
mencoder: DVD to avi. What did I do wrong? J_Szucs Linux - Software 10 04-12-2004 04:22 PM
DV 2 avi with mencoder NeptunEz Linux - Software 3 02-29-2004 04:01 PM


All times are GMT -5. The time now is 04:50 PM.

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