LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 06-04-2005, 02:51 PM   #1
Baryonic Being
Member
 
Registered: Mar 2004
Distribution: Arch
Posts: 139

Rep: Reputation: 15
Converting AVI files


I have been capturing video in AVI format from an analogue camcorder using, alternately, xawtv on Linux and Pinnacle Studio on Windows.

Basically, I haven't found any decent video editing tools for Linux or Windows, and I need some way - any way at all - to get these AVI files into a format that iMovie HD - that's the Apple iLife component for video editing - can import. As far as I can see, that means outputting as either a DV stream, an MPEG-4 (Simple Profile), or maybe, a Quicktime mov.

These are 360x540 MJPG AVI files at 24.997 fps.

I haven't a clue where to start, although I've confused myself in the process of investigating tovid, ffmpeg, avidemux and others. I don't mind if I have to convert to an interim format - replace AVI with MPEG-2 if you like; I can do that.

Please help if you can!
Thanks.

Last edited by Baryonic Being; 06-04-2005 at 03:17 PM.
 
Old 06-04-2005, 04:56 PM   #2
justintime32
Member
 
Registered: Sep 2004
Distribution: SimplyMepis 3.3 (Debian testing/unstable)
Posts: 123

Rep: Reputation: 15
Have you tried mencoder? It can encode any file MPlayer can play into a plethora of other formats (and I think that Quick Time format is supported)
If you're using Debian, it can be installed by "apt-get install mencoder"
If you're using another distro, try a site like http://www.rpmfind.net
 
Old 06-04-2005, 05:08 PM   #3
eadwine
Member
 
Registered: Mar 2005
Distribution: SimplyMepis 6.0
Posts: 37

Rep: Reputation: 15
If it can read mpeg1 files, then it's easy, but you'll have to cross check that.

Here is how to convert:

Before you can do this you will have to install Tovid. The following lines are applicable for the region that I live in. Check the Tovid homepage on what you need to put in the command line.

tovid -pal -vcd filename.rm filename
tovid -pal -vcd filename.avi filename

The extension .mpg will be automatically added after the filename.

Last edited by eadwine; 06-05-2005 at 03:35 AM.
 
Old 06-04-2005, 05:43 PM   #4
Baryonic Being
Member
 
Registered: Mar 2004
Distribution: Arch
Posts: 139

Original Poster
Rep: Reputation: 15
Unfortunately it doesn't look like iMovie even accepts mpeg1. So mpg files are mpeg1 are they?

MEncoder looks like my best bet. Well, it did:

$ mencoder input.avi -o 19932.mov -oac pcm -ovc qtvideo

...

SwScaler: BICUBIC scaler, from Planar 422P to Packed YUY2 using C
Cannot find requested component
FATAL: Cannot initialize video driver.
Pos: 0.0s 1f ( 0%) 0fps Trem: 0min 0mb A-V:0.000 [0:0]
1 duplicate frame(s)!
Segmentation faultf ( 0%) 0fps Trem: 0min 0mb A-V:0.004 [0:0]

I'm hoping that, whatever I do, QuickTime Pro might be a last resort that'll work: http://www.apple.com/quicktime/pro/specs.html

This is complicated. I just want to edit my videos!

Last edited by Baryonic Being; 06-04-2005 at 05:50 PM.
 
Old 06-04-2005, 06:11 PM   #5
Baryonic Being
Member
 
Registered: Mar 2004
Distribution: Arch
Posts: 139

Original Poster
Rep: Reputation: 15
I'll tell you what I've done:

mencoder input.avi -o 19933.mov -oac pcm -ovc lavc -lavcopts vcodec=mpeg4:vpass=1

I don't know what that means but it seems to have worked. I mean, there weren't any errors. I get a .mov file that plays in mplayer; only remains to see if it has worked. I'd still appreciate any guidance from any who can give it! Thanks.
 
Old 06-04-2005, 07:39 PM   #6
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
A program called LiVES works with many video and audio codecs.

The command that you did just outputs to an avi format. MPlayer is smart enough to use the binary data instead the extension. If you want to convert to dv make sure you install the dv tools.

Converting a lossy material to a lossy material is not very good because it only will get worst. I suggest re-capture the video with mencoder using a lossless codec.
 
Old 06-04-2005, 07:54 PM   #7
Baryonic Being
Member
 
Registered: Mar 2004
Distribution: Arch
Posts: 139

Original Poster
Rep: Reputation: 15
Thanks - I'll try lives.

I'm a complete beginner, however, and lossy and lossless codecs means nothing to me. If I stumble upon the method, or read a few hundred books on it, I'll be sure to follow that advice. Thanks.

By the way, what do you think of these commands:

transcode -i clip.avi -x lav -o clip.dv -y dvraw
and
mencoder input.avi -o 19933.dv -oac pcm -ovc libdv -vf scale=720:480

There were no errors.
 
Old 06-04-2005, 11:13 PM   #8
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Just go to wikipedia.org and search for lossy and lossless.

mencoder by default outputs to avi files, so if you want to use another video file format use -of. If you want to know what output formats are available, type mencoder -of help.

transcode is better at syncing audio and video. It is able to use mplayer to support a magnitude of audio and video codecs. Use mencoder for video recording from an video capture card.
 
Old 06-05-2005, 07:26 AM   #9
Baryonic Being
Member
 
Registered: Mar 2004
Distribution: Arch
Posts: 139

Original Poster
Rep: Reputation: 15
OK, thanks.
But do you think QuickTime Pro would be able to do it, if everything ends up going wrong? Most of my transcode experiments so far have resulted in either green foam output, or a segmentation fault, and when I tried to save it as a DV stream in Lives, I just got an empty file.

This command:

transcode -i input.mpg -x mpeg2 -o chris7.dv -y dvraw

Where input.mpg is an MPEG2 file, gives the best result: an upside-down blue DV stream.

Last edited by Baryonic Being; 06-05-2005 at 08:24 AM.
 
  


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
Converting AVI to DV in Linux hbbtstar Linux - Software 1 01-18-2005 11:44 PM
Converting .avi files gbj Linux - Software 2 01-01-2005 05:48 AM
converting avi to vcd nrunge Linux - Software 1 04-22-2004 03:07 AM
Converting avi to mpeg jnx138 Linux - Software 1 11-23-2003 04:43 PM
Converting avi to mpg OR creating an SVCD from an avi MasterC Linux - Software 5 03-28-2003 06:42 AM


All times are GMT -5. The time now is 08:15 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration