Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Mencoder conversion of files



Moin,

On Sat, 01 Dec 2007 00:03:18 +0900
Dave M G <dave@example.com> wrote:

> I'm posting this here mainly because I can't find a really decent Linux 
> oriented video editing forum. I mean, there's discussion on about video 
> editing on Linux forums, and discussion of Linux on video editing 
> forums, but there doesn't seem to be any one community that's really 
> dedicated to Linux based, or open source, video editing.
>
> If anyone knows of a good one, let me know where I might post my issue here.

Uhmm.. how about mencoder-users? [1]

But be aware that your mail here just states that you have
a problem but hardly gives any details on what the problem
might be. Rule of thumb on MPlayer/FFmpeg related mailinglists
is to follow bugreports.html ([2] resp [3]) even though
it is not a bug.

> I'm running Ubuntu Gutsy, 7.10, and I've got mencoder, ffmpeg, and have 
> installed every codec I can think of (Specifics listed below).

>From where? Is ffmpeg from ubuntu too?
 
> I have a Sony HD video camera which writes everything in an uncompressed 
> MPEG format. 

Ther is no uncompressed MPEG format. I guess it's one with
only intra coding (ie key frame only).

> The video camera splits video at the 2 GB mark. I'm not sure of the 
> exact megabyte to time ratio, but usually a 40 minute to an hour 
> recording will result in two files, the first being exactly 2 GB, and 
> the second a little over 1 GB.

I wonder why. MPEG-PS doesn't have any filesize limit.
 
> The Goals:
> 
> What I want to do is store these recordings in a smaller more manageable 
>   format, like AVI (DivX? Suggestions welcome).

class(AVI) != class(DivX)
One is a container, the other a codec. The decision what
codec and what container you use is quite independent
(to the extend that the container has to be able to support
the codec, which is the case unless it's a special container
format only for a special codec)

> Ideally, what I'd like to do is:
> 1. Append the files together. They are always numbered like so:
> m2u00066.mpg, m2u00067.mpg, m2u00068.mpg. So, assuming that I want to 
> merge all videos in a directory, append them in order of file number.

cat m2u*.mpg > all_inclusive.mpeg

> 2. De-interlace.

-vf pp=<insert appropriate dinterlacing filter>

whereas appropriate might be in this case one of ci, md or fd

> 3. Save in a reasonably high quality but smaller format, like an AVI. I 
> understand that smaller file format equals some quality loss, but I 
> don't need to preserve original quality, I just need a result that is clear.

Either use mpeg4 (reasonable compression/quality ratio, but fast)
or h.264 (somewhat better compression/quality ratio, but a lot slower)
as codecs and mkv as container.

> What I've Done:
> I found this script, mpg2avi, which uses mencoder to make the 
> conversion. The results are an avi file of acceptable quality.
> http://www.linuxquestions.org/linux/answers/Applications_GUI_Multimedia/Batch_convert_MPEG_files_to_AVI_0

Uhm... why not read the encoding docu of MEncoder[4, 5]?
There are also some more in depth docu to be found in [6] and [7].
(The parts missing in [6] were merged into the html docu)
 
> The problems:
> 1. Despite having lame installed, it keeps giving an audio codec not 
> found error (reproduced below).

Could be a lot of things.

> 2. Does not seem to handle the 720X480 size.

What does that mean? MPlayer/MEncoder can handle 1920x1080
without problems (unlike my venerable G550 ^^; )

> 3. I don't think it deinterlaces the video.

You think? Interlaced video is clearly visible.

> 4. Has no option to append videos together.

See above

> The question:
> Can these errors be resolved, and then the de-interlacing and appending 
> functions added?

Yes.

> for i in *.[Mm][Pp][Gg]; do nice -n 10 mencoder $i -ovc lavc -lavcopts 
> vcodec=mpeg4:vbitrate=$vbitrate:vhq:vqmin=2:vlelim=-4:vcelim=9:lumi_mask=0.05:dark_mask=0.01 
> -vf pp=md  -vf scale=720:480, -oac lavc -lavcopts 
> acodec=mp3:abitrate=128 -o "`basename "$i"`.avi";echo "Conversion done";done

I'm no expert in encoding, but those parameter constelation
looks quite strange.

HTH

			Attila Kinali 

[1] http://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
[2] http://www.mplayerhq.hu/DOCS/HTML/en/bugreports.html
[3] http://ffmpeg.mplayerhq.hu/bugreports.html
[4] http://www.mplayerhq.hu/DOCS/HTML/en/mencoder.html
[5] http://www.mplayerhq.hu/DOCS/HTML/en/encoding-guide.html
[6] http://www.mplayerhq.hu/DOCS/tech/encoding-guide.txt
[7] http://www.mplayerhq.hu/DOCS/tech/encoding-tips.txt

-- 
Praised are the Fountains of Shelieth, the silver harp of the waters,
But blest in my name forever this stream that stanched my thirst!
                         -- Deed of Morred


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links