Discussion:
[KPhotoAlbum] [KPhotoalbum] regression: problem with extracting video length
Reimar Imhof
2016-12-04 19:47:19 UTC
Permalink
Hi all,

a new problem with extracting video length:
Message is:
Unable to parse video length from ffprobe output! Output was:
"19.680000\n19.680000\n"

The video is not that great that I needed the length output twice ;-)

Starting ffprobe directly on that file gives:

ffprobe '/home/xx/images/abc/xyz.MTS'
ffprobe version 3.2 Copyright (c) 2007-2016 the FFmpeg developers
built with gcc 4.8 (SUSE Linux)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --
incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-
switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -
fasynchronous-unwind-tables -g' --optflags='-fmessage-length=0 -grecord-gcc-
switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -
fasynchronous-unwind-tables -g' --disable-htmlpages --enable-pic --disable-
stripping --enable-shared --disable-static --enable-gpl --disable-openssl --
enable-avresample --enable-libcdio --enable-gnutls --enable-ladspa --enable-
libass --enable-libbluray --enable-libcelt --enable-libcdio --enable-libdc1394
--enable-libfreetype --enable-libgsm --enable-libopenjpeg --enable-libopus --
enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora
--enable-libvorbis --enable-libvpx --enable-libwebp --enable-netcdf --enable-
vaapi --enable-vdpau --enable-libfdk_aac --enable-nonfree --enable-libmp3lame
--enable-libtwolame --enable-libx264 --enable-libx265 --enable-libxvid --
enable-x11grab
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.100 / 57. 64.100
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, mpegts, from '/home/xx/images/abc/xyz.MTS':
Duration: 00:00:19.68, start: 1.020000, bitrate: 26254 kb/s
Program 1
Stream #0:0[0x1011]: Video: h264 (High) (HDPR / 0x52504448),
yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn,
100 tbc
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo,
fltp, 256 kb/s
Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
0x0090), 1920x1080


Is there anything I can do about it?

Reimar
Johannes Zarl-Zierl
2016-12-04 20:17:11 UTC
Permalink
Hi Reimar,
Post by Reimar Imhof
"19.680000\n19.680000\n"
Does ffprobe print the length twice when called like that:
ffprobe -v error -select_streams v:0 -show_entries stream=duration -of
default=noprint_wrappers=1:nokey=1 '/home/xx/images/abc/xyz.MTS'

... and does this happen for all your videos?

Cheers,
Johannes
Reimar Imhof
2016-12-04 20:40:20 UTC
Permalink
Hi Johannes,

you're right, the length gets printed twice.

It doesn't happen for the example video from jesper.

In the ffprobe output I provided you see, there are three streams in my video:
video, audio and subtitle.

I've provided a very simple patch: Just test for list.count()<2 instead of
...=2.

Cheers,
Reimar
Post by Johannes Zarl-Zierl
Hi Reimar,
Post by Reimar Imhof
"19.680000\n19.680000\n"
ffprobe -v error -select_streams v:0 -show_entries stream=duration -of
default=noprint_wrappers=1:nokey=1 '/home/xx/images/abc/xyz.MTS'
... and does this happen for all your videos?
Cheers,
Johannes
_______________________________________________
KPhotoAlbum mailing list
https://mail.kdab.com/mailman/listinfo/kphotoalbum
Reimar Imhof
2016-12-04 21:10:56 UTC
Permalink
Hi Johannes,

just an other idea:
What about videos that do just have a video track.
Perhaps the test could just ensure there is at least one track.

An other point about videos:
KPhotoalbum complains it couldn't extract thumbnails. This happened with my
video and the demo video from Jesper. Just very strange: I got pretty
previews...

Cheers
Reimar
Post by Reimar Imhof
Hi Johannes,
you're right, the length gets printed twice.
It doesn't happen for the example video from jesper.
In the ffprobe output I provided you see, there are three streams in my
video: video, audio and subtitle.
I've provided a very simple patch: Just test for list.count()<2 instead of
...=2.
Cheers,
Reimar
Post by Johannes Zarl-Zierl
Hi Reimar,
Post by Reimar Imhof
"19.680000\n19.680000\n"
ffprobe -v error -select_streams v:0 -show_entries stream=duration -of
default=noprint_wrappers=1:nokey=1 '/home/xx/images/abc/xyz.MTS'
... and does this happen for all your videos?
Cheers,
Johannes
_______________________________________________
KPhotoAlbum mailing list
https://mail.kdab.com/mailman/listinfo/kphotoalbum
Loading...