<p>Try using:</p>

<pre><code>ffmpeg -i "testinput.mxf" -vf scale=in_range=limited:out_range=full -pix_fmt rgba64 path/to/output/out%05d.tiff
</code></pre>

<p>instead.</p>

<p>For a reason that is <em>slightly</em> beyond my comprehension of color science (or maybe just something odd with ffmpeg), the output of the initial command was creating .tiff files in the "limited" (15-235) rather than "full" (0-255) RGB color range. I used the scopes in Premiere Pro and DaVinci Resolve to A-B between the first frame of the created .tiff sequence and the original .mxf and the differences became clear.</p>

<p>If you aren't dead set on using ffmpeg, I was also able to achieve a comparable result by importing the .mxf into a Resolve (version 15 in my case) timeline and then using the "Deliver" workspace, selecting the 16 Bit, RGB and .tiff options as the output and using either the 'Auto' or 'Full' range setting. If you go the Resolve route, you can queue up each .mxf file and just let them export until everything is complete. </p>

<p>There are <em>slight</em> variations between the ffmpeg .tiff, the Resolve .tiff and the original .mxf but to my understanding the process of converting YUV (the original .mxf) to RGB (the .tiff sequence) generally isn't mathematically perfect. The files pass the "eyeball" test, however, and should work well unless the people you are working for have really strict delivery requirements. </p>

<p>If you really want to go deep into it, the nice (and smart!) folks over at Doom9 forums can get you into AVISynth (which is really cool and powerful but also quite complicated) for very advanced conversions. </p>

<p>Hope this helps!</p>

CC BY-SA 4.0
2019-07-09T09:22:25.173Z
@PaulB.Mahol I appreciate your feedback. In theory you are absolutely correct. In practice that wasn't the case. Maybe something is odd with the header information on the original .mxf? I also tried scale=in_range=full and scale with just the out_range=full parameter (omitting in_range) and the above combination was the only one that worked correctly. Additionally, I gave a second option for accomplishing the task. Thanks!
TehOtherLebowski
CC BY-SA 4.0
2019-07-12T06:01:59.247Z
Your ffmpeg code is not a solution; the result is no different than before.  It is imperative that this is done with ffmpeg for speed purposes.  I still do not understand how to decode this video file properly.
EllipticalInitial
CC BY-SA 4.0
2019-07-13T15:21:22.883Z
Ok. Best of luck to you
TehOtherLebowski
CC BY-SA 4.0
2019-07-09T06:39:00.697Z
2019-07-09T06:39:00.697Z
TehOtherLebowski
<p>I have several hundred 1080p 59.94fps 10-bit-per-channel (bpc) AVC-Intra Class 100 MXF encoded video files.  I would like to extract the frames of this video file and export them to disk in a 16-bit lossless image format.  I recently encountered this question:
<a href="https://video.stackexchange.com/questions/22136/convert-video-to-10-bit-images">Convert video to 10 bit images</a></p>

<p>So I tried this:</p>

<p><code>ffmpeg -i "testinput.mxf" -pix_fmt rgb48 _Frames/out%05d.tiff</code></p>

<p>But ran into a rather unfortunate issue that I am not sure how to resolve.  Although it technically did work, and exported all of the video frames into a 16 bpc format, the color of these frames appears washed out.  Here's what I mean:</p>

<p>The first frame of the original video file (MXF):</p>

<p><a href="https://i.sstatic.net/ADVYC.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ADVYC.png" alt="enter image description here"></a></p>

<p>The first frame exported with ffmpeg:
<a href="https://i.sstatic.net/oZhHU.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/oZhHU.png" alt="enter image description here"></a></p>

<p>As you can see, the color appears to be faded and doesn't perfectly match the frame in the original video.  I don't know why this is, but it's a serious problem that needs a resolution ASAP.  Perhaps I'm not using ffmpeg correctly, or perhaps this is a bug in ffmpeg.  <strong>What do I need to do to extract the frames from this particular codec correctly?</strong>  Please, help.</p>

<p>I have included the original MXF file here, for your own testing purposes:
<a href="https://drive.google.com/open?id=1HtCmPGkIZMMMEOAVKMlLksov7QyKzqRE" rel="nofollow noreferrer">https://drive.google.com/open?id=1HtCmPGkIZMMMEOAVKMlLksov7QyKzqRE</a>
Here is a link to the output of running the command I specified earlier.  I'm on the latest version of ffmpeg for Windows, ffmpeg version N-94150-g231d0c819f Copyright (c) 2000-2019.
<a href="https://pastebin.com/8UrxJJpY" rel="nofollow noreferrer">https://pastebin.com/8UrxJJpY</a></p>

CC BY-SA 4.0
2019-07-12T23:48:08.623Z
@PaulB.Mahol Whether in Windows Photo Viewer, VLC media player, Adobe After Effects, or Adobe Premiere Pro, the frames are noticeably different.  I did not downscale anything.
EllipticalInitial
<video><ffmpeg><video-quality><compression><color>
Export Frames of 10 BPC Video File with ffmpeg
EllipticalInitial
# Export Frames of 10 BPC Video File with ffmpeg

(Asked by: username_0 on 2019-07-03)

I have several hundred 1080p 59.94fps 10-bit-per-channel (bpc) AVC-Intra Class 100 MXF encoded video files. I would like to extract the frames of this video file and export them to disk in a 16-bit lossless image format. I recently encountered this question:
[Convert video to 10 bit images](https://video.stackexchange.com/questions/22136/convert-video-to-10-bit-images)

So I tried this:

`ffmpeg -i "testinput.mxf" -pix_fmt rgb48 _Frames/out%05d.tiff`

But ran into a rather unfortunate issue that I am not sure how to resolve. Although it technically did work, and exported all of the video frames into a 16 bpc format, the color of these frames appears washed out. Here's what I mean:

The first frame of the original video file (MXF):

[![enter image description here](https://i.sstatic.net/ADVYC.png)](https://i.sstatic.net/ADVYC.png)

The first frame exported with ffmpeg:
[![enter image description here](https://i.sstatic.net/oZhHU.png)](https://i.sstatic.net/oZhHU.png)

As you can see, the color appears to be faded and doesn't perfectly match the frame in the original video. I don't know why this is, but it's a serious problem that needs a resolution ASAP. Perhaps I'm not using ffmpeg correctly, or perhaps this is a bug in ffmpeg. **What do I need to do to extract the frames from this particular codec correctly?** Please, help.

I have included the original MXF file here, for your own testing purposes:
<https://drive.google.com/open?id=1HtCmPGkIZMMMEOAVKMlLksov7QyKzqRE>
Here is a link to the output of running the command I specified earlier. I'm on the latest version of ffmpeg for Windows, ffmpeg version N-94150-g231d0c819f Copyright (c) 2000-2019.
<https://pastebin.com/8UrxJJpY>

**Tags:** video, ffmpeg, video-quality, compression, color

> **Comments:**
> **username_0**: @PaulB.Mahol Whether in Windows Photo Viewer, VLC media player, Adobe After Effects, or Adobe Premiere Pro, the frames are noticeably different.  I did not downscale anything.  

---

## 1 answers

### Answer by username_1 on 2019-07-09. Score: 0

Try using:
ffmpeg -i "testinput.mxf" -vf scale=in_range=limited:out_range=full -pix_fmt rgba64 path/to/output/out%05d.tiff

instead.
For a reason that is slightly beyond my comprehension of color science (or maybe just something odd with ffmpeg), the output of the initial command was creating .tiff files in the "limited" (15-235) rather than "full" (0-255) RGB color range. I used the scopes in Premiere Pro and DaVinci Resolve to A-B between the first frame of the created .tiff sequence and the original .mxf and the differences became clear.
If you aren't dead set on using ffmpeg, I was also able to achieve a comparable result by importing the .mxf into a Resolve (version 15 in my case) timeline and then using the "Deliver" workspace, selecting the 16 Bit, RGB and .tiff options as the output and using either the 'Auto' or 'Full' range setting. If you go the Resolve route, you can queue up each .mxf file and just let them export until everything is complete. 
There are slight variations between the ffmpeg .tiff, the Resolve .tiff and the original .mxf but to my understanding the process of converting YUV (the original .mxf) to RGB (the .tiff sequence) generally isn't mathematically perfect. The files pass the "eyeball" test, however, and should work well unless the people you are working for have really strict delivery requirements. 
If you really want to go deep into it, the nice (and smart!) folks over at Doom9 forums can get you into AVISynth (which is really cool and powerful but also quite complicated) for very advanced conversions. 
Hope this helps!

> **Comments:**
> **username_1**: @PaulB.Mahol I appreciate your feedback. In theory you are absolutely correct. In practice that wasn't the case. Maybe something is odd with the header information on the original .mxf? I also tried scale=in_range=full and scale with just the out_range=full parameter (omitting in_range) and the above combination was the only one that worked correctly. Additionally, I gave a second option for accomplishing the task. Thanks!  
> **username_0**: Your ffmpeg code is not a solution; the result is no different than before.  It is imperative that this is done with ffmpeg for speed purposes.  I still do not understand how to decode this video file properly.  
> **username_1**: Ok. Best of luck to you  

---

