Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 302911 - media-video/cinelerra-20090210-r1: mjpeg movies rendered and displayed corrupt
Summary: media-video/cinelerra-20090210-r1: mjpeg movies rendered and displayed corrupt
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-30 21:08 UTC by Daniel Bausch
Modified: 2011-12-23 02:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bausch 2010-01-30 21:08:35 UTC
This is a followup of #292575.
As statet there, mjpeg movies are now loaded without crash but are displayed very corrupt. Additionally only MJPEG contained in a MOV can be inserted at all, because in an AVI container cinelerra can not calculate the duration and defaults to 0 secs. (Hint: This _may_ be related to JPEG-7 upgrade.)

Steps to reproduce:
1. start cinelerra
2. load mjpeg movie (in mov container)
3. put into the timeline or drag it to the preview window
4. watch the video and see how it is skewed and displayed with wrong colors
Comment 1 Daniel Bausch 2010-02-18 10:29:51 UTC
I have additional info about this bug: The problem seems to be related to a wrong assumtion about the geometry of the video. The video in question has 720x576 pixels. Cinelerra detects 786x576 pixels. (The 786 is no typo.) Therefore it consumes the padding and whatsoever is between the lines as additional data, so the image gets skewed an distorted. When I show the video with mplayer, mplayer tells me that the aspect is undefined and shows 720x576 unscaled. The same movie in the AVI container (that, which doesn't work at all in cinelerra because it doesn't get the duration right) is reported by mplayer with an aspect of 1.37:1 and is therefore _scaled_ to 786x576. I have absolutely no clue where this 1.37:1 should come from. And cinelerra should not read pixels that are not there.

These may all be upstream problems but maybe you can delegate them to the right projects. A workaround would be highly appreciated as I have to do some video work in the recent future.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2010-03-20 15:24:24 UTC
Try cinelerra-20100320.
Comment 3 Daniel Bausch 2010-03-20 16:49:38 UTC
No change. Seems that I have to find a way to insert a 5:4 aspect ratio value (1:1 pixel aspect) in the MOV-Container or stick to MPEG2 or MPEG4 with their drawbacks in interactivity. This is really sad, since cinelerra is the only program I know of, that can scale+crop video with maximal quality. (kdenlive does a double scaling and produces very poor results - and the interface is unprecise). Kino is DV-only.
Comment 4 Daniel Bausch 2010-03-22 13:48:50 UTC
I have investigated into this further: I have reencoded the video with ffmpeg to several aspect ratios, while sticking to 720x576 pixels. With 5:4 I have a totally undistorted image without green bars and so on. The only problem is, that the video now has the wrong geometry, so I have to apply a scale filter in cinelerra to get the correct aspect. I have collected some background information about this too, because I was still confused by the unexpected aspect ratio. First I discovered that the original DV-Video contained this 1.37 aspect ratio, too. So I asked the web and found technical info:
DV-Video (with its 720 physical pixels) is not meant to be 4:3. If you need 4:3 you have to crop 9 pixels from the left an 9 pixels from the right, leaving 702 pixels horizontal. These 702 pixels are the scaled up to 768 pixels for the output. The additional pixels to the left and the right don't belong to the "image", although most equipment puts additional image data into it. In fact these borders may be black and you still should get a full image without borders displayed. I don't know any software player, that respects the standard in this way, but that's how it is defined.
So, when I put my video in cinelerra I have to apply a scale filter with 1.094 (=(4/3)/(702/576)) in horizontal direction to get the technical correct aspect ratio. With cinelerra's "camera" I then can extract the part of the image, I want to see.

By the way: after reencoding MJPEG contained in an AVI could also be played back. So ffmpeg produces a correct avi header for cinelerra. (AFAIR I used mencoder the last time or some older version).

This is a non intuitive workaround, but for me its a solution I can live with, although I need to find a way to use some special mencoder deinterlacing filters in ffmpeg.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2011-12-23 02:31:23 UTC
(In reply to comment #2)
> Try cinelerra-20100320.

And 20101104 ?