I have several videos that I've ripped from DVDs into MKV files using MakeMKV. Some of the videos rip the original 16:9 video into a 4:3 window, "squishing" the video horizontally only. In other words, black bars are only on the sides.
Following the instructions in this thread:https://forum.videohelp.com/threads/293271-stretch-a-4-3-video-back-to-16-9, I am able to override the Display aspect ration and the videos playback with the correct 16:9 ratio using mkvmerge GUI. I've attached a MediaInfo file for this example (Rebus-S01E04-Mortal Causes.mkv.mediainfo.xml)
In another example, the original 16:9 video is ripped to the correct aspect ration, but it doesn't fill the screen; there are black bars on the top, bottom and both sides.
When I use the same process to override the Display Aspect Ratio, the video is stretched to fill the screen horizontally, but black bars remain on the top and bottom and the vertical dimension isn't stretched.
Original file MediaInfo: Rebus-S01E04-Mortal Causes.mkv.mediainfo.xml
"Stretched" file MediaInfo: Rebus-S01E04-Mortal Causes (1).mkv.mediainfo.xml
How do I stretch/crop the videos to display correctly?
Is there a better way to rip the videos to the correct aspect ratio to start with?
I know that most media players/TVs will allow you to zoom the video, but I'm ripping these to convert and transfer to an iPad, which doesn't have the zoom feature.
Thanks in advance for your help!
+ Reply to Thread
Results 1 to 23 of 23
-
-
-
Looks 4:3 to me.
In another example, the original 16:9 video is ripped to the correct aspect ration, but it doesn't fill the screen; there are black bars on the top, bottom and both sides. -
It's a 14:9 "compromise" ratio that BBC (and others) were so fond of a while back. Either crop to 16:9 with the live image touching the top and bottom or 4:3 with the live image touching the sides.
Depending on your player, you can also just crop to the live image. -
I've ripped the video, in order to convert and play it on an iPad. The iPad won't zoom the image as most players will, so I'll need to do the cropping and converting before I put it on the iPad.
Can someone point me to a procedure to accomplish this? Can it be done with mkvmerge GUI? Is there another, better tool? -
That's interesting. Learn something new every day. So even the upper picture isn't at the right aspect ratio, but slightly too wide?
Then perhaps he can fix it after all in MKVMerge by setting it to 4:3, maybe? Or does he still have to reencode?Last edited by manono; 16th Dec 2013 at 16:13.
-
The actual aspect ratio appears correct. But it has the added windowboxing typical of the SD output of an HD cable box. Oddly, OP's screengrabs are (almost) 1920x1080 while his Mediainfos say 720x480, hmm.
iPad will zoom to whatever the physical dimensions of the actual file are, so he can crop or not as he pleases. However, since MKV files can't be played on the iPad (at least not the native player,) a lot of this is moot. -
I didn't mean to confuse anyone. The screen grabs are screen captures rather than still frames from the actual audio, so the graphics info associated with them doesn't represent the actual video info.
I have been using ffmpeg to convert other mkv videos (once I have them in the correct aspect ratio) to the proper mp4 format to play on the iPad using the following:FFMPEG -y -i INPUT -threads CPU_CORES -vcodec libx264 -level 31 -subq 6 -me_range 16 -qmin 10 -qmax 50 -g 300 -s 1280xHEIGHT -r 29.97 -b 2500k -maxrate 4000k -acodec aac -strict -2 -ac 2 -ab 160k -ar 48000 -f mp4 OUTPUT
Is there a way to use ffmpeg to crop and convert the videos in the same step (or multiple steps)? -
Here's a pretty good explanation of cropping with ffmpeg including a number of options:
http://www.renevolution.com/understanding-ffmpeg-part-iii-cropping/
Your screencaps hide more than they show -- we don't know which black bars are part of your video or which may be added by the computer. The aspect ratio appears to be displaying correctly, taking the two images together it's probably letterboxed 4:3. The "live" image appears to be 14:9. iPads will play 14:9 square pixel images with no problem. -
Thanks for the cropping link! I was able to use that information to develop the following ffmpeg encode:
Code:FFMPEG -y -i INPUT -threads CPU_CORES -vcodec libx264 -level 31 -subq 6 -me_range 16 -qmin 10 -qmax 50 -g 300 -s 704x416 -r 29.97 -b 2500k -maxrate 4000k -acodec aac -strict -2 -ac 2 -ab 160k -ar 48000 -vf "crop=704:416:12:34" -f mp4 OUTPUT
Code:ffmpeg -i INPUT -vf "cropdetect=24:16:0" dummy.avi
The conversion worked, but now the video has horizontal lines that degrade the picture. I've attached a screen grab from VLC to illustrate.
I've included MediaInfo xml files for both versions.
Is there something in my settings I can tweak to reduce and/or remove the lines? -
I think you resized to 704x416, not cropped.
http://www.ffmpeg.org/ffmpeg-filters.html#crop
http://www.ffmpeg.org/ffmpeg-filters.html#Examples-33
Then, since your video is interlaced you'll need to encode interlaced, or deinterlace and encode progressive.Last edited by jagabo; 4th Jan 2014 at 19:32.
-
@jagabo: the ' -vf "crop=704:416:12:34" '-part at the end of his call (bad placement) should do the cropping.
-
You're right. I didn't scroll far enough. I saw the comingled fields in the sample image and scrolled as far as the "-s 704x416" and assumed that he simply resized. Then the resizing problem is because the video was encoded progressive, not interlaced. Add -tff to the x264 command line. Or inverse telecine or deinterlace, and encode progressive.
-
Sorry to be such a newb, but can you provide the syntax to adjust my command line above?
Where do I put TFF?
Or conversely, how do I deinterlace? What is the command syntax?Last edited by elprice7345; 5th Jan 2014 at 16:40.
-
I ended up having to deinterlace the video in order to play it in itunes and/or the ipad.
The ffmpeg string that ended up working is:
Code:FFMPEG -y -i INPUT -threads CPU_CORES -vcodec libx264 -level 31 -subq 6 -me_range 16 -qmin 10 -qmax 50 -g 300 -r 29.97 -b:v 2500k -maxrate 4000k -acodec aac -strict -2 -ac 2 -ab 160k -ar 48000 -vf "crop=704:416:12:34, yadif" -f mp4 OUTPUT
-
I transcoded again with the corrected filter, but didn't see much difference. Should I?
Is this a good general policy to always deinterlace first before applying other filters? -
I transcoded again with the corrected filter, but didn't see much difference. Should I?
Is this a good general policy to always deinterlace first before applying other filters?
-> in general:
1st do color manipulations
2nd do deinterlacing
3rd do the rest
Similar Threads
-
Cropping AVI 4:3 to 16:9 need software that allows floating cropping area
By tonyclem in forum EditingReplies: 11Last Post: 26th Nov 2012, 06:48 -
Expanding the whole subtitle
By Night 89 in forum SubtitleReplies: 3Last Post: 2nd Jan 2012, 19:13 -
Cropping MP4 video
By Castor troy in forum EditingReplies: 1Last Post: 4th Aug 2011, 08:02 -
Video cropping problem
By KillEmAll007 in forum EditingReplies: 6Last Post: 31st Dec 2009, 21:06 -
Cropping Video (Best procedure) ???
By Datahead in forum EditingReplies: 5Last Post: 7th Jul 2009, 18:53