MCTC offers students quality education that is practicable and fosters ideals of life-long learning.

Home  

 


  Create an account

Search


[x]  
 
 [x]
Categories Menu
· All Categories
· Commands
· Distro News
· General
· Link of the Week
· Linux Jobs
· Security
· Software
· Tips

 
Navigation
 
User Info
Welcome, Anonymous

Username:
Password:

(Register)

Membership:
Latest: hiobgiou
New Today: 0
New Yesterday: 0
Overall: 225

People Online:
Visitors: 4
Members: 0
Total: 4

 
hacker Beware
You have been warned!
We have caught 1459 shameful hackers.

NukeSentinel(tm) 2.5.14

 
Hot Downloads
 
  
Maysville Linux Users Group (MLUG) - Linux Users Helping Linux Users: Forums

MLUG :: View topic - video conversion tips with mencoder, avidemux, or ffmpeg
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


video conversion tips with mencoder, avidemux, or ffmpeg

 
Post new topic   Reply to topic    MLUG Forum Index -> Tips & Tricks
View previous topic :: View next topic  
Author Message
ewiget
Site Admin
Site Admin


Joined: Aug 13, 2004
Posts: 335
Location: Maysville, KY

PostPosted: Mon Dec 25, 2006 4:05 am    Post subject: video conversion tips with mencoder, avidemux, or ffmpeg Reply with quote

There are a couple of different ways to convert .mov files recorded on cell phones, digital camera's, etc to a format that can be edited in linux.

You can use command line:

Code:

"mencoder input.mov -oac pcm -ovc raw -o output.avi"

or for a gui, check out avidemux available at http://fixounet.free.fr/avidemux/
_________________
Ed Wiget
RHP Studios
Keeping Your Data Safe!
606-759-1175
http://www.rhpstudios.com
http://www.xtremewebhosts.com
http://www.edwiget.name
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=162711


Last edited by ewiget on Sat Feb 02, 2008 5:27 am; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
ewiget
Site Admin
Site Admin


Joined: Aug 13, 2004
Posts: 335
Location: Maysville, KY

PostPosted: Thu Dec 28, 2006 3:31 am    Post subject: Reply with quote

here is a way to convert mov files to flv (flash video) for posting on a web page. Why would you want to do that? Well, flash is probably a lot more popular than quicktime files and is more suitable for playing video on web pages than quicktime files. Not only that, flash video will also stream a lot quicker (meaning begin playing) than quicktime. Also, flash videos are much smaller than mov files. For instance, I converted a 71.7MB mov video with sound to flv and the resulting flv file was only 4.0mb.

Although I normally hate flash videos, now that the beta flash 9 is out for linux, the compatibility issues that plagued us Linux users are pretty much non-existant.

Using the linux ffmpeg package, here is the command to convert the video:



Code:

ewiget@localhost ~/Pictures/movies $ ffmpeg -i DSCN0121.MOV DSCN0121.flv


and here is the output of the command above:

Code:

FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2006 Fabrice Bellard, et al.
  configuration:  --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --enable-static --enable-shared --cc=i586-pc-linux-gnu-gcc --disable-altivec --disable-debug --disable-audio-oss --disable-opts --enable-mp3lame --enable-a52 --enable-dc1394 --enable-xvid --enable-vorbis --enable-libogg --enable-dts --enable-x264 --enable-faad --enable-faac --enable-gpl --enable-pp --disable-strip
  libavutil version: 49.0.1
  libavcodec version: 51.20.0
  libavformat version: 50.6.0
  built on Dec  2 2006 20:11:11, gcc: 4.1.1 (Gentoo 4.1.1-r3)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'DSCN0121.MOV':
  Duration: 00:01:57.0, start: 0.000000, bitrate: 5137 kb/s
  Stream #0.0(eng): Video: mjpeg, yuvj422p, 320x240, 30.00 fps(r)
  Stream #0.1(eng): Audio: pcm_u8, 8000 Hz, mono, 64 kb/s
Output #0, flv, to 'DSCN0121.flv':
  Stream #0.0: Video: flv, yuv420p, 320x240, q=2-31, 200 kb/s, 30.00 fps(c)
  Stream #0.1: Audio: mp3, 8000 Hz, mono, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
[flv @ 0xb7e2c608]removing common factors from framerate
Press [q] to stop encoding
[mp3 @ 0xb7e2c608]lame: output buffer too small (buffer index: 321, free bytes: 1983)
frame= 3510 q=17.5 Lsize=    4072kB time=116.9 bitrate= 285.5kbits/s
video:3079kB audio:913kB global headers:0kB muxing overhead 2.013932%

You will notice that there is a message about lame output buffer too small and although this is not a major error, you will find that audio at only 8000 Hz is way too distorted. So what I did to overcome this was to change the command to this:

Code:


ewiget@localhost ~/Pictures/movies $ ffmpeg -i DSCN0121.MOV -ar 22050 DSCN0121.flv

The -ar option changes the output audio to 22050 Hz which is much more acceptable. For examples of both and to hear the difference for yourself, see this link (if you are unable to hear the audio in firefox on Linux, this has to do with using gplflash or flash 7 so try the beta flash 9 for linux, ot try it in konqueror which also works fine for me):

http://www.edwiget.name/content/view/117/28/

ffmpeg can be used to convert other video formats to flv too. Here is another example, a little more complex where the size and codecs are specified:

Code:

ffmpeg -i in.3gp -hq -acodec mp3 -ar 44100 -ab 64 -f flv -s 320x240 -aspect 4:3 -y out.flv

_________________
Ed Wiget
RHP Studios
Keeping Your Data Safe!
606-759-1175
http://www.rhpstudios.com
http://www.xtremewebhosts.com
http://www.edwiget.name
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=162711
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
ewiget
Site Admin
Site Admin


Joined: Aug 13, 2004
Posts: 335
Location: Maysville, KY

PostPosted: Sat Jan 26, 2008 8:29 pm    Post subject: Reply with quote

Here is a way to convert theora ogg file created with recordmydesktop to mpeg/mpg format suitable for uploading to youtube.com

Code:

mencoder inputfile.ogg -o outputfile.mpg -ovc lavc -oac lavc -lavcopts abitrate=160






_________________
Ed Wiget
RHP Studios
Keeping Your Data Safe!
606-759-1175
http://www.rhpstudios.com
http://www.xtremewebhosts.com
http://www.edwiget.name
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=162711
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
ewiget
Site Admin
Site Admin


Joined: Aug 13, 2004
Posts: 335
Location: Maysville, KY

PostPosted: Sat Feb 02, 2008 5:30 am    Post subject: Reply with quote

here is a quick way to convert an avi file to an mpeg file suitable for an ntsc dvd:

Code:

ffmpeg -i 'input_video_name.avi' -target ntsc-vcd 'output_video_name.mpg'








_________________
Ed Wiget
RHP Studios
Keeping Your Data Safe!
606-759-1175
http://www.rhpstudios.com
http://www.xtremewebhosts.com
http://www.edwiget.name
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=162711
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    MLUG Forum Index -> Tips & Tricks All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group
Forums ©

 
All content Copyright 2000 - 2008, Maysville Linux Users Group unless otherwise credited.
All Rights Reserved!
The opinions expressed by visitors to this web site are their own and not necessarily the opinions of the MLUG!


Web site powered by PHP-Nuke Web site powered by PHP-Nuke-NIP-76.0

You can syndicate our news using the file backend.php or ultramode.txt