Nicolas Ecarnot | 28 Jun 2012 12:11
Favicon

[CinCV] Dark / contrasted prepared MJPEG videos

Hi,

Following the advices here :
http://www.g-raffa.eu/Cinelerra/HOWTO/get_media_ready.html
I'm converting with ffmpeg / avconv my input media files to MJPEG files.

No obvious quality loss occurs, but they result in darker videos - dark 
enough to be noticed. In fact, they are getting darker and/or more 
contrasted.

Obviously, once mjpeg-converted, they are well managed by Cinelerra.

I'm a completly newbie regarding to details of colorspace, encoding and 
so on.

But when I'm converting, here is what I notice in avconv/ffmpeg output:

 > Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting 
format 'yuvj420p'

This happens only on video that have this yuv420p pix format.
How do I have to understand that?

Is that those files will forever have to get darker when converted?
Is there a way to first convert the pixel format with no color/light change?
Can ffmpeg/avconv managed other pix formats?

As you can see, I'm a bit lost amongst those notions, and though I'm not 
looking for a direct and obvious answer, I'd be glad to be lead to 
accurate documentation.
(Continue reading)

Nicolas Ecarnot | 10 Jul 2012 21:10
Favicon

Re: [CinCV] Dark / contrasted prepared MJPEG videos

Le 28/06/2012 12:11, Nicolas Ecarnot a écrit :
> Hi,
>
> Following the advices here :
> http://www.g-raffa.eu/Cinelerra/HOWTO/get_media_ready.html
> I'm converting with ffmpeg / avconv my input media files to MJPEG files.
>
> No obvious quality loss occurs, but they result in darker videos - dark
> enough to be noticed. In fact, they are getting darker and/or more
> contrasted.
>
> Obviously, once mjpeg-converted, they are well managed by Cinelerra.
>
> I'm a completly newbie regarding to details of colorspace, encoding and
> so on.
>
> But when I'm converting, here is what I notice in avconv/ffmpeg output:
>
>  > Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting
> format 'yuvj420p'
>
> This happens only on video that have this yuv420p pix format.
> How do I have to understand that?
>
> Is that those files will forever have to get darker when converted?
> Is there a way to first convert the pixel format with no color/light
> change?
> Can ffmpeg/avconv managed other pix formats?
>
> As you can see, I'm a bit lost amongst those notions, and though I'm not
(Continue reading)

Herman Robak | 11 Jul 2012 11:02
Picon

Re: [CinCV] Dark / contrasted prepared MJPEG videos

På Tue, 10 Jul 2012 21:10:38 +0200, skrev Nicolas Ecarnot <nicolas <at> ecarnot.net>:

> Le 28/06/2012 12:11, Nicolas Ecarnot a écrit :
>> Hi,
>>
>> Following the advices here :
>> http://www.g-raffa.eu/Cinelerra/HOWTO/get_media_ready.html
>> I'm converting with ffmpeg / avconv my input media files to MJPEG files.
>>
>> No obvious quality loss occurs, but they result in darker videos - dark
>> enough to be noticed. In fact, they are getting darker and/or more
>> contrasted.
...
>> But when I'm converting, here is what I notice in avconv/ffmpeg output:
>>
>>  > Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting
>> format 'yuvj420p'
>>
>> This happens only on video that have this yuv420p pix format.
>> How do I have to understand that?
...

> I'm sorry to insist on that point, but according to every doc I read
> related to cinelerra, everyone seems to advice to convert to MJPEG.
> This format sounds great to nle software, but I can't figure it out how
> I can manage this contrast problem.
> I'm not clear about whether the fault is on my source files, or a
> limitation of the MJPEG format, or a limitation of the converter
> (ffmpeg/avconv).
>
(Continue reading)

Nicolas Ecarnot | 12 Jul 2012 09:40
Favicon

Re: [CinCV] Dark / contrasted prepared MJPEG videos

Le 11/07/2012 11:02, Herman Robak a écrit :
> It does bother me, for what it is worth.  I think the problem is due to
> different luma range (MJPEG is full range; 0-255) and chroma sample
> alignment.
> I'd guess that the contrast range is first stretched, then truncated,
> leading
> to higher contrast _and_ some crushed blacks and clipped highlights.
>
> What to do?  Find some other intermediate or proxy format.  I'd suggest
> DNxHD for intermediates and intra-only low-bitrate h.264 for proxies.
>

Thank you Herman for your answer.

But during this time I tried to keep with my MJPEG conversion but now 
using mencoder instead of ffmpeg/avconv.

Astonishingly, the results are perfect : absolutely no issue with 
chroma/contrast/brightness...

What sound even weirder for me is that I thought avconv and mecoder were 
both using the same libavcodec library to convert to mjpeg, and thus, I 
was expecting the same results...

--

-- 
Nicolas Ecarnot
Raffaella Traniello | 12 Jul 2012 10:05
Picon
Favicon
Gravatar

Re: [CinCV] Dark / contrasted prepared MJPEG videos

Hi Nicolas!

On 07/12/2012 09:40 AM, Nicolas Ecarnot wrote:
> I tried to keep with my MJPEG conversion but now using mencoder
> instead of ffmpeg/avconv.
> > Astonishingly, the results are perfect : absolutely no issue with
> chroma/contrast/brightness...

Did you use Grandma recipes?
Which format/codec are your original source files?

I sense ffmpeg command misses some clever options.

Ciao!
Raffaella
Nicolas Ecarnot | 12 Jul 2012 10:54
Favicon

Re: [CinCV] Dark / contrasted prepared MJPEG videos

Le 12/07/2012 10:05, Raffaella Traniello a écrit :
> Hi Nicolas!
>
> On 07/12/2012 09:40 AM, Nicolas Ecarnot wrote:
>> I tried to keep with my MJPEG conversion but now using mencoder
>> instead of ffmpeg/avconv.
>> > Astonishingly, the results are perfect : absolutely no issue with
>> chroma/contrast/brightness...
>
> Did you use Grandma recipes?

Of course. These web pages are my bible.

> Which format/codec are your original source files?

Different types.
But in each case, I get the same darkness+contrast issue :
- mp4
- h264, yuv420p
- mjpeg (I know, this is already mjpeg)
- ...

> I sense ffmpeg command misses some clever options.

Raffaella, this comment is teasing my curiosity. May you please elaborate?

--

-- 
Nicolas Ecarnot
Raffaella Traniello | 13 Jul 2012 00:17
Picon
Favicon
Gravatar

Re: [CinCV] Dark / contrasted prepared MJPEG videos

Hi Nicolas!

On 07/12/2012 10:54 AM, Nicolas Ecarnot wrote:
> Le 12/07/2012 10:05, Raffaella Traniello a écrit :
>> I sense ffmpeg command misses some clever options.
> Raffaella, this comment is teasing my curiosity. May you please elaborate?

I tried to make the ffmpeg command simple for Grandma.
But I've seen other people using ffmpeg commands 1 page long (for each 
pass).
Maybe adding some options here and there the conversion gets better.
It's just a matter of guessing which options... :-)

... I know there are some ffmpeg gurus on this list...

Ciao!
Raffaella
E Chalaron | 16 Jul 2012 22:59
Picon

Re: [CinCV] Dark / contrasted prepared MJPEG videos

Hello All

If anything the all thing is clearly confusing in Cinelerra.
Is the colorspace in Settings for the result or the color space displayed ?

We don't have a REC709 converter like we have a RGB<->REC601.
FFmpeg does not seem to have this option of REC709 and if you want to
encode in H264 HD I understand the gamut is REC709.

REC601 is for standard TV (DV, DVD)

Once we are finished with the final corrections of the C41 plugin with
Florent I aim to make a RGB<->REC709, a matter of changing numbers in
the equations of the actual plugin for REC601. Unless someone can show
me it's useless.

What is happening is that with new gamuts / codecs etc if you want to
follow specs it seems that farm rendering becomes less and less possible
and something like DrQueue would take over using the external encoders
like ffmpeg or mencoder.

And if so ... Kdenlive could well be an option on the long term (I hope
not) unless Lumiera eventually becomes available.
Just my thoughts.
Cheers
Edouard

On 07/13/2012 10:17 AM, Raffaella Traniello wrote:
> Hi Nicolas!
>
(Continue reading)

Einar Rünkaru | 17 Jul 2012 10:32
Picon

Re: [CinCV] Dark / contrasted prepared MJPEG videos

Hi.

Just information: there was a dicussion about similar problem:

https://lists.ffmpeg.org/pipermail/ffmpeg-user/2012-July/007780.html

Einar
E Chalaron | 17 Jul 2012 22:38
Picon

Re: [CinCV] BT709

That's great... thanks
Maybe it could be time to replace a useless export option by a DNX one
using ffmpeg and the color matrix correction?
An interface with a "denoise" option using the hqdn3d from libavfilters
to replace the unefficient plugins found in Cinelerra.

That would allow for realign Cinelerra outputs to AVID standards and
keep the farm rendering

Just my 2 cents suggestion not being a coder.
Cheers
Edouard

On 07/17/2012 08:32 PM, Einar Rünkaru wrote:
> Hi.
>
> Just information: there was a dicussion about similar problem:
>
> https://lists.ffmpeg.org/pipermail/ffmpeg-user/2012-July/007780.html
>
> Einar
>
> _______________________________________________
> Cinelerra mailing list
> Cinelerra@...
> https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
>
E Chalaron | 17 Jul 2012 22:58
Picon

Re: [CinCV] BT709

Forgot to mention that if you want to do color correction on DNX from
RGB data, the use of the yuv4mpeg pipe seems to go as
RGB  -> yuv420 -> yuv422
The last channel is probably trimmed off.

E

On 07/18/2012 08:38 AM, E Chalaron wrote:
> That's great... thanks
> Maybe it could be time to replace a useless export option by a DNX one
> using ffmpeg and the color matrix correction?
> An interface with a "denoise" option using the hqdn3d from libavfilters
> to replace the unefficient plugins found in Cinelerra.
>
> That would allow for realign Cinelerra outputs to AVID standards and
> keep the farm rendering
>
> Just my 2 cents suggestion not being a coder.
> Cheers
> Edouard
>
>
>
> On 07/17/2012 08:32 PM, Einar Rünkaru wrote:
>> Hi.
>>
>> Just information: there was a dicussion about similar problem:
>>
>> https://lists.ffmpeg.org/pipermail/ffmpeg-user/2012-July/007780.html
>>
(Continue reading)

E Chalaron | 16 Jul 2012 22:45
Picon

Re: [CinCV] Dark / contrasted prepared MJPEG videos

Nicolas could you send the Mencoder commands you ar eusing ?
Thanks
E

On 07/12/2012 07:40 PM, Nicolas Ecarnot wrote:
> Le 11/07/2012 11:02, Herman Robak a écrit :
>> It does bother me, for what it is worth.  I think the problem is due to
>> different luma range (MJPEG is full range; 0-255) and chroma sample
>> alignment.
>> I'd guess that the contrast range is first stretched, then truncated,
>> leading
>> to higher contrast _and_ some crushed blacks and clipped highlights.
>>
>> What to do?  Find some other intermediate or proxy format.  I'd suggest
>> DNxHD for intermediates and intra-only low-bitrate h.264 for proxies.
>>
>
> Thank you Herman for your answer.
>
> But during this time I tried to keep with my MJPEG conversion but now
> using mencoder instead of ffmpeg/avconv.
>
> Astonishingly, the results are perfect : absolutely no issue with
> chroma/contrast/brightness...
>
> What sound even weirder for me is that I thought avconv and mecoder
> were both using the same libavcodec library to convert to mjpeg, and
> thus, I was expecting the same results...
>
(Continue reading)

Nicolas Ecarnot | 26 Jul 2012 14:20
Favicon

Re: [CinCV] Dark / contrasted prepared MJPEG videos

Le 16/07/2012 22:45, E Chalaron a écrit :
> Nicolas could you send the Mencoder commands you ar eusing ?

I don't call but honestly, I'm using a very basic command with 
absolutely nothing but the default parameters.
And I confirm, the results with mencoder are WAY better than with avconv.

Nicolas Ecarnot

> Thanks
> E
>
> On 07/12/2012 07:40 PM, Nicolas Ecarnot wrote:
>> Le 11/07/2012 11:02, Herman Robak a écrit :
>>> It does bother me, for what it is worth.  I think the problem is due to
>>> different luma range (MJPEG is full range; 0-255) and chroma sample
>>> alignment.
>>> I'd guess that the contrast range is first stretched, then truncated,
>>> leading
>>> to higher contrast _and_ some crushed blacks and clipped highlights.
>>>
>>> What to do?  Find some other intermediate or proxy format.  I'd suggest
>>> DNxHD for intermediates and intra-only low-bitrate h.264 for proxies.
>>>
>>
>> Thank you Herman for your answer.
>>
>> But during this time I tried to keep with my MJPEG conversion but now
>> using mencoder instead of ffmpeg/avconv.
>>
(Continue reading)


Gmane