[FFmpeg-user] -to,-t options not honored...

DopeLabs dopelabs at dubstep.fm
Mon May 6 02:44:29 EEST 2019


this is what i use in a script i use to record exactly 1 hour from ip cameras at home... 

ffmpeg  -i "rtsp://<user:pass>@IP:PORT/cam/realmonitor?channel=1&subtype=0" -c copy -movflags +faststart -t 01:00:00.000 "/Volumes/CCTV/FRONT_EXT_-_$(date +%Y-%m-%d_%H-%M-%S).mp4"

and to verify using ffprobe...

 $ ffprobe FRONT_EXT_-_2019-05-01_00-00-00.mp4
ffprobe version N-93632-gdf9ef925f9 Copyright (c) 2007-2019 the FFmpeg developers
  built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
  configuration: --enable-filter=gltransition --extra-libs='-lGLEW -lglfw' --enable-shared --enable-gpl --enable-nonfree --enable-avresample --enable-avisynth --enable-gnutls --enable-libass --enable-libcaca --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libx264 --enable-libfdk-aac --prefix=/opt/local --enable-opengl
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 52.100 / 58. 52.100
  libavformat    58. 27.103 / 58. 27.103
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 49.100 /  7. 49.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'FRONT_EXT_-_2019-05-01_00-00-00.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : Media Server
    encoder         : Lavf58.27.103
  Duration: 01:00:00.01, start: 0.000000, bitrate: 6129 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 2560x1440 [SAR 1:1 DAR 16:9], 6127 kb/s, 24.98 fps, 25 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler


hope this helps =]

DL


> On May 5, 2019, at 9:20 10AM, Calvin Arndt <carndt at macksrecycling.com> wrote:
> 
> In a effort to create a camera recording of an exact amount of time.
> 
> FFmpeg/ffmpeg -y -loglevel 16 -i http://10.17.24.6/mjpg/video.mjpg -to 00:01:00 -filter:v fps=fps=7 -b 512k /DVR/Tower2/05-05_11-04.avi
> 
> : ~# ls -l /DVR/Tower2/05-05_11-04.avi
> -rw-r--r-- 1 root root 5314038 May 5 11:07 /DVR/Tower2/05-05_11-04.avi
> 
> Without the -to 00:01:00 the file is perfect. The file plays a exactly the appropriate frame rate.
> the clock is in sync with the timestamps in the video.
> 
> With the -to 00:01:00 option the file plays at wrong frame rate (approx 2.5x)
> And it records for 3-5 minutes!
> 
> using -t 3600 before or after the -i yeilds similar results?
> 
> What am I doing wrong?
> 
> Extra points for explaining why -to effects output frame rate! :)
> 
> -- 
> Calvin Arndt
> (217) 377-2979
> carndt at macksrecycling.com
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-user mailing list