[FFmpeg-user] HEVC decoding of first frame
Christian Herglotz
christian.herglotz at fau.de
Thu Sep 17 10:48:16 CEST 2015
Hello everyone,
I've got a question regarding the decoding process for HEVC-coded
sequences. When timing the process I found that the decoding of the
first frame always takes twice as long as the decoding of all the other
frames. This seems to be true independent from the resolution. It is
also not related to inter coding, as all frames are intra coded with
the same QP in the example given below. Other decoders (e.g. HM or
libde265) do not show this behavior for the same input sequences. Here
is an examplary output for a single frame and for two frames. It is
timed using the linux time-function, furthermore single core processing
is forced and priority is set to the highest level.
System: Ubuntu 12.04, Pandaboard with OMAP4430 SoC
Command line for single frame:
time -p taskset -c 0 nice -n-30 /root/bin/ffmpeg -i
PeopleOnStreet_intra_1frames_QP10.bin -f rawvideo -y /dev/null
Output:
ffmpeg version 2.1.git Copyright (c) 2000-2014 the FFmpeg developers
built on Feb 20 2014 16:27:13 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --prefix=/root/ffmpeg_build
--extra-cflags=-I/root/ffmpeg_build/include
--extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin
--extra-libs=-ldl --enable-gpl --enable-libass --enable-nonfree
libavutil 52. 64.100 / 52. 64.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 1.103 / 4. 1.103
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Input #0, hevc, from 'PeopleOnStreet_intra_1frames_QP10.bin':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: hevc (Main), yuv420p(tv), 2560x1600, 25 tbr,
1200k tbn, 25 tbc
Output #0, rawvideo, to '/dev/null':
Metadata:
encoder : Lavf55.33.100
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p,
2560x1600, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (hevc -> rawvideo)
Press [q] to stop, [?] for help
frame= 1 fps=0.3 q=0.0 size= 6000kB time=00:00:00.04
bitrate=1228800.0kbitframe= 1 fps=0.3 q=0.0 Lsize= 6000kB
time=00:00:00.04 bitrate=1228800.0kbits/s
video:6000kB audio:0kB subtitle:0 data:0 global headers:0kB muxing
overhead 0.000000%
real 5.93
user 5.69
sys 0.22
Command line two frames:
time -p taskset -c 0 nice -n-30 /root/bin/ffmpeg -i
PeopleOnStreet_intra_2frames_QP10.bin -f rawvideo -y /dev/null
Output:
ffmpeg version 2.1.git Copyright (c) 2000-2014 the FFmpeg developers
built on Feb 20 2014 16:27:13 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --prefix=/root/ffmpeg_build
--extra-cflags=-I/root/ffmpeg_build/include
--extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin
--extra-libs=-ldl --enable-gpl --enable-libass --enable-nonfree
libavutil 52. 64.100 / 52. 64.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 1.103 / 4. 1.103
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Input #0, hevc, from 'PeopleOnStreet_intra_2frames_QP10.bin':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: hevc (Main), yuv420p(tv), 2560x1600, 25 tbr,
1200k tbn, 25 tbc
Output #0, rawvideo, to '/dev/null':
Metadata:
encoder : Lavf55.33.100
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p,
2560x1600, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (hevc -> rawvideo)
Press [q] to stop, [?] for help
frame= 2 fps=0.7 q=0.0 size= 12000kB time=00:00:00.08
bitrate=1228800.0kbitframe= 2 fps=0.3 q=0.0 size= 12000kB
time=00:00:00.08 bitrate=1228800.0kbitframe= 2 fps=0.3 q=0.0 Lsize=
12000kB time=00:00:00.08 bitrate=1228800.0kbits/s
video:12000kB audio:0kB subtitle:0 data:0 global headers:0kB muxing
overhead 0.000000%
real 8.88
user 8.58
sys 0.28
Apparently, decoding of a single frame takes about 6s, decoding of two
frames about 9s. Is it possible that the first frame is always decoded
twice in this software?
Thanks for your help!
Christian Herglotz
--
Dipl.-Ing. Dipl.-Wirt.Ing. Christian Herglotz
Chair of Multimedia Communications and Signal Processing
Friedrich-Alexander University Erlangen-Nürnberg
Cauerstr. 7, D-91058 Erlangen, Germany
More information about the ffmpeg-user
mailing list