[FFmpeg-user] Problem with ffmpeg psnr calculate filter when image file applied

Stefano Sabatini stefasab at gmail.com
Wed Dec 18 19:19:42 CET 2013


On date Tuesday 2013-12-17 22:35:55 +0800, 肖谋 wrote:
> Dear all,
>    I would like to calculate the PSNR of two images or two videos. I found
> that the new psnr filter worked well for video files which have at less two
> frames, but not for one frame, or image files.
> 
> ffmpeg version is 2.0.2
> generate the files to be compared
> two frames video: ./ffmpeg -i test.mkv -vframes 2 -vcodec libx264 -an
> frame2.mkv
> one frames video: ./ffmpeg -i test.mkv -vframes 1 -vcodec libx264 -an
> frame1.mkv
> 
> this one does not work:
> ./ffmpeg -i test.mkv -vframes 1 -vcodec rawvideo -filter:v
> "movie=frame1.mkv,setpts=PTS-STARTPTS[main];[in][main]psnr=f=c.log" -f
> rawvideo -y /dev/null
> 
> this one works:
> ./ffmpeg -i test.mkv -vframes 1 -vcodec rawvideo -filter:v
> "movie=frame2.mkv,setpts=PTS-STARTPTS[main];[in][main]psnr=f=c.log" -f
> rawvideo -y /dev/null
> 
> This situation can also be reproduced using image files.
> I looked into the vf_psnr.c. The do_psnr is not called.
> 
> I think this might be a bug for filter process? any suggestions to fix this?

Are you able to reproduce the problem with latest git (2.0.2 is a bit
old and we had some fixes which may be relevant).

Also you could file a bug report.


More information about the ffmpeg-user mailing list