[FFmpeg-user] I am unable to get ffmpeg to calculate PSNR for any video files.
Reed Crowe
reedcrowe123 at gmail.com
Tue Jan 19 19:08:20 EET 2021
Still does not work.
With this command:
ffmpeg -i /home/rcrowe/LVT/17647_20210118_195325.mp4 -i
/home/rcrowe/LVT/test.mp4 -enc_time_base -1 -filter_complex psnr -f null -
I get the same results:
ffmpeg version N-100671-gc48110a4a4 Copyright (c) 2000-2021 the FFmpeg
developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration:
libavutil 56. 63.101 / 56. 63.101
libavcodec 58.117.101 / 58.117.101
libavformat 58. 65.101 / 58. 65.101
libavdevice 58. 11.103 / 58. 11.103
libavfilter 7. 96.100 / 7. 96.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'/home/rcrowe/LVT/17647_20210118_195325.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : 'LVT17647'
encoder : Lavf58.20.100
Duration: 00:00:59.87, start: 0.000000, bitrate: 67 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc,
bt470bg/bt470bg/bt709), 704x480, 66 kb/s, 15.03 fps, 15 tbr, 90k tbn, 180k
tbc (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/home/rcrowe/LVT/test.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : 'LVT17647'
encoder : Lavf58.20.100
Duration: 00:00:59.87, start: 0.000000, bitrate: 67 kb/s
Stream #1:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc,
bt470bg/bt470bg/bt709), 704x480, 66 kb/s, 15.03 fps, 15 tbr, 90k tbn, 180k
tbc (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream mapping:
Stream #0:0 (h264) -> psnr:main
Stream #1:0 (h264) -> psnr:reference
psnr -> Stream #0:0 (wrapped_avframe)
Press [q] to stop, [?] for help
[null @ 0x559c3fc0d6c0] Input stream data not available, using default time
base
Output #0, null, to 'pipe:':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : 'LVT17647'
encoder : Lavf58.65.101
Stream #0:0: Video: wrapped_avframe, yuvj420p(pc,
bt470bg/bt470bg/bt709, progressive), 704x480, q=2-31, 200 kb/s, 15 fps, 15
tbn (default)
Metadata:
encoder : Lavc58.117.101 wrapped_avframe
*[null @ 0x559c3fc0d6c0] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 748 >= 748*
frame= 899 fps=0.0 q=-0.0 Lsize=N/A time=00:00:59.86 bitrate=N/A
speed=79.3x
video:471kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
*[Parsed_psnr_0 @ 0x559c3fe87bc0] PSNR y:inf u:inf v:inf average:inf
min:inf max:inf*
When I try a different file, (different camera) I get a slightly different
output, but still no PSNR numbers. I don't see an error, but no results
either.
ffmpeg -i /home/rcrowe/LVT/17651_20210119_162814.mp4 -i
/home/rcrowe/LVT/test2.mp4 -enc_time_base -1 -filter_complex psnr -f null -
output:
ffmpeg version N-100671-gc48110a4a4 Copyright (c) 2000-2021 the FFmpeg
developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration:
libavutil 56. 63.101 / 56. 63.101
libavcodec 58.117.101 / 58.117.101
libavformat 58. 65.101 / 58. 65.101
libavdevice 58. 11.103 / 58. 11.103
libavfilter 7. 96.100 / 7. 96.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'/home/rcrowe/LVT/17651_20210119_162814.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : 'LVT17651'
encoder : Lavf58.20.100
Duration: 00:00:59.96, start: 0.000000, bitrate: 18 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc,
bt709), 384x288, 17 kb/s, 15.01 fps, 25 tbr, 90k tbn, 180k tbc (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/home/rcrowe/LVT/test2.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : 'LVT17651'
encoder : Lavf58.20.100
Duration: 00:00:59.96, start: 0.000000, bitrate: 18 kb/s
Stream #1:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc,
bt709), 384x288, 17 kb/s, 15.01 fps, 25 tbr, 90k tbn, 180k tbc (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream mapping:
Stream #0:0 (h264) -> psnr:main
Stream #1:0 (h264) -> psnr:reference
psnr -> Stream #0:0 (wrapped_avframe)
Press [q] to stop, [?] for help
*[null @ 0x55d3627a59c0] Input stream data not available, using default
time base*
Output #0, null, to 'pipe:':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : 'LVT17651'
encoder : Lavf58.65.101
Stream #0:0: Video: wrapped_avframe, yuvj420p(pc, bt709, progressive),
384x288, q=2-31, 200 kb/s, 25 fps, 25 tbn (default)
Metadata:
encoder : Lavc58.117.101 wrapped_avframe
frame= 899 fps=0.0 q=-0.0 Lsize=N/A time=00:00:59.92 bitrate=N/A speed=
240x
video:471kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
*[Parsed_psnr_0 @ 0x55d3628f9700] PSNR y:inf u:inf v:inf average:inf
min:inf max:inf*
On Mon, Jan 18, 2021 at 9:18 PM Gyan Doshi <ffmpeg at gyani.pro> wrote:
>
>
> On 19-01-2021 05:49 am, Reed Crowe wrote:
> > I have tried this test with three different versions of ffmpeg (4.3.1,
> > 3.4.8 and N-100671-gc48110a4a4 on 2 different OSes (Ubuntu 18.04, Fedora
> > 33).
> >
> > Here is the command I am using:
> > ffmpeg -i 17647_20210118_195325.mp4 -i test.mp4 -filter_complex psnr -f
> > null -
> > These are the same file (one just renamed). But I have tried it with
> > different files as well with the same error. I'm not totally sure what
> the
> > error means.
> >
> > Error: Application provided invalid, non monotonically increasing dts to
> > muxer in stream 0: 748 >= 748
>
> The output (encoding) time base is, by default, set to the reciprocal of
> the frame rate. When converting from a finer input time base, 90000 in
> this case, may produce collisions. So let's keep the input tie base. Add
> -enc_time_base -1
>
> However, this does not interfere with PSNR calculation. See below.
>
> > Output with errors:
> >
> > ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
> > built with gcc 10 (GCC)
> > configuration: --prefix=/usr --bindir=/usr/bin
> > --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg
> > --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man
> > --arch=x86_64 --optflags='-O2 -flto=auto -ffat-lto-objects -fexceptions
> -g
> > -grecord-gcc-switches -pipe -Wall -Werror=format-security
> > -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
> > -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
> > -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
> > -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
> > --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now
> > -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags='
> > -I/usr/include/rav1e' --enable-libopencore-amrnb
> --enable-libopencore-amrwb
> > --enable-libvo-amrwbenc --enable-version3 --enable-bzlib
> > --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt
> > --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d
> > --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm
> > --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm
> > --enable-liblensfun --enable-libmp3lame --enable-libmysofa --enable-nvenc
> > --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg
> > --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg
> > --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libssh
> > --enable-libtheora --enable-libvorbis --enable-libv4l2
> --enable-libvidstab
> > --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx
> > --enable-vulkan --enable-libglslang --enable-libx264 --enable-libx265
> > --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzvbi
> > --enable-lv2 --enable-avfilter --enable-avresample --enable-libmodplug
> > --enable-postproc --enable-pthreads --disable-static --enable-shared
> > --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64
> > --enable-lto --enable-libmfx --enable-runtime-cpudetect
> > libavutil 56. 51.100 / 56. 51.100
> > libavcodec 58. 91.100 / 58. 91.100
> > libavformat 58. 45.100 / 58. 45.100
> > libavdevice 58. 10.100 / 58. 10.100
> > libavfilter 7. 85.100 / 7. 85.100
> > libavresample 4. 0. 0 / 4. 0. 0
> > libswscale 5. 7.100 / 5. 7.100
> > libswresample 3. 7.100 / 3. 7.100
> > libpostproc 55. 7.100 / 55. 7.100
> > Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '17647_20210118_195325.mp4':
> > Metadata:
> > major_brand : isom
> > minor_version : 512
> > compatible_brands: isomiso2avc1mp41
> > title : 'LVT17647'
> > encoder : Lavf58.20.100
> > Duration: 00:00:59.87, start: 0.000000, bitrate: 67 kb/s
> > Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661),
> yuvj420p(pc,
> > bt470bg/bt470bg/bt709), 704x480, 66 kb/s, 15.03 fps, 15 tbr, 90k tbn,
> 180k
> > tbc (default)
> > Metadata:
> > handler_name : VideoHandler
> > Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
> > Metadata:
> > major_brand : isom
> > minor_version : 512
> > compatible_brands: isomiso2avc1mp41
> > title : 'LVT17647'
> > encoder : Lavf58.20.100
> > Duration: 00:00:59.87, start: 0.000000, bitrate: 67 kb/s
> > Stream #1:0(und): Video: h264 (Main) (avc1 / 0x31637661),
> yuvj420p(pc,
> > bt470bg/bt470bg/bt709), 704x480, 66 kb/s, 15.03 fps, 15 tbr, 90k tbn,
> 180k
> > tbc (default)
> > Metadata:
> > handler_name : VideoHandler
> > Stream mapping:
> > Stream #0:0 (h264) -> settb
> > Stream #1:0 (h264) -> settb
> > psnr -> Stream #0:0 (wrapped_avframe)
> > Press [q] to stop, [?] for help
> > Output #0, null, to 'pipe:':
> > Metadata:
> > major_brand : isom
> > minor_version : 512
> > compatible_brands: isomiso2avc1mp41
> > title : 'LVT17647'
> > encoder : Lavf58.45.100
> > Stream #0:0: Video: wrapped_avframe, yuvj420p, 704x480, q=2-31, 200
> > kb/s, 15 fps, 15 tbn, 15 tbc (default)
> > Metadata:
> > encoder : Lavc58.91.100 wrapped_avframe
> > *[null @ 0x55e31e9a0240] Application provided invalid, non monotonically
> > increasing dts to muxer in stream 0: 748 >= 748*
> > frame= 899 fps=0.0 q=-0.0 Lsize=N/A time=00:00:59.86 bitrate=N/A speed=
> > 150x
> > video:471kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> > muxing overhead: unknown
> > [Parsed_psnr_4 @ 0x55e31edfa580] PSNR y:inf u:inf v:inf average:inf
> min:inf
> > max:inf
>
> PSNR is calculated and printed on the last line above.
>
> Regards,
> Gyan
>
>
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list