Giter Site home page Giter Site logo

Comments (10)

dericed avatar dericed commented on May 23, 2024

At first appearance, I suspect that the ffmpeg histogram filter, which produced the image, is plotting yuvj420p and yuv420p at different ranges. If I try: ffplay /Users/davidrice/Desktop/70D_lumarange.mov -vf "format=yuv422p,histogram=mode=waveform:waveform_mode=column:waveform_mirror=1,crop=iw:256:0:0,drawbox=y=(256-16):w=iw:h=16:[email protected]:t=16,drawbox=w=iw:h=(256-235):[email protected]:t=16" then I do get a waveform that matches the graph data.

from qctools.

silicontrip avatar silicontrip commented on May 23, 2024

That video is jpeg range, not mpeg range.

Something is scaling it

TAG:lavfi.values.YMIN=16
TAG:lavfi.values.YMAX=235

Mark

On 22 Sep 2014, at 12:18 pm, Dave Rice [email protected] wrote:

At first appearance, I suspect that the ffmpeg histogram filter, which produced the image, is plotting yuvj420p and yuv420p at different ranges. If I try: ffplay /Users/davidrice/Desktop/70D_lumarange.mov -vf "format=yuv422p,histogram=mode=waveform:waveform_mode=column:waveform_mirror=1,crop=iw:256:0:0,drawbox=y=(256-16):w=iw:h=16:[email protected]:t=16,drawbox=w=iw:h=(256-235):[email protected]:t=16" then I do get a waveform that matches the graph data.


Reply to this email directly or view it on GitHub.

from qctools.

mhusinsky avatar mhusinsky commented on May 23, 2024

this thread might be related:
http://ffmpeg.org/pipermail/ffmpeg-user/2014-February/thread.html#19728

also this bug report:
https://trac.ffmpeg.org/ticket/225

from qctools.

dericed avatar dericed commented on May 23, 2024

There's only a few yuvj pixel formats, so I'm tempted to fix this via the noformat filter, such as:
ffplay 70D_lumarange.mov -vf "noformat=yuvj420p|yuvj422p|yuvj444p|yuvj440p|yuvj411p,histogram=mode=waveform:waveform_mode=column:waveform_mirror=1,crop=iw:256:0:0,drawbox=y=(256-16):w=iw:h=16:[email protected]:t=16,drawbox=w=iw:h=(256-235):[email protected]:t=16"

from qctools.

mhusinsky avatar mhusinsky commented on May 23, 2024

but doesn't this introduce luma-compression from JPEG to MPEG range? have a look at the horizontal lines that appear now:
capture

from qctools.

dericed avatar dericed commented on May 23, 2024

argh good point

from qctools.

dericed avatar dericed commented on May 23, 2024

I've been looking at this for a while and trying to deduce is the graph is incorrect or the waveform presentation is incorrect. Obviously the graph shows a maximum Y value of 235 while the waveform implies a maximum of 255. When I place the file into other software waveforms, such as FCP7's, I the video peak at 100 IRE (ie 235), which corresponds to the graph but not the waveform. I suspect (and would love help proving or disproving this) that the encoded h264 uses a range of (mostly) 16-235 (as shown by the graph and FCP7) but that ffmpeg stretches the video to a range of 0-255 somewhere between decoding and plotting in the histogram filter, then in the example where I added the noformat part it's getting scaled twice.
If interested the filterchain used for the waveform display of qctools is found here: https://github.com/bavc/qctools/blob/master/Source/GUI/BigDisplay.cpp#L197.

from qctools.

dericed avatar dericed commented on May 23, 2024

Paul's patch on ffmpeg-devel appears to resolve the issue. It adds the corresponding YUVJ formats as inputs which prevents the YUVJ->YUV conversion before the signalstats analysis. With the patch YMAX now equals 255 which matches the waveform display. Once pulled into ffmpeg we'll include this in the next QCTools release in early October.

from qctools.

JeromeMartinez avatar JeromeMartinez commented on May 23, 2024

Fixed in FFmpeg/FFmpeg@bfdf0f0 , now I need to use this patch in the next QCTools release.

from qctools.

JeromeMartinez avatar JeromeMartinez commented on May 23, 2024

Confirmed to be OK now, example with 70D_lumarange.mov:
full_scale

from qctools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.