LinuxQuestions.org
Help answer threads with 0 replies.
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 10-01-2009, 03:28 AM   #1
Feeona
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Rep: Reputation: 0
Mencoder Concatenating Movie Files


Hi, I'm just new to this forum. I posted this question in another thread but just realized that was not the best plan, as it is an inactive thread for the last 6 months.

I have an issue with mencoder. I need to use it to concatenate two or more quicktime .mov files together. They are movie files which are exported from Swift 3D and so their dimensions are all 400 by 300. I tried using the following code:

/mencoder -oac copy -ovc copy movie1.mov movie2.mov -o outputMovie.mov

But when I try to open outputMovie.mov using quicktime player (version 7.6) I keep getting the message: "The move could not be opened, the file is not a movie file".

I'm really at a loss for what to do. I've tried changing the codec of the outputMovie.mov. I've tried outputting as an .avi file. None play in quicktime player. I've never used a video encoder before so I'm not sure what I need to do to solve this issue.

(note: I would manually concatenate the movies in a movie editor except for the fact that I need to be able to do it in real time and through php and mencoder was advised to be a good option)

Any help or advice greatly appreciated!

Fiona
 
Old 10-01-2009, 07:53 AM   #2
pg99
Member
 
Registered: May 2008
Location: UK
Distribution: Slackware
Posts: 73

Rep: Reputation: 18
though you have named the output file outputMovie.mov its probably an avi not a mov and that's why quicktime wont play it. have you tried playing the joined file in mplayer to see what it thinks the container format is?

i believe you can force mencoder to output to a mov by using an alternative muxer which supports mov output. try adding "-of lavc" to your join command...
 
Old 10-01-2009, 07:54 AM   #3
pg99
Member
 
Registered: May 2008
Location: UK
Distribution: Slackware
Posts: 73

Rep: Reputation: 18
sorry that should be -of lavf
you can check thats supported on your version of mencoder by running "mencoder -of help"
 
Old 10-02-2009, 03:19 AM   #4
Feeona
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for that!

I tried adding in -of lavf and I was informed of the following message:

If you wish to use libavformat muxing, you must ensure that your video stream
does not contain B frames (out of order decoding) and specify:
-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames
on the command line.
REMEMBER: MEncoder's libavformat muxing is presently broken and will generate
INCORRECT files in the presence of B frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!


so I added in the no B frames specification and I got this:

You have certified that your video stream does not contain B frames.
REMEMBER: MEncoder's libavformat muxing is presently broken and will generate
INCORRECT files in the presence of B frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit
videocodec: framecopy (400x300 24bpp fourcc=6765706a)
VIDEO CODEC ID: 0
Writing header...
Floating point exception


I assume this means there are B frames which is a problem. Not sure how to solve that exactly.

I also put in -of help as you suggested and it gave me the output formats:

Available output formats:
avi - Microsoft Audio/Video Interleaved
mpeg - MPEG-1/2 system stream format
lavf - FFmpeg libavformat muxers
rawvideo - (video only, one stream only) raw stream, no muxing
rawaudio - (audio only, one stream only) raw stream, no muxing

I used mplayer (thanks very much for that tip) to play finalMovie.mov...looks good except it is in AVI file format.

I'm guessing from the info above that there's not much hope of getting it into .mov format?

I would output it as .avi except I was concerned that it's not compatible with Quicktime player.

Thanks again for your help. At least I have some idea of what's going on now

Fiona
 
Old 10-02-2009, 07:54 AM   #5
pg99
Member
 
Registered: May 2008
Location: UK
Distribution: Slackware
Posts: 73

Rep: Reputation: 18
you could use mplayer to dump the separate a/v streams and then MP4Box to put the them into an mp4 container, which QuickTime will play.

alternatively you could forget mencoder, I know ffmpeg can output mov files, but I don't know the syntax to join files using that.
 
Old 10-04-2009, 11:43 AM   #6
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
If you use an mpeg format, you can just use cat to join them.

cat input1.mpg input2.mpg > output.mpg

Perhaps something like lives could help bridge the gap of joining multiple clips. It's hard to do the same with encoders since they'll assume that you want multiple streams in a single file, not a single file of multiple streams.
 
Old 10-05-2009, 01:43 PM   #7
Feeona
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks..I'll try putting them in .mov container.

Thanks Shadow_7..the mpg concatenation works alright...I can play it in Quicktime, but the frame rate is increased so my movies play too fast. I'm not sure how to fix this.

I would use ffmpeg or some alternative means but i'm kind of stuck with using mencoder.
 
  


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
Scriptable utility for concatenating audio files Daravon Linux - Software 7 09-11-2010 10:03 PM
MPlayer and MEncoder (The DVD/Movie/Video/MP3 Player and Encoder for Linux) ComputerGreek Linux - General 6 02-03-2008 09:39 AM
[mencoder-question] merging a subtitle in a movie (avi) oldsko0l Linux - Software 10 02-07-2007 08:24 AM
concatenating files s_siouris Linux - Software 4 05-30-2005 09:36 AM
concatenating strings to open files veilig Programming 1 11-10-2003 05:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:00 AM.

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
Open Source Consulting | Domain Registration