LinuxQuestions.org
Review your favorite Linux distribution.
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 10-20-2005, 06:01 PM   #1
slothpuck
Member
 
Registered: Jul 2003
Distribution: Slackware 10.2 / Slamd 64
Posts: 86

Rep: Reputation: 15
Converting mpeg4 to mpeg1 using mencoder not working


Hi,

I have some MPEG4 video files I'd like to make much smaller by using the older MPEG1 video (also so that older computers and even dos can play them), but I also want to make the files smaller (so they can be uploaded without taking many megabytes of space). But the problem I'm having is I cannot get mencoder to produce any sort of valid mpeg1 or mpeg2 video file!

Here's the command line I came up with to convert mpeg4 to a low "internet-quality" mpeg1 fiormat;


Code:
mencoder 0x.avi -vf scale=256:192 -oac mp3lame -srate 16000 -lameopts cbr:br=16 -ovc lavc -lavcopts vcodec=mpeg1video:vbitrate=16 -o test.mp1
The files produced by this play ok in mencoder, trouble is they don't play back in anything *but* mplayer! I tried the file made by this on a win2k machine and it rejected the file, giving no video and thinking it's an mp3 file!

Update:
Code:
mencoder 0x.avi -vf scale=256:192 -oac mp3lame -srate 16000 -lameopts cbr:br=16 -ovc lavc -lavcopts vcodec=mpeg1video:vbitrate=16 -of mpeg -o test.mpg
This seemed to encode it properly to mpeg1 video, but the sound still only works in mplayer and not on anything else :-(

Can anyone see what I've missed out at all?

Thanks

SP[

Last edited by slothpuck; 10-20-2005 at 06:36 PM.
 
Old 10-21-2005, 07:06 AM   #2
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606

Rep: Reputation: 53
Get mencode version 1.07pre??

Look into these options as well
-mpegopts format=dvd -vf scale=256:192,harddup

This will be mpeg2, quite standard
mpeg1 video codec might work with these option, and -lavcopts vcodec=mpeg2video
 
Old 10-21-2005, 01:41 PM   #3
slothpuck
Member
 
Registered: Jul 2003
Distribution: Slackware 10.2 / Slamd 64
Posts: 86

Original Poster
Rep: Reputation: 15
I'm using version 1.0pre7-3.4.3 .... thanks for the info, I tried this to start off with (adding the -mpegopts) ;

(was hoping to keep it mpeg1 for now, but if it won't work .... x.x )

Code:
mencoder 0x.avi -vf scale=256:192 -oac lavc -lavcopts acodec=mp3:abitrate=32 -lameopts cbr:br=16 -ovc lavc -lavcopts vcodec=mpeg1video:vbitrate=16 -mpegopts format=mpeg1 -o test.mpg
But it still produces an *invalid* mpeg1 file - mplayer played it, avidemux opened it but claimed there was no sound (but it still worked). A windows PC rejected the file immediately.

Could it be that it's impossible to make mpeg1 on linux?

SP

Last edited by slothpuck; 10-21-2005 at 02:03 PM.
 
Old 10-24-2005, 01:15 AM   #4
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606

Rep: Reputation: 53
Have never tried mpeg1,

see for avi to mpeg2 dvd compliant example I posted
http://www.linuxquestions.org/questi...hreadid=360138

If this works for you, then it should be easy to change vcodec=mpeg2video
to 1, (some other tweaks may be needed). If I were you, I would start from there.

I am not sure, but I do not think mp3 is compliant with the mpeg1 container

Last edited by Emmanuel_uk; 10-26-2005 at 01:50 AM.
 
Old 10-25-2005, 02:24 PM   #5
slothpuck
Member
 
Registered: Jul 2003
Distribution: Slackware 10.2 / Slamd 64
Posts: 86

Original Poster
Rep: Reputation: 15
Thanks for that, I'll give that a try and see what happens,

SP
 
  


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
mencoder mpegopts "not an option" format=dvd (converting avi to dvdauthor compliant) Emmanuel_uk Linux - Newbie 1 09-16-2005 01:52 PM
mencoder problem converting *.jpg to .avi whistl Linux - Software 9 06-29-2005 01:32 PM
help converting an Image sequenece.....nothing is working edman007 Linux - Software 1 04-13-2005 06:30 PM
trouble with mencoder converting wma to mp3 TheOneAndOnlySM Linux - Software 0 11-01-2004 09:26 PM
mpeg1 editor cblamer Linux - Software 2 01-01-2004 12:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:08 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
Open Source Consulting | Domain Registration