From: James Egan on
The script below uses mencoder to combine multiple .mov files into one
file named combined.mov. After the files are combined, and I use mplayer
to view the combined videos, I cannot use any rewind for fast forward
functions. The video just exits. Is there any way to use mencoder to
combine the videos, and have it maintain the information needed to rewind
and fast forward?

-Thanks



#!/bin/sh

set -u
umask 022


if [ $# -lt 2 ]; then
echo; echo "Usage: $0 file1.mov file2.mov..."; echo
exit 1
fi


mencoder -oac pcm -ovc copy "$*" -o combined.mov

From: Peter 'Shaggy' Haywood on
Groovy hepcat James Egan was jivin' in comp.os.linux.misc on Fri, 28 Dec
2007 10:29 am. It's a cool scene! Dig it.

> The script below uses mencoder to combine multiple .mov files into one
> file named combined.mov. After the files are combined, and I use
> mplayer to view the combined videos, I cannot use any rewind for fast
> forward
> functions. The video just exits. Is there any way to use mencoder to
> combine the videos, and have it maintain the information needed to
> rewind and fast forward?

[Snip.]

> mencoder -oac pcm -ovc copy "$*" -o combined.mov

Try adding -forceidx to the command line.

--
Dig the sig!

----------- Peter 'Shaggy' Haywood ------------
Ain't I'm a dawg!!
From: Fred on
On Sat, 29 Dec 2007 14:16:31 +1100, Peter 'Shaggy' Haywood wrote:
>> mencoder -oac pcm -ovc copy "$*" -o combined.mov
>
> Try adding -forceidx to the command line.


Thanks. I tried adding the -forceidx like this:

mencoder -forceidx -oac pcm -ovc copy $* -o combined.mov

However, when I play combined.mov using mplayer, I get these messages,
and cannot fast forward or rewind:

Cannot seek in raw AVI streams. (Index required, try with the -idx switch.)
Cannot seek in raw AVI streams. (Index required, try with the -idx switch.)
Cannot seek in raw AVI streams. (Index required, try with the -idx switch.)

What I can to is play the combined.mov file passing mplayer the -idx
switch like:

mplayer -idx combined.mov


I can then rewind and fast forward through the .mov file, but mplayer has
to build the indexes first. It seems as thought mencoder should build the
indexes though, according to the man page. Any ideas?

-Thanks again.
From: Fred on
On Sat, 29 Dec 2007 14:16:31 +1100, Peter 'Shaggy' Haywood wrote:

>> mencoder -oac pcm -ovc copy "$*" -o combined.mov
>
> Try adding -forceidx to the command line.



Thanks. I tried adding the -forceidx like this:

mencoder -forceidx -oac pcm -ovc copy $* -o combined.mov

However, when I play combined.mov using mplayer, I get these messages,
and cannot fast forward or rewind:

Cannot seek in raw AVI streams. (Index required, try with the -idx switch.)
Cannot seek in raw AVI streams. (Index required, try with the -idx switch.)
Cannot seek in raw AVI streams. (Index required, try with the -idx switch.)

What I can to is play the combined.mov file passing mplayer the -idx
switch like:

mplayer -idx combined.mov


I can then rewind and fast forward through the .mov file, but mplayer has
to build the indexes first. It seems as thought mencoder should build the
indexes though, according to the man page. Any ideas?

-Thanks again.

From: Peter 'Shaggy' Haywood on
Groovy hepcat Fred was jivin' in comp.os.linux.misc on Mon, 31 Dec 2007
1:47 pm. It's a cool scene! Dig it.

> On Sat, 29 Dec 2007 14:16:31 +1100, Peter 'Shaggy' Haywood wrote:
>>> mencoder -oac pcm -ovc copy "$*" -o combined.mov
>>
>> Try adding -forceidx to the command line.
>
> Thanks. I tried adding the -forceidx like this:
>
> mencoder -forceidx -oac pcm -ovc copy $* -o combined.mov
>
> However, when I play combined.mov using mplayer, I get these messages,
> and cannot fast forward or rewind:
>
> Cannot seek in raw AVI streams. (Index required, try with the -idx
> switch.) Cannot seek in raw AVI streams. (Index required, try with the
> -idx switch.) Cannot seek in raw AVI streams. (Index required, try
> with the -idx switch.)
>
> What I can to is play the combined.mov file passing mplayer the -idx
> switch like:
>
> mplayer -idx combined.mov
>
> I can then rewind and fast forward through the .mov file, but mplayer
> has
> to build the indexes first. It seems as thought mencoder should build
> the
> indexes though, according to the man page. Any ideas?

You could try a two pass conversion. On the first pass, combine the
streams as you were originally doing. On the second pass, try
re-encoding with the -forceidx switch. I don't know whether that will
work, but it's worth a try. Eg.:

mencoder -oac pcm -ovc copy $* -o intermediate.avi && mencoder -forceidx
-oac copy -ovc copy intermediate.avi -o combined.mov && rm
intermediate.avi

(all on one line).
If that doesn't work, maybe it has something to do with the fact that
you're actually creating an AVI containing Quicktime content with
a .mov extention. That probably shouldn't make any difference, but...
maybe it does. You might try another encoder, such as transcode, to
create a proper Quicktime MOV.

--
Dig the sig!

----------- Peter 'Shaggy' Haywood ------------
Ain't I'm a dawg!!