Log in

View Full Version : How to crop the video size when I remux a mp4


sdf
2nd September 2012, 10:05
I am using GPAC 0.50
currently the command is:
"mp4box.exe" -add "f:\in.mp4#video" -add "f:\in.mp4#audio" "f:\out.mp4"


Now I have a mp4 file (1920x1080 H.264/AVC AAC)
In fact, the actual video size is 1440x1080, that means two black blank at left and right sides are encoded in video

so I want to set the display to 1440x1080 when I remux the mp4, I think mp4 container have such function, may I know what the command is?



besides, the two blanks are 240x1080, 240px is times of 16px, so I guess it is possible to crop the actual size to 1440 without losing any quality rather than set the display size.

am I right? if yes, may I know how?

Kurtnoise
6th September 2012, 12:22
Hi,

Your command line seems odd. #video & #audio switches are dedicated to AVI files. You should use #ID where ID is the stream number from your input file that you want to keep...

Then, you cannot crop video size without reencoding. However, you can specify the Pixel Aspect Ratio value in your video stream.

So, something like this :

mp4box -add input_video_stream.mp4#ID:par=X:Y -add input_audio_stream.mp4#ID output.mp4

You can find IDs from this command :

mp4box -info input.mp4

Simon88
13th September 2012, 19:27
MP4Box 0.50 crashes when cropping video size using large par= values.

I have some AVC/AAC files & they are 848x480p, so (16/9)/(848/480) = (160/159) in order to display precisely on a 16:9 display.

For par=160:159 , Mp4Box crashes every time. Even using latest test builds...

Using values less than a hundred, eg par=1:1 works perfectly, or par=8:9 to scale 720x480p onto 4:3 works great!

Are others having this issue?

thanx...