1

Just getting into FFmpeg and wanting to use a filter to do some long duration video quality/stability testing. I have to date used the scene change filter set to very low difference (0,000005) to detect a single frame of known small artifacts from a video sequence containing no other known motion. I inserted a small artifact of 2 pixels by 8 pixels in each of several frames at a number of varied locations to provide a control that the detection was indeed working. Can successfully detect a handful of inserted frames in uncompressed video in an hour of looped content through the system under measurement, but have to batch filter on captured files. Lightly compressed content is OK too, like ProRes -- but any long GOP sequence swamps the small artifacts we want to ensure are not present (except those we insert for 'control' purposes...)

My question is: Is there a simple way to automate this idea to work on continuous video rather than batch filtering the captured files? Presently I capture a .png of each detected error bearing frame to ensure that what I detect is what I inserted -- no more and no less...

Thanks in advance for any pointers

UPDATE: We have devised a stream based test using the Decklink INPUT port (the HDMI one…) to acquire raw video into an FFMPEG filter that detects scene changes. The threshold of the detector is set quite low (0.000005) which allows its Sum of Absolute Differences filter to catch small image artifacts of as little as one frame duration and only a few pixels. Our ProRes loop running on the HyperDeck plays a non-motion blue field image sequence with one to five white or black dots per frame, and this injection of known anomaly frames occurs only once per the one hour long loop as a control to verify the filter is working as it should. This stream is passed through our product under test and then analyzed by the Decklink and FFMPEG filter combination. We are of course watching for any missing reference anomaly frames we knew to be injected, and/or any other detected frames indicating a processing error in our system under test. We can scrutinize the stored .png frames to see the nature of any anomaly.

All is working as it should and is stable for long duration test runs, but there seems to be an issue if we stop the analysis and try to restart. Maybe something in the Decklink is not getting initialized properly. At present, the only relief is to power down the workstation containing the Decklink, wait for the power supplies to fully discharge, and then power back up and restart the FFMPEG filtering application.

Does anyone know how this start value is initialized? Is it set in Decklink or in FFMPEG??

This is what the command window in ffmpeg shows when we attempt to start the process over again without the power down step:

C:\Users\cvandusen>ffmpeg -f dshow -video_size 1280x720 -rtbufsize 702000k -framerate 60 -i video="Decklink Video Capture" -vf "select=gt(scene\, 0.000005)" -vsync vfr test2%03d.png

ffmpeg version N-89803-g856b7cae9f Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7.2.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx libavutil 56. 7.100 / 56. 7.100 libavcodec 58. 9.100 / 58. 9.100 libavformat 58. 3.100 / 58. 3.100 libavdevice 58. 0.100 / 58. 0.100 libavfilter 7. 11.101 / 7. 11.101 libswscale 5. 0.101 / 5. 0.101 libswresample 3. 0.101 / 3. 0.101 libpostproc 55. 0.100 / 55. 0.100 Input #0, dshow, from 'video=Decklink Video Capture': Duration: N/A, start: 71582788.364437, bitrate: N/A Stream #0:0: Video: rawvideo (HDYC / 0x43594448), uyvy422(tv), 1280x720, 60 fps, 60 tbr, 10000k tbn, 10000k tbc Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> png (native)) Press [q] to stop, [?] for help Output #0, image2, to '20180215pm%03d.png': Metadata: encoder : Lavf58.3.100 Stream #0:0: Video: png, rgb24, 1280x720, q=2-31, 200 kb/s, 60 fps, 60 tbn, 60 tbc Metadata: encoder : Lavc58.9.100 png frame= 0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed= 0x video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.