LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices



Reply
 
Search this Thread
Old 11-17-2004, 03:03 AM   #1
angryjoe
LQ Newbie
 
Registered: Nov 2004
Posts: 4

Rep: Reputation: 0
video compression to save space


How do i get mencoder to make rm (or rmvb) files out of avi files (or any other video format)?
 
Old 11-17-2004, 06:25 AM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
sorry, mencoder doesn't really have support for encoding with real media .... don't know why you would want to use that tho, mpg/avi are more supported

tho this link has codec options for lavc codec (mencoder can encode using this) http://www.mplayerhq.hu/DOCS/HTML/en...ibavcodec.html ... as you can see, rv10 is probably the closest you are going to get with mencoder

tho i don't think you can get the file's format to be a true real player ... perhaps a separate package can convert to the realmedia format?

Last edited by SciYro; 11-17-2004 at 06:26 AM.
 
Old 11-17-2004, 07:02 AM   #3
pevelius
Member
 
Registered: Mar 2004
Location: Tampere, Finland
Distribution: Debian, Familiar, OS X
Posts: 145

Rep: Reputation: 16
donīt use rm if your intent is only to save space. use any mp4 codec (mp4, xvid, divx5 etc) instead.
 
Old 11-17-2004, 07:51 AM   #4
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
mpeg4 is the same as divx xvid, etc ... use lavc's mpeg4 as there are lots of options to aid in quality, and still get rather good size, or you can set the options to screw quality and give you low disk space .. or any were in between

tho, iv been looking at other codecs ... just tried theora (its in alpha) .. they got a long way to go, in 4 minutes the file size was 81mb .. tho i did have rather high quality set, and i didn't scale it down to further save space .... .. but it was slow, so i aint trying again

it seems the currently good codec is mpeg4 or one of the mpeg4'ish ones
 
Old 11-17-2004, 03:09 PM   #5
angryjoe
LQ Newbie
 
Registered: Nov 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Gentoo install

anyways... I've created a gentoo system on a 13GB harddrive using the lasted handbook(11/09/04) for a P3(x86).....

It's not detecting my netgear wireless card, I plan on installing madwifi and try my luck, if not reinstall...? Any suggestions




to SciYro & pevelius
thanks for the quick reply...on the video thing
 
Old 11-17-2004, 05:29 PM   #6
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
just as an afterthought: use oggvorbis for the audio codec, mencoder cant encode to it tho, but it will allow for much smaller file size ... just as an example, i been encoding a rather long video, after scaling the video down (to save space, when you full-screen it tho, you really dont notice to much a difference) and encoding the video (3 pass, with mpeg4 using lavc to ensure high quality) .. the audio codec, mp3lame (mp3 encoder that mencoder uses) gave a audio size of about 130mb at 128kbs , vorbis gave the same with quality set at a high 7, about 102mb (the bitrate was about 151kbs, after i found out that using the quality option forced such a high bitrate, i got rid of it, (and told to use the average bitrate of 128 ... naturally the final bitrate was about 118kbs) ... that file size was about 80MB .... a really big diference, and i didn't notice any quality difference in audio .. i might even be able to make the audio smaller without noting a difference using vorbis!

anyways, heres the instructions for it

=== encode video here .. use the option "-nosound" for the final project .. we add that later===

first setup a few fifo's to use , to bind programs together

Code:
mkfifo audiodump
mkfifo fixaudio
mkfifo converttoverbis
then dump th audio to audiodump, (optionally have sox read the audio, and increase volume, or something else .. and for me pass that to another sox to dampen (i haven't found out how to blank it without clipingoff the audio ... remember the audio and video must be the same length) that annoying screech that some files make at the beginning) ... this assumes a singed 16 bit audio with 2 channels, and a samplerate of 48000 .. read the man pages , and change as need be .. .. read the output of mplayer when you are whatching the the video with sound still in it, it will display the samplerate , channels, and some other info needed ... otherwise all you hear is RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Code:
mplayer videowithaudio.avi -dumpaudio -dumpfile audiodump

sox -s -w -c 2 -r 48000 -t raw audiodump -t raw fixaudio vol 41 power

sox -s -w -c 2 -r 48000 -t raw fixaudio -t raw converttovorbis fade q 5s

oggenc -b 128 -o audiofile.ogg converttovorbis

 ==== running all those programs together, and then to merge the audio and video run ====

ogmmerge -o VIDEO.ogm audiofile.ogg finalisedvideo.avi
of course thats just an example, you could push the audio from mpayer directly to oggenc, but if theres something that needs fixing, fix it first ... the second sox command basically does a fade-in effect on the first 5 seconds of the video (for movies files that i usually encode, 5 seconds is ok, for with audio at the beginning, adjust to your needs, or use a different filter) .... you can also lower the bitrate ( the "-b 128" options says to use about 128kbs for the bitrate, as i said early, the final file might have a lower encoding then this, you can even lower it without effecting quality that much

for the wireless card, what you mean by not detecting? ... i use gentoo and from what i can see, theres no real hardware detection, once you configured the system to your hardware, theres no real need for auto detection ..... but i did a stage 1 install .... the only auto detect problem i encountered was the livecd not loading network drivers for my network card , loading them by hand and it worked

Last edited by SciYro; 11-17-2004 at 05:34 PM.
 
  


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
Is Linux clustering for Video compression possible? A6Quattro Linux - General 1 07-17-2005 02:05 PM
good video compression? SciYro Linux - Software 5 09-06-2004 01:00 PM
best ways to save disk space mattl Linux - General 1 07-30-2004 05:06 PM
Double your disk space without compression. (hidden partitons) qwijibow Linux - Hardware 1 03-10-2004 12:04 PM
MainConcept Capture program has a video compression option but their is not soundcomp maximalred Linux - General 0 08-23-2003 06:23 AM


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