[FFmpeg-user] RTSP to MKV: incorrect duration
m1ron0xFF
mironoff at protonmail.ch
Sun Aug 21 12:31:39 EEST 2016
I am trying to write RTSP stream to .mkv container this way (Linux):
ffmpeg -hide_banner -loglevel error -i %RTSP_Source% -c copy -map 0 -f segment -segment_time 3600 -segment_atclocktime 1 -segment_format mkv -strftime 1 "%PATH%/%Y-%m-%d_%H-%M-%S.mkv"
Everything seems OK, except time labels. MPC-HC (Windows) shows time correctly: about 60 min, and Time seek works fine. VLC (Windows) doesn't work correctly, time is invalid.
ffprobe output
cctv at PartCCTV:~$ ffprobe -show_entries format=start_time:stream=start_time:frame=pkt_pts_time -read_intervals %+#1 -of compact /media/cctv/id1/2016-08-20_16-00-00.mkv ffprobe version 2.8.6-1ubuntu2 Copyright (c) 2007-2016 the FFmpeg developers built with gcc 5.3.1 (Ubuntu 5.3.1-11ubuntu1) 20160311 configuration: --prefix=/usr --extra-version=1ubuntu2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --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-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --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-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Invalid UE golomb code Last message repeated 1 times Input #0, matroska,webm, from '/media/cctv/id1/2016-08-20_16-00-00.mkv': Metadata: title : RTSP Session ENCODER : Lavf56.40.101 Duration: 22:43:45.88, start: 78225.880000, bitrate: 230 kb/s Stream #0:0: Video: h264 (Baseline), yuv420p, 1280x960, SAR 1:1 DAR 4:3, 30 fps, 30 tbr, 1k tbn, 60 tbc (default) Metadata: DURATION : 22:43:45.880000000 Invalid UE golomb code frame|pkt_pts_time=78225.880000 stream|start_time=78225.880000 format|start_time=78225.880000 cctv at PartCCTV:~$
More information about the ffmpeg-user
mailing list