Correcting wrong aspect ratio….

Another video thing.

I’ve started to digitize some old VHS tapes with family stuff on it.

Took my old VHS machine from the attic, blew of some dust and connected it with my Panasonic dmr-eh68 Hardisk recorder with a svhs cable.

I put the Harddisk recorder in XP mode (highest quality) and started recording tapes in blocks from less than 1 hour to the hard drive. And copied these movies onto a dvd’s.

Now for showing some scenes to family (by uploading to youtube), I wanted to edit these files with kdenlive. Therefor I copied the VOB files from the DVD to my Laptop and merged them with cat:

$ cat VTS_01_1.VOB VTS_01_2.VOB VTS_01_TOT.VOB

This VOB had some errors in the heading, with a simple ffmpeg command this was quickly resolved. Just copy every thing into an mkv.

$ ffmpeg -i VTS_01_TOT.VOB -vcodec copy -acodec copy VTS_01_TOT.mkv

Wy a mkv container. This is because of the wrong (or better missing) aspect-ratio in the VOB file.

$ ffmpeg -i VTS_01_TOT.VOB

Results in┬áthis output:┬áStream #0:1[0x1e0]: Video: mpeg2video, yuv420p(tv), 352×240 [SAR 200:219 DAR 880:657], 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc

All that aspect SAR and DAR are completely wrong.

352×240 should be 720×576

SAR should be 720:576

DAR should be 768:576

Changing this values in an mpeg container is quite difficult. But with the tool mkvtoolnix it is quite easy to do. That’s why I used an mkv container.

Now how to change this in mkvtoolnix.

Start mkvtoolnix and navigate to the edit headers tab (on the left side).

Open the mkv file. And Edit these values in the ‘Video track 1, V_MPEG2’:

Video pixel width: 720

Video pixel height: 576

Video display width: 768

Video display height: 576Screenshot from 2016-01-08 21-54-21

From the menu save the file. Headers are now (for me) correct for editting in Kdenlive.