View Single Post
Old 25th November 2020, 22:28   #8  |  Link
HDVProjection
Registered User
 
Join Date: Jul 2012
Posts: 6
Quote:
Originally Posted by poisondeathray View Post
Is the "stray frame" an inserted frame (framecount not same as source, possible sync issues), or replaced frame (framecount is the same) ?

Is dynamic link the problem ? Did you try encoding, then authoring ? Or does a "physically" exported file have the same issue ? I've done probably 100's of BD's using EncoreCS6 in the past, never an issue with an exported file method


What is the DCP package generated from ?

Some options

1) ffmpeg psnr . Test DCP MXF as "source" against BD M2TS. Generate per frame metrics. This assumes your DCP is ok. One issue is DCP is 12bit 444 xyz, and BD is 8bit 420 YUV AVC/MPEG2/VC1 . So instead of getting "infinity" for matched frames, you have to look for large dips in dB

1b) msu vqmt; the free version I think only supports 720p but that's more than enough for a "stray" frame detection. The nice thing about this is the visualization features and it plots your graphs, so it's easy to see which frames are mismatched. It accepts avs script input - you can use avisynth scripts to downcovert both MXF to match the BD version in bitdepth, colorspace, chroma subsampling, and to satisfy the 720p limit on the free version

2) avisynth writefileif . It will print out frame numbers in a text file that are detected according to criteria you set.

Write an expression that logs frames that have some difference from previous n-1 and next n+1 ( or more if you want n-2, n+2, or some average, but you probably don't want that if it's a single frame replacement) . You have to tweak the detection threshold values, because something like a strobe light scene, or explosion will have a very different next frame . You want something that does not generate too many false positives, but you'd want to err on the side of caution and have more false detections than to miss a real "stray" frame. ie. you'd prefer it more sensitive

It would look something like this for looking at the difference between the Y plane for n-1, n+1 . An replaced random frame from another scene should be higher for both n-1, n+1 . (You can add some fancy averaging of multiple frames, or some other logic operators if required). This example has both n-1, n+1 >20 (You might have to set it higher or lower, it's just an arbitrary number for discussion)

Code:
LWLibavVideoSource("BD.m2ts")
WriteFileIf (last,  "writefile.log",  "YDifferenceFromPrevious > 20  &&  YDifferenceToNext > 20", "current_frame", """ ":" """, "YDifferenceFromPrevious", """ ":" """, "YDifferenceToNext")
Thanks for the response. I have in fact been re-encoding first to a high-def h264 beforehand, simply because CS6 has started displaying some importer difficulties with the prores files we've been getting (seems to be getting worse every year, I'm assuming because of codec changes and CS6 no longer being supported). Then I drop that mp4 into my CS6 timeline and straight to dynamic link --> Encore.

The DCPs never have these issues (whether I make them myself with OpenDCP or we shop it out). Would it be easier and make more sense just to use the mp4 I'm creating for the compare? That is technically the source file, after all.

Can I get just a bit more hand-holding? What's the syntax for the ffmpeg psnr? Let's say the source is "MyFile.mp4" and the blu-ray stream is "00000.m2ts". Also, do I need to put these two in the same folder or anything? Finally, can I turn off any audio checks, have it just focus on picture consistency? Thanks again.
HDVProjection is offline   Reply With Quote