Trim frames from raw YUV video using FFMPEG

Trim 5 frames starting from 160-th frame and write to png sequence ffmpeg -pix_fmt yuv420p -s 1920x1088 -r 1 -i input_video.yuv -r 1 -ss 160 -frames 5 output_sequence_%d.png size of input video is 1920x1088, format YUV420 progressive. UPD: ffmpeg is renamed to avconv. Using it for trimming AVI video: avconv -ss 00:58:00 -t 00:59:30 -i ./video.avi frame_%05d.png UPD2: it seems ffmpeg is back.

July 2, 2013 · SergeM

Color problems in avisynth->overlay

I processed depth maps using avisynth 2.5.8 and I found out it causes color degradation I have a depth map (from http://vision.middlebury.edu/stereo/data/scenes2001/data/imagehtml/sawtooth.html) And two scripts1) just_show.avsv = ImageSource( "depth.jpg" ).Trim(0, -1) return v2) overlay.avs v = ImageSource( "depth.jpg" ).Trim(0, -1) return overlay( v, v, mode = "blend", opacity = 0.80)  They have slightly different colors. ![](http://4.bp.blogspot.com/-Lj-uQIVor4c/UcP-amr12PI/AAAAAAAAAZQ/RvXjjb2Vc14/s320/just_show.png)just show![](http://1.bp.blogspot.com/-O1GkOsIX8rU/UcP-avb8uEI/AAAAAAAAAZU/x9p_nPsHSwU/s320/overlay.png)overlayOverlay has chroma componentThe cause was in wrong color conversion in avisynth 2.5.8. I downloaded AVS 2....

June 21, 2013 · SergeM

Add path in linux/cygwin and windows

in cygwin: PATH=$PATH:~/your_path or PATH=~/your_path:$PATH Add path windows PATH=%PATH%;C:\Your_Path;

June 9, 2013 · SergeM

Never never!

Never-Never-NEVER open file for reading until you think twice what mode (text/binary) of operation do you need!!

May 29, 2013 · SergeM

How to compare video metrics

There are specific databases which were subjectively tested. Ans MOS was calculated for example http://www.ponomarenko.info/tid2008.htm you can download database and compare your metric to MOS by Spearman correlation

May 28, 2013 · SergeM

SSIM metric for video

See good explanation is in Title: Handbook of image and video processing Author(s): Bovik A. (ed.) Series: Periodical: Publisher: Elsevier Academic Press Year: 2005 Edition: 2ed. Language: English Pages: 1429 ISBN: 9780121197926, 0121197921

May 28, 2013 · SergeM

SSIM по русски

Нужно будет тут записать как работает метрика SSIM по человечески

May 28, 2013 · SergeM

Replace \n in Microsoft word

To replace new lines in word use “^13” whild-char. “^p” doesn’t work :(

May 26, 2013 · SergeM

Tips for debugging of video processing console

Assume we have Visual Stusio solution for console that makes some video processing. The console takes two input videos and generates the third video: Console.exe --input1 video1.avi --input2 video2.avi --output result.aviWhile debugging we need to run console on several datasets. 1) dataset1 conststs of videos set1_video1.avi and set1_video2.avi 2) dataset2 conststs of videos set2_video1.avi and set2_video2.avi .... n) .... It seem rather convenient to distrubute videos between folders. One folder for each dataset....

May 16, 2013 · SergeM

Bjontegaard metric. Matlab script.

Bjontegaard metric (BD-PSNR) describes the distance between two RD-curved. I is useful to determine how big is the gain between “before” and “after” versions. Or determine what curve is better if they have complex form (for example, intersecting). I found matlab script, that calculates BD-PSNR, but it was not correct. The limits of integration were wrong. Difference between two curves can be calculated only in the area of thein projections intersection....

May 15, 2013 · SergeM