[FFmpeg-user] DST/PST invalid dropping

Olivier Olivier.Nicole at cs.ait.ac.th
Fri Jul 13 09:11:30 EEST 2018


Hello,

I am trying to reccord a stream from a USB camera. The camera may not be
the best and the motherboard is old (slow USB).

I see a load of messages of the sort:

DTS 1266874886790581, next:1361502 st:0 invalid dropping
PTS 1266874886790581, next:1361502 invalid dropping st:0

and I don't get as many frames that I could be expecting.

The command line is: "ffmpeg -i /dev/video0 test.mp4" and the output is
bellow.

I am concerned by:

- all the DST/PST messages;

- also it seems that the last 3 frames are all going to frame 60 (I had
  cases when the frame number would not change after a while and was
  stuck to the same number indefinitely);

- when I press q of send a SIGINT, it looks like I am loosing the last
  few seconds of the video.

I have started looking at ffmpeg documentation, but there are over 500
pages, so I could benefit from pointer about where to star looking.

I have plenty of available memory on the machine, so it may be giving
ffmpeg more buffer to play with?

Thanks in advance,

Olivier



$ ffmpeg -i /dev/video0 test.mp4
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
  built with FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
  configuration: --prefix=/usr/local --mandir=/usr/local/man --datadir=/usr/local/share/ffmpeg --pkgconfigdir=/usr/local/libdata/pkgconfig --enable-shared --enable-pic --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --enable-pthreads --cc=cc --disable-alsa --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libass --disable-libbs2b --disable-libcaca --disable-libcdio --disable-libcelt --disable-chromaprint --disable-libcodec2 --disable-libdc1394 --disable-debug --disable-htmlpages --disable-libdrm --disable-libfdk-aac --disable-libflite --enable-fontconfig --enable-libfreetype --enable-frei0r --disable-libfribidi --disable-libgme --disable-libgsm --enable-iconv --disable-libilbc --disable-libjack --disable-libkvazaar --disable-ladspa --disable-libmp3lame --disable-libbluray --disable-librsvg --disable-libxml2 --disable-lv2 --enable-mmx --disable-libmodplug --disable-libmysofa --disable-openal --disable-opencl --enable-libopencv --disable-opengl --disable-libopenh264 --disable-libopenjpeg --enable-optimizations --disable-libopus --disable-libpulse --enable-runtime-cpudetect --disable-librubberband --disable-sdl2 --disable-libsmbclient --disable-libsnappy --disable-sndio --disable-libsoxr --disable-libspeex --disable-sse --disable-libssh --disable-libtesseract --enable-libtheora --disable-libtwolame --enable-libv4l2 --disable-vaapi --disable-vdpau --disable-libvidstab --enable-libvorbis --disable-libvo-amrwbenc --enable-libvpx --disable-libwavpack --disable-libwebp --enable-libx264 --disable-libx265 --disable-libxcb --enable-libxvid --disable-outdev=xv --disable-libzimg --disable-libzmq --disable-libzvbi --disable-gcrypt --enable-gmp --disable-librtmp --enable-gnutls --disable-openssl --enable-version3 --disable-nonfree --disable-libaom --disable-libsrt
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 0.793117, bitrate: 147456 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
File 'test.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x2b046180] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 SlowShuffle UnalignedStack
[libx264 @ 0x2b046180] profile High 4:2:2, level 3.0, 4:2:2 8-bit
[libx264 @ 0x2b046180] 264 - core 152 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'test.mp4':
  Metadata:
    encoder         : Lavf58.12.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv422p, 640x480, q=-1--1, 30 fps, 15360 tbn, 30 tbc
    Metadata:
      encoder         : Lavc58.18.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
DTS 1266874886790581, next:1361502 st:0 invalid dropping
PTS 1266874886790581, next:1361502 invalid dropping st:0
...
PTS 1266874888710644, next:1928163 invalid dropping st:0
DTS 1266874888774679, next:1961496 st:0 invalid dropping
PTS 1266874888774679, next:1961496 invalid dropping st:0
frame=   60 fps= 40 q=29.0 size=       0kB time=00:00:00.33 bitrate=
1.2kbits/s dup=33 drop=1 speed=0.22
frame=   60 fps= 30 q=29.0 size=       0kB time=00:00:00.33 bitrate=
1.2kbits/s dup=33 drop=5 speed=0.16
frame=   60 fps= 16 q=-1.0 Lsize=     364kB time=00:00:01.90
bitrate=1567.6kbits/s dup=33 drop=6 speed=0.511x    
video:362kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.417238%
[libx264 @ 0x2b046180] frame I:1     Avg QP:24.31  size: 52121
[libx264 @ 0x2b046180] frame P:15    Avg QP:24.35  size: 16790
[libx264 @ 0x2b046180] frame B:44    Avg QP:26.36  size:  1503
[libx264 @ 0x2b046180] consecutive B-frames:  1.7%  0.0%  5.0% 93.3%
[libx264 @ 0x2b046180] mb I  I16..4: 17.8% 37.1% 45.1%
[libx264 @ 0x2b046180] mb P  I16..4:  1.2%  2.2%  0.2%  P16..4: 37.1% 17.2% 14.8%  0.0%  0.0%    skip:27.3%
[libx264 @ 0x2b046180] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 12.2%  1.6%  0.8%  direct: 6.1%  skip:79.2%  L0:45.1% L1:44.3% BI:10.7%
[libx264 @ 0x2b046180] 8x8 transform intra:45.2% inter:36.2%
[libx264 @ 0x2b046180] coded y,uvDC,uvAC intra: 60.0% 98.2% 85.0% inter: 13.4% 27.9% 6.9%
[libx264 @ 0x2b046180] i16 v,h,dc,p: 39% 31%  7% 23%
[libx264 @ 0x2b046180] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 23% 26%  3%  4%  4%  4%  4%  5%
[libx264 @ 0x2b046180] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 35% 27% 12%  3%  3%  5%  3%  6%  5%
[libx264 @ 0x2b046180] i8c dc,h,v,p: 49% 18% 24%  9%
[libx264 @ 0x2b046180] Weighted P-Frames: Y:13.3% UV:6.7%
[libx264 @ 0x2b046180] ref P L0: 54.6% 12.8% 22.6% 10.0%  0.1%
[libx264 @ 0x2b046180] ref B L0: 58.6% 33.5%  7.8%
[libx264 @ 0x2b046180] ref B L1: 87.9% 12.1%
[libx264 @ 0x2b046180] kb/s:1480.39





$ uname -a
FreeBSD door.cs.ait.ac.th 11.1-RELEASE-p10 FreeBSD 11.1-RELEASE-p10 #3 r334472: Fri Jun 22 11:03:48 ICT 2018     root at door.cs.ait.ac.th:/usr/obj/usr/src/sys/GENERIC  i386
$ ffmpeg -version
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
built with FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
configuration: --prefix=/usr/local --mandir=/usr/local/man --datadir=/usr/local/share/ffmpeg --pkgconfigdir=/usr/local/libdata/pkgconfig --enable-shared --enable-pic --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --enable-pthreads --cc=cc --disable-alsa --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libass --disable-libbs2b --disable-libcaca --disable-libcdio --disable-libcelt --disable-chromaprint --disable-libcodec2 --disable-libdc1394 --disable-debug --disable-htmlpages --disable-libdrm --disable-libfdk-aac --disable-libflite --enable-fontconfig --enable-libfreetype --enable-frei0r --disable-libfribidi --disable-libgme --disable-libgsm --enable-iconv --disable-libilbc --disable-libjack --disable-libkvazaar --disable-ladspa --disable-libmp3lame --disable-libbluray --disable-librsvg --disable-libxml2 --disable-lv2 --enable-mmx --disable-libmodplug --disable-libmysofa --disable-openal --disable-opencl --enable-libopencv --disable-opengl --disable-libopenh264 --disable-libopenjpeg --enable-optimizations --disable-libopus --disable-libpulse --enable-runtime-cpudetect --disable-librubberband --disable-sdl2 --disable-libsmbclient --disable-libsnappy --disable-sndio --disable-libsoxr --disable-libspeex --disable-sse --disable-libssh --disable-libtesseract --enable-libtheora --disable-libtwolame --enable-libv4l2 --disable-vaapi --disable-vdpau --disable-libvidstab --enable-libvorbis --disable-libvo-amrwbenc --enable-libvpx --disable-libwavpack --disable-libwebp --enable-libx264 --disable-libx265 --disable-libxcb --enable-libxvid --disable-outdev=xv --disable-libzimg --disable-libzmq --disable-libzvbi --disable-gcrypt --enable-gmp --disable-librtmp --enable-gnutls --disable-openssl --enable-version3 --disable-nonfree --disable-libaom --disable-libsrt
libavutil      56. 14.100 / 56. 14.100
libavcodec     58. 18.100 / 58. 18.100
libavformat    58. 12.100 / 58. 12.100
libavdevice    58.  3.100 / 58.  3.100
libavfilter     7. 16.100 /  7. 16.100
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  1.100 /  5.  1.100
libswresample   3.  1.100 /  3.  1.100
libpostproc    55.  1.100 / 55.  1.100


-- 


More information about the ffmpeg-user mailing list