DivX -> VCD + maintaining aspect ratio = impossible OR Howto ADD black borders
I've got an mpeg4 avi file... at the beginning of the encode process, he says: VDec: vo config request - 592 x 256 (preferred csp: Planar YV12) --> 592 x 256 + Black Borders which aren't hardcoded in the movie --> he adds them after I switch to Fullscreen I want to get an PAL VCD --> I need 352x288 My Try: mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vop scale -zoom -xy 352 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' --> gives me an mpeg1 file, has the correct aspect ratio but only "VO: [xv] 352x152 => 352x152 Planar YV12" --> black borders are added when I switch to fullscreen -> 352x288 with black borders ? I want to have the black borders in the Video File and not achieved over the aspect ratio by mplayer :-( (I actually NEED them to be in the file because I need a 352x288 PAL VCD resolution) encoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vop scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' --> gives me 352x288 BUT image is totally stretched any solution for my problem???
any solution for my problem???
Yes, RTFM and search for the option 'expand'
_______________________________________________ RTFM!!! http://www.MPlayerHQ.hu/DOCS Search: http://www.MPlayerHQ.hu/cgi-bin/htsearch http://mplayerhq.hu/mailman/listinfo/mplayer-users
Andreu Escudero wrote:
[Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
any solution for my problem???
Yes, RTFM and search for the option 'expand'
WAHHHHHHH! I searched the man pages for the last 3 hours (maybe because there is no mencoder only man page... there is only a 2 billion pages mplayer+mencoder one)! And experimented with loooots of options... I also did some google searches (I could only find "remove black borders")... Then I searched the documentation.html + the encoding.html + faq.html + without success... my fault was that I did only a short look into the video.html (when I saw the first page I thought this is where video encoding is explained technicaly :-/ (seems as there isn't an english one? I could only find a german one)
On dt, 2003-10-14 at 00:47, Marc wrote:
[Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html] Andreu Escudero wrote:
[Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
any solution for my problem???
Yes, RTFM and search for the option 'expand'
WAHHHHHHH! I searched the man pages for the last 3 hours (maybe because there is no mencoder only man page... there is only a 2 billion pages mplayer+mencoder one)! And experimented with loooots of options... I also did some google searches (I could only find "remove black borders")... Then I searched the documentation.html + the encoding.html + faq.html + without success... my fault was that I did only a short look into the video.html (when I saw the first page I thought this is where video encoding is explained technicaly :-/ (seems as there isn't an english one? I could only find a german one)
Extracted from the man page: expand[=w:h:x:y:o] Expands (not scales) movie resolution to the given value and places the unscaled original at coordinates x, y. Can be used for placing subtitles/OSD in the resulting black bands. w,h expanded width,height (default: original width,height). Negative values for w and h are treated as offsets to the original size. EXAMPLE expand=0:-50:0:0 adds a 50 pixel border to the bottom of the picture x,y position of original image on the expanded image (default: center) o OSD/subtitle rendering 0: disable (default) 1: enable
_______________________________________________ RTFM!!! http://www.MPlayerHQ.hu/DOCS Search: http://www.MPlayerHQ.hu/cgi-bin/htsearch http://mplayerhq.hu/mailman/listinfo/mplayer-users
Extracted from the man page:
expand[=w:h:x:y:o] Expands (not scales) movie resolution to the given value and places the unscaled original at coordinates x, y. Can be used for placing subtitles/OSD in the resulting black bands.
w,h expanded width,height (default: original width,height). Negative values for w and h are treated as offsets to the original size.
EXAMPLE expand=0:-50:0:0 adds a 50 pixel border to the bottom of the picture x,y position of original image on the expanded image (default: center)
o OSD/subtitle rendering 0: disable (default) 1: enable
h3h3... I searched for "borders" (should have looked for "border") encoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vf expand=592:480,scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> only green video ... totally wrecked (BUT 352:288) encoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vf expand=592:480 -vop scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video but 592x480 (=he added the borders but didn't resize afterwards) mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vf expand=20:20:0:0 -vop scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video... but no resize and no borders mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vop scale=352:208 -vf expand=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video... but no resize and no borders mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vf expand=20:20:0:0 -vf scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video... resized to 352x288 but no borders (-> streteched) mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vf expand=20:20:0:0,scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video... resized to 352x288 but no borders (-> streteched) mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vop expand=20:20:0:0,scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video... resized to 352x288 but no borders (-> streteched I am very new to mplayer... could someone please post me a correct commandline??? I want an 592x256 avi file down to 352x288 (so resized + borders added) thx in advance :-D
Hi, if your movie is 592:256 and you want to keep is A/R on a VCD, then since VCD is 352:288 with 4:3 AR => 384x288 when played, this simple proportion says: 592:256 = 384:y , so y = (256*384)/592 = 166, so you have to scale to 352:166 and add borders up and down: mplayer film.avi -vf scale=352:166,expand=352:288 ... or mplayer film.avi -vop expand=352:288,scale=352:166 ... and when it's played back by you dvd player it's adjusted to 4:3. If mplayer doesn't store A/R in your outfile, then simply add mplayer -aspect 4:3 outfile
h3h3... I searched for "borders" (should have looked for "border")
encoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vf expand=592:480,scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> only green video ... totally wrecked (BUT 352:288)
encoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vf expand=592:480 -vop scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video but 592x480 (=he added the borders but didn't resize afterwards)
mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vf expand=20:20:0:0 -vop scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video... but no resize and no borders
mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vop scale=352:208 -vf expand=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video... but no resize and no borders
mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vf expand=20:20:0:0 -vf scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video... resized to 352x288 but no borders (-> streteched)
mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vf expand=20:20:0:0,scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video... resized to 352x288 but no borders (-> streteched)
mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vop expand=20:20:0:0,scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video... resized to 352x288 but no borders (-> streteched
I am very new to mplayer... could someone please post me a correct commandline??? I want an 592x256 avi file down to 352x288 (so resized + borders added)
thx in advance :-D
_______________________________________________ RTFM!!! http://www.MPlayerHQ.hu/DOCS Search: http://www.MPlayerHQ.hu/cgi-bin/htsearch http://mplayerhq.hu/mailman/listinfo/mplayer-users
On dt, 2003-10-14 at 20:35, Marc wrote:
[Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html] Extracted from the man page:
expand[=w:h:x:y:o] Expands (not scales) movie resolution to the given value and places the unscaled original at coordinates x, y. Can be used for placing subtitles/OSD in the resulting black bands.
w,h expanded width,height (default: original width,height). Negative values for w and h are treated as offsets to the original size.
EXAMPLE expand=0:-50:0:0 adds a 50 pixel border to the bottom of the picture x,y position of original image on the expanded image (default: center)
o OSD/subtitle rendering 0: disable (default) 1: enable
h3h3... I searched for "borders" (should have looked for "border")
encoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vf expand=592:480,scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> only green video ... totally wrecked (BUT 352:288)
encoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vf expand=592:480 -vop scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video but 592x480 (=he added the borders but didn't resize afterwards)
mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vf expand=20:20:0:0 -vop scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video... but no resize and no borders
mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vop scale=352:208 -vf expand=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video... but no resize and no borders
mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vf expand=20:20:0:0 -vf scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video... resized to 352x288 but no borders (-> streteched)
mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vf expand=20:20:0:0,scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video... resized to 352x288 but no borders (-> streteched)
mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vop expand=20:20:0:0,scale=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' -> good video... resized to 352x288 but no borders (-> streteched
I am very new to mplayer... could someone please post me a correct commandline??? I want an 592x256 avi file down to 352x288 (so resized + borders added)
thx in advance :-D
-vop is the OLD option to apply filters, they are applied in reverse order. -vf is the NEW option to apply filters, they are applied in the given order. You should use one or the other, but not both! Different filters are sepparated by commas. So, to resize a 592x256 to obtain a 352x288 with black borders, then you shoud resize to 352x166 (I assume the source avi has square pixels, where the MPEG pixels 352x288 are not square, when using square pixels it would be 384x288, so 384x166 with square pixels = 352x166 with MPEG pixels (CCIR or something like this)). and after that expand to 352x288 There are two ways: mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vf scale=352:166,expand=352:288 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg' or mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -nosound -vop expand=352:288,scale=352:166 '/windows/E/Incoming/AW.avi' -o '/windows/E/AW.mpg'
_______________________________________________ RTFM!!! http://www.MPlayerHQ.hu/DOCS Search: http://www.MPlayerHQ.hu/cgi-bin/htsearch http://mplayerhq.hu/mailman/listinfo/mplayer-users
Thanks to both of you... works fine now :-D Guess i'll try to throw myself into b-frames, gop lengths, 2pass encoding and postprocessing to create nice mpeg 1 kvcds :-) (I got nice results from ffmpeg (mpeg 1, 2 pass, gop of 25 for PAL movies, 2 bframes, no pp), but I couldn't get it to keep the aspect ratio/add borders... As mencoder CAN do this, I am very curious about mencoder options which will allow me to use the same features (or even more... now I could use custom matrices *drool*))
Advice: avoid bframes and use mbd=2 Marc wrote:
[Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html] Thanks to both of you... works fine now :-D Guess i'll try to throw myself into b-frames, gop lengths, 2pass encoding and postprocessing to create nice mpeg 1 kvcds :-)
(I got nice results from ffmpeg (mpeg 1, 2 pass, gop of 25 for PAL movies, 2 bframes, no pp), but I couldn't get it to keep the aspect ratio/add borders... As mencoder CAN do this, I am very curious about mencoder options which will allow me to use the same features (or even more... now I could use custom matrices *drool*))
_______________________________________________ RTFM!!! http://www.MPlayerHQ.hu/DOCS Search: http://www.MPlayerHQ.hu/cgi-bin/htsearch http://mplayerhq.hu/mailman/listinfo/mplayer-users
Nico wrote:
Advice:
avoid bframes and use mbd=2
What does mdb=2 do (and where to put it?) ? (none of the docs contained "mbd" + search is down? -> internal server error) and why avoid b-frames? under ffmpeg they worked pretty fine... and as this is the same core?! btw: is there an searchable document where all options are explained/listed so I can stop getting on your nerves?
On dt, 2003-10-14 at 22:06, Marc wrote:
[Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html] Nico wrote:
Advice:
avoid bframes and use mbd=2
What does mdb=2 do (and where to put it?) ? (none of the docs contained "mbd" + search is down? -> internal server error)
and why avoid b-frames? under ffmpeg they worked pretty fine... and as this is the same core?!
btw: is there an searchable document where all options are explained/listed so I can stop getting on your nerves?
For the options, I usually look to the man page. If you do 'info mplayer > mplayer.info' you'll get a nice text file which can be searched with any text editor.
_______________________________________________ RTFM!!! http://www.MPlayerHQ.hu/DOCS Search: http://www.MPlayerHQ.hu/cgi-bin/htsearch http://mplayerhq.hu/mailman/listinfo/mplayer-users
Can Mencoder produce it? I am asking because the stereo Option has MP2 mentioned: " -stereo <mode> Select type of MP2/MP3 stereo output." but he tells me that only these are available: "Available codecs: copy - frame copy, without re-encoding (useful for AC3) pcm - uncompressed PCM audio mp3lame - cbr/abr/vbr MP3 using libmp3lame" or do I have to do it via another tool (ffmpeg e.g.) and multiplex later?
Marc wrote:
[Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html] Can Mencoder produce it?
I am asking because the stereo Option has MP2 mentioned: " -stereo <mode> Select type of MP2/MP3 stereo output."
but he tells me that only these are available: "Available codecs: copy - frame copy, without re-encoding (useful for AC3) pcm - uncompressed PCM audio mp3lame - cbr/abr/vbr MP3 using libmp3lame"
it mp2 is missing then mencoder can't produce mp2
or do I have to do it via another tool (ffmpeg e.g.) and multiplex later?
leave it alone and use toolame.
_______________________________________________ RTFM!!! http://www.MPlayerHQ.hu/DOCS
^^^^^^^^^^^
On Tue, 14 Oct 2003 00:47:27 +0200 Marc <marc.seeger@arcor.de> wrote:
WAHHHHHHH! I searched the man pages for the last 3 hours (maybe because there is no mencoder only man page... there is only a 2 billion pages mplayer+mencoder one)!
Because mplayer and mencoder share 90% of their option. Two separate manpages woulbe be just a waste of time. Attila Kinali -- egp ist vergleichbar mit einem ikea bausatz fuer flugzeugtraeger -- reeler in +kaosu
participants (4)
-
Andreu Escudero -
Attila Kinali -
Marc -
Nico