[FFmpeg-trac] #6682(undetermined:new): hstack repeats input frames

FFmpeg trac at avcodec.org
Sat Sep 23 02:35:43 EEST 2017


#6682: hstack repeats input frames
-------------------------------------+-------------------------------------
             Reporter:  damonmaria   |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
              Version:  git-master   |  undetermined
             Keywords:  hstack       |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by damonmaria):

 I was originally using `-vcodec copy` because images resulting from the
 saved videos will be used for AI training. I didn't want to re-encode and
 have the images the model was trained on not match the direct output of
 the camera RTSP stream (which the model will be predicting on). I tried
 re-encoding lossless but obviously that creates huge files.

 I presume from what you've said above to properly test this I should be
 doing the hstack directly on the RTSP streams, not on files I've saved
 using `-vcodec copy`. Sure, I'll do that from now on. I did when
 originally posting the issue in the first place test what I was trying
 with hstack directly on the RTSP streams. The problem there is I get lots
 of RTSP and decode errors which don't happen when I used `-vcodec copy`
 and then hstack'ed them later. It's not that the machine can't decode fast
 enough since running hstack on the saved files runs at 20x speed.

 Using `-timestamps` as an input option doesn't work for me:
 {{{
 $ ffmpeg -timestamps abs -i "rtsp://root:root@192.168.13.104/axis-
 media/media.amp?camera=1" -t 10 2017-09-22T231000-3.mp4
 ...
 Option timestamps not found.
 }}}

 I have just tried saving a single RTSP stream (with re-encoding) and am
 getting "Past duration XXX too large" errors. Maybe this is indicative of
 the root problem:
 {{{
 $ ffmpeg -i "rtsp://root:root@192.168.13.104/axis-
 media/media.amp?camera=1" -t 10 -vsync cfr 2017-09-22T231000-4.mp4
 ffmpeg version 3.3.4-1~16.04.york0 Copyright (c) 2000-2017 the FFmpeg
 developers
   built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
   configuration: --prefix=/usr --extra-version='1~16.04.york0'
 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu
 --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping
 --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa
 --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
 --enable-libcdio --enable-libflite --enable-libfontconfig --enable-
 libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-
 libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus
 --enable-libpulse --enable-librubberband --enable-libshine --enable-
 libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-
 libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-
 libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-
 libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl
 --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint
 --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
   libavutil      55. 58.100 / 55. 58.100
   libavcodec     57. 89.100 / 57. 89.100
   libavformat    57. 71.100 / 57. 71.100
   libavdevice    57.  6.100 / 57.  6.100
   libavfilter     6. 82.100 /  6. 82.100
   libavresample   3.  5.  0 /  3.  5.  0
   libswscale      4.  6.100 /  4.  6.100
   libswresample   2.  7.100 /  2.  7.100
   libpostproc    54.  5.100 / 54.  5.100
 Input #0, rtsp, from 'rtsp://root:root@192.168.13.104/axis-
 media/media.amp?camera=1':
   Metadata:
     title           : Session streamed with GStreamer
     comment         : rtsp-server
   Duration: N/A, start: 0.249989, bitrate: N/A
     Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive),
 800x600 [SAR 1:1 DAR 4:3], 4 fps, 4 tbr, 90k tbn, 180k tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Press [q] to stop, [?] for help
 No pixel format specified, yuvj420p for H.264 encoding chosen.
 Use -pix_fmt yuv420p for compatibility with outdated media players.
 [libx264 @ 0xaf0a0c90c0] using SAR=1/1
 [libx264 @ 0xaf0a0c90c0] using cpu capabilities: MMX2 SSE2Fast SSSE3
 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
 [libx264 @ 0xaf0a0c90c0] profile High, level 3.1
 [libx264 @ 0xaf0a0c90c0] 264 - core 148 r2795 aaa9aa8 - 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=12
 lookahead_threads=2 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=4
 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 '2017-09-22T231000-4.mp4':
   Metadata:
     title           : Session streamed with GStreamer
     comment         : rtsp-server
     encoder         : Lavf57.71.100
     Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021),
 yuvj420p(pc), 800x600 [SAR 1:1 DAR 4:3], q=-1--1, 4 fps, 16384 tbn, 4 tbc
     Metadata:
       encoder         : Lavc57.89.100 libx264
     Side data:
       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 Past duration 0.999947 too large
     Last message repeated 2 times
 Past duration 0.999992 too large
 Past duration 0.999947 too large
     Last message repeated 3 times
 Past duration 0.999992 too large
 Past duration 0.999947 too large
 Past duration 0.999992 too large
 Past duration 0.999947 too large
     Last message repeated 2 times
 Past duration 0.999992 too large
     Last message repeated 2 times
 Past duration 0.999947 too large
 ...
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6682#comment:16>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list