LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   mencoder (http://www.linuxquestions.org/questions/linux-software-2/mencoder-308055/)

jackstoage 03-30-2005 10:52 PM

mencoder
 
I am trying to convert a .mov to a .avi using mencoder I install via mandrake urpmi. I am using the command:

mencoder -o paddleboat.avi -ovc lavc -oac lavc -lavcopts acodec=mp3 -srate 48000 paddleboat.mov

and I get the response:

MEncoder 1.0pre3-3.3.2 (C) 2000-2003 MPlayer Team

CPU: Intel Pentium 4/Xeon/Celeron Northwood 2674 MHz (Family: 8, Stepping: 9)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with Runtime CPU Detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
Reading /root/.mplayer/codecs.conf: Can't open '/root/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: 61 audio & 169 video codecs
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file /root/.mplayer/mencoder: No such file or directory
font: can't open file: /root/.mplayer/font/font.desc
font: can't open file: /usr/share/mplayer/font/font.desc
success: format: 0 data: 0x0 - 0x21B8FC
QuickTime/MOV file format detected.
--------------
MOV track #0: 39 chunks, 117 samples
MOV: Found MPEG4 movie Elementary Stream Descriptor atom (69)!
Image size: 640 x 480 (24 bpp)
Display size: 640 x 480
Fourcc: mp4v Codec: 'MPEG-4'
--------------
MOV track #1: 39 chunks, 0 samples
Audio bits: 16 chans: 1 rate: 12000
Fourcc: ulaw
--------------
MOV: longest streams: A: #1 (39 samples) V: #0 (117 samples)
[V] filefmt:7 fourcc:0x7634706D size:640x480 fps:13.01 ftime:=0.0769
==========================================================================
Opening audio decoder: [alaw] aLaw/uLaw audio decoder
AUDIO: 12000 Hz, 1 ch, 16 bit (0x10), ratio: 12000->24000 (96.0 kbit)
Selected audio codec: [ulaw] afm:alaw (uLaw)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1 (-1=autodetect) osd: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
Audio LAVC, couldn't find encoder for codec mp3.

while all the other "can't find ...." responses are puzzling the holdup I think is the last line above. Obviously there is somthing I don't have. Anybody know what it is?

Jack

acid_kewpie 03-31-2005 04:06 AM

i'd assume your built version of ffmpeg doesn't include mp3 support. I don't *think* that was around when pre3 was released, you should upgrade to the newest release pre6a and try again. or alternatively use "-oac mp3lame" instead

jackstoage 04-03-2005 10:45 PM

Well I got it to run. it produces a file that appears to be OK in that it is a different size than the original and there were not any error messages. the resulting avi file plays in xine, mplayer, etc. but windows" players won't play the video, only the sound. the error message is that it can't find a decompresser for the video. below is the command and the output from the command.

[dad@localhost clips]$ mencoder -o test3.avi -ovc lavc -oac lavc -lavcopts acodec=mp3 -srate 44100 paddleboat.mov
MEncoder 1.0pre6-3.4.1 (C) 2000-2004 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Foster (Family: 8, Stepping: 9)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
77 audio & 188 video codecs
File not found: 'frameno.avi'
Failed to open frameno.avi
success: format: 0 data: 0x0 - 0x21b8fc
QuickTime/MOV file format detected.
--------------
MOV track #0: 39 chunks, 117 samples
MOV: Found MPEG4 movie Elementary Stream Descriptor atom (69)!
Image size: 640 x 480 (24 bpp)
Display size: 640 x 480
Fourcc: mp4v Codec: 'MPEG-4'
--------------
MOV track #1: 39 chunks, 0 samples
Audio bits: 16 chans: 1 rate: 12000
Fourcc: ulaw
--------------
MOV: longest streams: A: #1 (39 samples) V: #0 (117 samples)
VIDEO: [mp4v] 640x480 24bpp 13.010 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:7 fourcc:0x7634706D size:640x480 fps:13.01 ftime:=0.0769
==========================================================================
Opening audio decoder: [alaw] aLaw/uLaw audio decoder
AUDIO: 12000 Hz, 1 ch, 16 bit (0x10), ratio: 12000->24000 (96.0 kbit)
Selected audio codec: [ulaw] afm:alaw (uLaw)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1 (-1=autodetect) osd: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
Building audio filter chain for 12000Hz/1ch/16bit -> 44100Hz/2ch/16bit...
Writing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
VDec: vo config request - 640 x 480 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
videocodec: libavcodec (640x480 fourcc=58564944 [DIVX])
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

1 duplicate frame(s)!
Pos: 9.0s 117f ( 0%) 50fps Trem: 0min 0mb A-V:0.133 [942:224]]
Flushing video frames

Writing AVI index...
Fixing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

Video stream: 942.137 kbit/s (117767 bps) size: 1059099 bytes 8.993 secs 117 frames

Audio stream: 224.000 kbit/s (28000 bps) size: 250149 bytes 8.934 secs
[dad@localhost clips]$

can anyone see the problem?

Thanks

jack

Electro 04-04-2005 03:15 AM

Make sure you have divx installed in Windows. Some people prefere to use xvid because it gives a much better picture.

Why you want to re-encode the mov file (good audio sync) to an avi file (poor audio sync)?

jackstoage 04-04-2005 01:02 PM

Thanks for the suggestion.

Well, My mother just wants to click on the attachment an see a video clip of the grandkids, or stick a CD in the drive and have a webpage autoload so she can click on the thumbnails.

My still camera saves video clips in .mov and Quicktime doesn't come on the winblows CD so she probably doesn't have it installed. Do you want to call her and explain how to download and install it over the phone? Heck, she's 70 years old I'm surprised she knows what she does. Unfortunately, many of my siblings aren't much more computer savvy. That's one reason why Windows has so much market share, but that's another story.

I think it may have a bug of which I wrote him on tovid.sourceforge.net. After I made a small edit I found the TOVID script produces a .mpg from the .mov that is cross-platform.

I may be wrong but a .avi might be more compact for sending as an attachment in email and maintaining the same video scale.

Right or wrong, those are my reasons.

Jack

jackstoage 04-05-2005 09:05 AM

how can I adjust the above mencoder command to use xvid?

Jack

Electro 04-05-2005 04:40 PM

To use xvid, you have to first compile and install xvid. Then recompile mplayer. During compiling mplayer, it should find xvid and include it. Again you have to worry about the other user that is going to use it, so you need to explain in detail how to install xvid on other platforms like Windows.

Installing Quicktime is very easy in Windows. She just needs the basic install of Quicktime which is set by default. AVI files are not any smaller than mov files.

MPEG (mpg, mpeg) files are the easiest to use on any platform because by now the OS comes support for them.

jackstoage 04-06-2005 09:54 PM

Here is what I have learned and what I still don't know.



1. The first MEncoder command I found on a DVDauthor Howto website as shown on the first page of this thread hits a brickwall at the mp3 encode part of the process.I altered the second MEncoder command myself (3rd page of threead). I changed only the frequency of the audio output (48000 to 44100) and it worked. Is it an error in that author's command of is it a difference in the software versions he and I have?



2. DVgrab (and Kino) will output avi files from digital cameras that play on Winblows without DivX installed but avi files generated from the above commands don't (personal experience). This means that the DVgrab avi's don't use mpeg4 DivX encoding.



3. At least on my W2K box DivX is not included in the typical Winblows installation; you have to go get it. I don't know about XP.



4. Pardon my philosophy, but the rest of the world is not like you and me. They don't care how it works; just that it works. There is no accounting for them, so we have to accommodate them because they outnumber us. Bill gates figured that out a long time ago except he wants us to do it all with his products. Sending someone a file that requires them to download something else to run it is like giving a kid a toy without batteries. If you give it to them itís your obligation to make sure they can run it; which brings me to the fifth page in this thread. I can't tell my mom and all my brothers and sisters and friends and neighbors they have to download and install DivX or else they can't have view the video clips of my kids running around like idiots. Itís a poor hostage. I suppose like the battery analogy I could include the DivX executable with instructions as another attachment in the email. However simple it is I might get 50% of them to install it on the logic that some day they might receive something important that needs it.



5. On the 4th page you ask why I don't just use mpg's? I started using Linux out of curiosity; a dislike for the monopoly Winblows has on the market and a belief that that monopoly stifles creativity. OK, the real reason is I have five computers in my house and I don't want to spend $500 on XP. That's why I stopped at W2K. Specifically, though, I found a net peace of software written by Satoru Takabayashi called ZPhoto (see zphoto.sourceforge.net). Itís a Web/Flash-based zooming photo album generator that I think is slicker than... well it's pretty slick. Check it out (tip: you need avifile-devel). I think it has a lot of potential and he needs some encouragement. As an added bonus it will create a video clip based album but only from avi files and only in the Linux version. I want to use this program to display a series of stills and video clips on a CD that will autorun when inserted (donít ask why). Video from my DV camera is no problem (see point 2), but video from my still camera stores in QT format. Thatís why I have to convert them to avi.

I think I need a MEncoder command (or other) that will generate a type 2 avi file (Video for Windows compatible) that is not DivX dependent from a .mov (I bet most people don't even have Quicktime installed on their Windows systems or if they do they couldnít tell you how it got there). In other words I need an avi that will open in winblows without having to install additional software.

Can that be done in Linux? I have tried a number of combinations of MEncoder commands with no luck. When using the ovc cammand with mpeg2 video I can't find a compatable oac command.

Sorry for being so long winded,

Jack

Electro 04-06-2005 11:12 PM

mencoder does not support audio when encoding a file to mpeg. You have to use trancode or ffmpeg.

Try using the command below.
mencoder -o test3.avi -ovc lavc -oac lavc -lavcopts vcodec=msmpeg4v2:vhq:acodec=mp3:abitrate=64 -srate 44100 paddleboat.mov

The msmpeg4v2 should work in Windows or it should download the codec from the server. The vhq keeps the quality of the video high. The abitrate set to 64 will be a lot lower than the default that is set at 224. You can set it at 32 because the quality of the original is low. The bitrate of the video is set at 8000 kilobits which is very high for your orginal file.

Quote:

1. The first MEncoder command I found on a DVDauthor Howto website as shown on the first page of this thread hits a brickwall at the mp3 encode part of the process.I altered the second MEncoder command myself (3rd page of threead). I changed only the frequency of the audio output (48000 to 44100) and it worked. Is it an error in that author's command of is it a difference in the software versions he and I have?
It could be, but I think how mp3 is written in mplayer.

Quote:

2. DVgrab (and Kino) will output avi files from digital cameras that play on Winblows without DivX installed but avi files generated from the above commands don't (personal experience). This means that the DVgrab avi's don't use mpeg4 DivX encoding.
DVgrab outputs raw DV files.

Quote:

3. At least on my W2K box DivX is not included in the typical Winblows installation; you have to go get it. I don't know about XP.
DivX also have to be installed in Windows XP.

Quote:

4. Pardon my philosophy, but the rest of the world is not like you and me. They don't care how it works; just that it works. There is no accounting for them, so we have to accommodate them because they outnumber us. Bill gates figured that out a long time ago except he wants us to do it all with his products. Sending someone a file that requires them to download something else to run it is like giving a kid a toy without batteries. If you give it to them itís your obligation to make sure they can run it; which brings me to the fifth page in this thread. I can't tell my mom and all my brothers and sisters and friends and neighbors they have to download and install DivX or else they can't have view the video clips of my kids running around like idiots. Itís a poor hostage. I suppose like the battery analogy I could include the DivX executable with instructions as another attachment in the email. However simple it is I might get 50% of them to install it on the logic that some day they might receive something important that needs it.
There is a lot of DivX encode files. People should download the codec anyways. My sister has it installed, so it is not hard. I was impress that she installed it. If people can read, then installing it is easy. DivX can always be uninstalled if the user picked the wrong setting. This goes the same for Xvid. If people can read, installing Xvid is easy. Also installing Apple Quicktime is easy and most movie trailers are encoded in quicktime so there is one reason why they should install it.

Quote:

5. On the 4th page you ask why I don't just use mpg's? I started using Linux out of curiosity; a dislike for the monopoly Winblows has on the market and a belief that that monopoly stifles creativity. OK, the real reason is I have five computers in my house and I don't want to spend $500 on XP. That's why I stopped at W2K. Specifically, though, I found a net peace of software written by Satoru Takabayashi called ZPhoto (see zphoto.sourceforge.net). Itís a Web/Flash-based zooming photo album generator that I think is slicker than... well it's pretty slick. Check it out (tip: you need avifile-devel). I think it has a lot of potential and he needs some encouragement. As an added bonus it will create a video clip based album but only from avi files and only in the Linux version. I want to use this program to display a series of stills and video clips on a CD that will autorun when inserted (donít ask why). Video from my DV camera is no problem (see point 2), but video from my still camera stores in QT format. Thatís why I have to convert them to avi.
What does this have to do with mpeg files. Use transcode or ffmpeg to make mpeg files. Microsoft does not own MPEG. MPEG owns them selves.

jackstoage 04-22-2005 10:02 PM

thanks, Electro, that works just fine. I read books and I ask people. I find I learn more from asking people. Thanks for being available to ask our questions.

Jack


All times are GMT -5. The time now is 05:33 PM.