Directly converting DNGs to MP4

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Directly converting DNGs to MP4

ZEITFELD
 

Hello nice girls ans guys!

I have a highspeed camera that records raw data to DNG files. Now I try
to have the fastest possible preview video of what is recorded. I
succeeded using the GPU via FFMPEG, which is absolutely the fastest way
I found until now.

This is the command line I use:

FFMPEG -R 25 -F IMAGE2 -I FRAME_%06D.DNG -VCODEC LIBX264 -CRF 25
-PIX_FMT YUV420P PREVIEW.MP4

This gives me a MP4, but the colors are broken, the image is too dark
and green and the quality is very bad, with a lot of banding and
artifacts.

Does anyone know how to make ffmpeg apply reasonably balanced settings
when reading the DNGs?

Thanks a lot! Martin
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Directly converting DNGs to MP4

Paul B Mahol
On Sun, Nov 8, 2020 at 6:12 PM ZEITFELD <[hidden email]> wrote:

>
>
> Hello nice girls ans guys!
>
> I have a highspeed camera that records raw data to DNG files. Now I try
> to have the fastest possible preview video of what is recorded. I
> succeeded using the GPU via FFMPEG, which is absolutely the fastest way
> I found until now.
>
> This is the command line I use:
>
> FFMPEG -R 25 -F IMAGE2 -I FRAME_%06D.DNG -VCODEC LIBX264 -CRF 25
> -PIX_FMT YUV420P PREVIEW.MP4
>
> This gives me a MP4, but the colors are broken, the image is too dark
> and green and the quality is very bad, with a lot of banding and
> artifacts.
>
> Does anyone know how to make ffmpeg apply reasonably balanced settings
> when reading the DNGs?
>

Do not under any cost use swscale for this operation.
swscale does not support bunch of colorspaces.
Use zscale filter instead.


>
> Thanks a lot! Martin
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Directly converting DNGs to MP4

Michael Koch
In reply to this post by ZEITFELD
Am 08.11.2020 um 18:12 schrieb ZEITFELD:

>  
>
> Hello nice girls ans guys!
>
> I have a highspeed camera that records raw data to DNG files. Now I try
> to have the fastest possible preview video of what is recorded. I
> succeeded using the GPU via FFMPEG, which is absolutely the fastest way
> I found until now.
>
> This is the command line I use:
>
> FFMPEG -R 25 -F IMAGE2 -I FRAME_%06D.DNG -VCODEC LIBX264 -CRF 25
> -PIX_FMT YUV420P PREVIEW.MP4
>
> This gives me a MP4, but the colors are broken, the image is too dark
> and green and the quality is very bad, with a lot of banding and
> artifacts.
>
> Does anyone know how to make ffmpeg apply reasonably balanced settings
> when reading the DNGs?

did you (or anybody else) find a solution for this problem?

Paul did already give a few hints:
-- swscale is old and ignores color_trc metadata that is required for
correct display
-- use zscale for converting pixel formats
-- set output trc
-- make sure to set right pixel format prior to calling zscale as it
does not support bayer formats

Open questions:
-- How can zscale be used for converting the pixel format, if it doesn't
support the "bayer_rggb16le" format that the input images have? zscale
doesn't have any options for pixel formats.
-- Is "output trc" a synonym for "transfer characteristic"? Is that the
"transfer" option in zscale? To which value must it be set?
-- How can the pixel format be set prior to calling zscale? With
"-pix_fmt" before the input? Or after the input? Or with
"-pixel_format"? Or with "format=" at the beginning of the filter chain?
-- The input color space is "sRGB". How can this be set?

I did already spend about 20 hours of try-and-error on this problem
before I gave up.
Part of the problem is the missing documentation for the zscale filter.
That's only a list of options and possible values. No explanations what
the options mean, and no examples.

Michael

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Directly converting DNGs to MP4

Paul B Mahol
On Sun, Nov 22, 2020 at 11:35 AM Michael Koch <[hidden email]>
wrote:

> Am 08.11.2020 um 18:12 schrieb ZEITFELD:
> >
> >
> > Hello nice girls ans guys!
> >
> > I have a highspeed camera that records raw data to DNG files. Now I try
> > to have the fastest possible preview video of what is recorded. I
> > succeeded using the GPU via FFMPEG, which is absolutely the fastest way
> > I found until now.
> >
> > This is the command line I use:
> >
> > FFMPEG -R 25 -F IMAGE2 -I FRAME_%06D.DNG -VCODEC LIBX264 -CRF 25
> > -PIX_FMT YUV420P PREVIEW.MP4
> >
> > This gives me a MP4, but the colors are broken, the image is too dark
> > and green and the quality is very bad, with a lot of banding and
> > artifacts.
> >
> > Does anyone know how to make ffmpeg apply reasonably balanced settings
> > when reading the DNGs?
>
> did you (or anybody else) find a solution for this problem?
>

There is a solution, but I gave up teaching unteachable.


>
> Paul did already give a few hints:
> -- swscale is old and ignores color_trc metadata that is required for
> correct display
> -- use zscale for converting pixel formats
> -- set output trc
> -- make sure to set right pixel format prior to calling zscale as it
> does not support bayer formats
>
> Open questions:
> -- How can zscale be used for converting the pixel format, if it doesn't
> support the "bayer_rggb16le" format that the input images have? zscale
> doesn't have any options for pixel formats.
> -- Is "output trc" a synonym for "transfer characteristic"? Is that the
> "transfer" option in zscale? To which value must it be set?
> -- How can the pixel format be set prior to calling zscale? With
> "-pix_fmt" before the input? Or after the input? Or with
> "-pixel_format"? Or with "format=" at the beginning of the filter chain?
> -- The input color space is "sRGB". How can this be set?
>
> I did already spend about 20 hours of try-and-error on this problem
> before I gave up.
> Part of the problem is the missing documentation for the zscale filter.
> That's only a list of options and possible values. No explanations what
> the options mean, and no examples.
>
> Michael
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Directly converting DNGs to MP4

FFmpeg-users mailing list
 

    On Sunday, 22 November 2020, 10:37:29 GMT, Paul B Mahol <[hidden email]> wrote:  
 > There is a solution, but I gave up teaching unteachable.
I'm torn between knowing that there's almost no meaningful way to respond to this, and feeling that Mahol's continued, completely unnecessary unpleasantness must not go unchallenged.
Can we please, pleaseĀ find a way to correct it?
To the original poster - you're fine, it's not you, it's him, you've done nothing wrong and this happens frequently.
- Phil  
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".