This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Wrong aspect ratio

Tags: None
(comma "," separated)
pit_drupal
Registered Member
Posts
4
Karma
0

Wrong aspect ratio

Wed May 05, 2010 5:28 pm
I took some clips with my JVC Hard Disk Drive Everio (SD). It produces mpg files. When I play this files with ffplay, I got this output:

Input #0, mpeg, from '05-1F-JVC.mpg':
Duration: 00:00:01.88, start: 0.239456, bitrate: 10074 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576 [PAR 16:15 DAR 4:3], 9200 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0.1[0x80]: Audio: ac3, 48000 Hz, stereo, s16, 384 kb/s
[mpeg2video @ 0x8477c30]warning: first frame is no keyframe

In fact it is 16:9, playing it e.g. with vlc shows the right aspect ratio.

In kdenlive I checked out different project settins (like DV/DVD Widescreen PAL). But dragging one clip into the timeline shows 4:3 output in the project monitor.

I created a new project profile and played around with DAR and PAR. Finaly I got some good results with size 720x576, PAR 40:37 and DAR 16:9. With this settings the project monitor showed up some kind of full screen 16:9 material.

But rendering it (I checked out nearly every possibility, not only PAL 16:9 VOB) again produced the wrong aspect ratio (black bars on both sides).

I do not want to do another resampling (for example with avidemux) because of quality reasons. There should be another solution to do the whole job in kdenlive. but how to do so?

If sb would like to check it out with one of my camera clips - feel free: http://rapidshare.com/files/383886111/05-1F-JVC.mpg.html

pit
briguy
Registered Member
Posts
12
Karma
0

Re: Wrong aspect ratio

Wed May 05, 2010 8:07 pm
In the clips window, right click and select "Properties". Tick the box for "Force Aspect Ratio" and adjust accordingly. I had the same problem on a Samsung camera, I calculated a 1.18 correction which works perfectly.

Excuse me if some of the directions aren't 100% correct, I'm working from memory ;)
pit_drupal
Registered Member
Posts
4
Karma
0

Re: Wrong aspect ratio

Wed May 05, 2010 10:34 pm
Yeah, thanks a lot! I had to choose a correction of 1,42. This did the trick.

Before knowing this I converted everything with ffmpeg:

for i in *.mpg; do ffmpeg -i $i -s 720x406 -aspect 16:9 -vcodec libxvid -b 10000k ../Filmclips-avi/$i.avi;done

what a waste of time ...
Dets
Registered Member
Posts
21
Karma
0
OS

Re: Wrong aspect ratio

Thu May 06, 2010 1:36 pm
Hi Pit,

I own a JVC Everio too, and I figured out that the aspect ratio flag in the .MOD-file isn't set. So I wrote a small commandline-tool for Linux which simply switches the flag without doing any resampling. You can download it at:

http://www.castelli-group.net/useful/modder

usage: # ./modder FILENAME
or type # ./modder -? to see all options

greetz, Dets ...
pit_drupal
Registered Member
Posts
4
Karma
0

Re: Wrong aspect ratio

Fri May 07, 2010 5:33 am
@dets
Wow, this is cool. I'm gonna check it out as soon as possible, that's for sure!
thx!

edit:
It worked like a charm. one question: with everio one can choose whether to use 16:9 or 4:3. does your program check this before modifying the file?
Dets
Registered Member
Posts
21
Karma
0
OS

Re: Wrong aspect ratio

Fri May 07, 2010 8:35 am
@Pit:
nice to hear!

I'm sorry that my prog can't detect the aspect ratio of the file. The reason is, that the aspect ratio is stored in the MOI-File instead of the MOD-file and I didn't find out where actually.
Do you copy the MOI-files onto your PC too? I didn't because I thought they were useless. But maybe I should change my opinion ...

greetz, Dets ...
pit_drupal
Registered Member
Posts
4
Karma
0

Re: Wrong aspect ratio

Mon May 17, 2010 4:20 pm
@Dets
I tried to use both moi and mod files within the kdenlive project. Doesn't look like kdenlive cares about those moi files. I treated my 16:9 source files with yout tool and within kdenlive everything was fine.
thanks again,
pit
Dets
Registered Member
Posts
21
Karma
0
OS

Re: Wrong aspect ratio

Tue Jun 22, 2010 10:47 am
I added some stuff in "modder" which puts it to version 0.0.2.0:

- now it reads the MOI-file, displays known information from this file and corrects the aspect ratio according to the MOI file
- it reads the date/time information from the MOI file and writes it into the MPG file, so that the files keep their chronological order

you can download "modder" under http://www.castelli-group.net/useful/modder

greetz, Dets ...

ttill
Registered Member
Posts
372
Karma
0

Re: Wrong aspect ratio

Sun Aug 08, 2010 6:02 pm
For the project profile choose "HD 1080i 30fps" and render with a high bitrate.


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], Yahoo [Bot]