Quantcast FFmpeg: Letterboxing with FFmpeg (Aspect Ratio) - digitalFAQ.com Forums [Archives]
  #1  
10-02-2003, 04:55 AM
el_mozo el_mozo is offline
Free Member
 
Join Date: Sep 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Anyone was succesful transcoding a 16:9 file to a 4:3 *VCD using ffmpeg? By defaults it creates a very stretched image (it doesn't keep the aspect ratio). I would like to add black borders on top and bottom, but looks like I can't (you can't use negative -crop values like in transcode to add black borders).

Maybe there is some option / way to do it with ffmpeg that I couldn't find?

I think ffmpegX for mac/osx does it, does anyone know how?

Cheers
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
10-02-2003, 08:19 AM
Razorblade2000 Razorblade2000 is offline
Free Member
 
Join Date: Aug 2002
Posts: 323
Thanks: 0
Thanked 0 Times in 0 Posts
Uhhhmm... this is funny too...
He actually DOES add black borders...
I think he writes sth in the mpeg header...
If you use mplayer in Fullscreen, these black bars disappear somehow... but in windowed mode, they are there...

(I used the "-aspect" parameter)
Reply With Quote
  #3  
10-02-2003, 08:48 AM
el_mozo el_mozo is offline
Free Member
 
Join Date: Sep 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
He actually DOES add black borders...
He?? Who is he?? Do you mean ffmpeg or ffmpegX?

Quote:
If you use mplayer in Fullscreen, these black bars disappear somehow... but in windowed mode, they are there...

(I used the "-aspect" parameter)
So, could you paste here the complete ffmpeg command you used? I can't get the correct ratio on the output..

Thisi is what I used:
Code:
ffmpeg  -i /downloads/dvd/movie/file-1-1.vob -s 352x288 -r 25  -ac 2 -ar 44100 -ab 128  -b 890 -minrate 300 -maxrate 2500 -aspect 4:3  -g 18  -pass 1 movie-1-2.mpg
Reply With Quote
  #4  
10-02-2003, 08:53 AM
Razorblade2000 Razorblade2000 is offline
Free Member
 
Join Date: Aug 2002
Posts: 323
Thanks: 0
Thanked 0 Times in 0 Posts
he= ffmpeg

I think you were using -aspect the wrong way...

I used e.g.
blablabla -aspect 1.85

(blablabla=kwags encoding tip)


so for 4:3 this would be:
-aspect 1,3333

but maybe this is all nonsense
Reply With Quote
  #5  
10-02-2003, 09:13 AM
el_mozo el_mozo is offline
Free Member
 
Join Date: Sep 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
But, the aspect ratio for VCD has to be 4:3, hasn't it?

Anyway, I can't test it until I get home, but, do you get black borders (I mean new black borders, which weren't on the original file) using that aspect ratio?

Cheers
Reply With Quote
  #6  
10-02-2003, 10:48 AM
Razorblade2000 Razorblade2000 is offline
Free Member
 
Join Date: Aug 2002
Posts: 323
Thanks: 0
Thanked 0 Times in 0 Posts
uhhhmmm... maybe...
but as a kvcd-user I don't care much about standards
*g*

Black Borders ARE displayed... but NOT in fullscreen...

EDIT:
Damn... somehow the borders arent displayed on my standalone...
I have to switch manually to 16:9
Reply With Quote
  #7  
10-05-2003, 07:26 AM
Razorblade2000 Razorblade2000 is offline
Free Member
 
Join Date: Aug 2002
Posts: 323
Thanks: 0
Thanked 0 Times in 0 Posts
anything new???
still won't work fine...
Reply With Quote
  #8  
10-05-2003, 05:36 PM
el_mozo el_mozo is offline
Free Member
 
Join Date: Sep 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
I gave up

I couldn't see any difference on the output files, using "-aspect 4:3", "-aspect 1.333", "-aspect 1,333", "-aspect 16:9", "-aspect 1.777" or "-aspect 1,777". Always the same stretched output.

What version of ffmpeg are you guys using? Do you get good (not stretched) output while encoding 16:9 vobs (from DVD) to VCD, or KVCD?

Maybe we'll have to wait for a new ffmpeg version...
Reply With Quote
  #9  
10-05-2003, 06:06 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
I always get the full Anamorhpic output ( or the same aspect of my input ). No way to control it
I'm with you mozo. I'll just keep checking every new version every now and then.

-kwag
Reply With Quote
  #10  
10-06-2003, 03:34 AM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
ffmpeg doesn't add black borders, youll need another utilty to do that job. Maybe there's a way to insert something with the -vhook but I have no idea how. (maybe for subs too)
This is the main reason why I'am using a chain like:
Code:
mkfifo -m 660 stream.yuv
mkfifo -m 660 resized_stream.yuv
mplayer -benchmark -noframedrop -nosound -vo yuv4mpeg -osdlevel 0 $1 &
cat stream.yuv | yuvscaler -v 0 -M WIDE2STD -O SIZE_352x288 -n p > resized_stream.yuv &
ffmpeg -f yuv4mpegpipe -i resized_stream.yuv -an (+ options)...
encode audio seperatly and mux...
__________________
Groetjes Japie
Reply With Quote
  #11  
10-06-2003, 04:10 PM
Razorblade2000 Razorblade2000 is offline
Free Member
 
Join Date: Aug 2002
Posts: 323
Thanks: 0
Thanked 0 Times in 0 Posts
do these commands create new files???
or just a kind of frameserving?
Reply With Quote
  #12  
10-06-2003, 11:17 PM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Razorblade2000
do these commands create new files???
or just a kind of frameserving?
It's frameserving (or piping).
__________________
Groetjes Japie
Reply With Quote
  #13  
10-12-2003, 08:44 AM
Razorblade2000 Razorblade2000 is offline
Free Member
 
Join Date: Aug 2002
Posts: 323
Thanks: 0
Thanked 0 Times in 0 Posts
could you please tell me what each command does? got a lil curious... *g*

Would the mplayer command include postprocessing?
Reply With Quote
  #14  
10-12-2003, 10:52 AM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Code:
mkfifo -m 660 stream.yuv
mplayer -noframedrop -nosound -vop scale=352:240 -vo yuv4mpeg -osdlevel  $1 &
ffmpeg -f yuv4mpegpipe -i stream.yuv -an (+ options)...
First we create the pipe:
mkfifo -m 660 stream.yuv
After that we start mplayer to "fill" the stream with raw yuv images; -vo yuv4mpeg, it will serve frame for frame as fast as it's read from the pipe.
-vop scale does the scaling, you can use any mplayer filter in this.
The ffmpeg line explains itself, it only differs from direct encoding that we have to tell it to use a yuvstream: -f yuv4mpegpipe -i streamname
__________________
Groetjes Japie
Reply With Quote
  #15  
10-13-2003, 01:50 PM
Razorblade2000 Razorblade2000 is offline
Free Member
 
Join Date: Aug 2002
Posts: 323
Thanks: 0
Thanked 0 Times in 0 Posts
Hmmmm... I somehow can't get any results... always an error
I guess i'll give mencoder a try... should be the same results as ffmpeg...
Reply With Quote
  #16  
10-14-2003, 12:38 PM
japie japie is offline
Free Member
 
Join Date: Jul 2003
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Currently I'am testing a rework of my mkxvcd script using transcode to add direct dvd ripping (for backup purposes off-course)
I make an post if suxsesfull.
__________________
Groetjes Japie
Reply With Quote
  #17  
10-14-2003, 03:53 PM
Razorblade2000 Razorblade2000 is offline
Free Member
 
Join Date: Aug 2002
Posts: 323
Thanks: 0
Thanked 0 Times in 0 Posts
You should really take a look at this:
http://www.kvcd.net/forum/viewtopic.php?t=6822
sooooo many nice options!
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
FFMPEG: Do ffvfw and mencoder/ffmpeg give the same results? Razorblade2000 Video Encoding and Conversion 4 02-06-2004 04:23 PM
FFMPEG: Mencoder/ffmpeg aspect-ratio tetra Video Encoding and Conversion 10 12-11-2003 11:19 AM
FFMPEG: Ffmpeg and inter/intra matrices vidar Video Encoding and Conversion 4 10-31-2003 08:48 PM
FFMPEG: Encoding Audio: toolame,mp2enc or ffmpeg Razorblade2000 Video Encoding and Conversion 0 10-18-2003 03:04 PM
Ffmpeg y aspect ratio Anonymous Convertir y Codificar Video (Español) 1 09-21-2003 07:49 PM

Thread Tools



 
All times are GMT -5. The time now is 03:07 PM  —  vBulletin © Jelsoft Enterprises Ltd