[FFmpeg-user] command for taking pictures at second 1, 15 ,30?

erwin mueller erwin12344321 at yahoo.de
Thu May 23 22:54:43 EEST 2019


 Hello,
may I please ask for a one-line command.My two lines aren't working. I guess it is a filename issue.But I am sure there is a much smarter way to solve it:

 ['ffmpeg', '-i', 'http://192.168.100.111:9000/?action=stream', '-f', 'image2', '-vf', 'fps=1', '"/home/pi/cam/img%03d.jpg"', '-f', 'image2', '-vf', 'fps=1/15', '"/home/pi/cam/img%03d.jpg"', '-vcodec', 'copy', '-an', '-bufsize', '2048k', '-t', '00:00:30', '-y', '/home/pi/cam/Klingel-20190523_214914.mp4']
MJPG Streamer Version: svn rev: 3:172M
 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 1024 x 768
 i: Frames Per Second.: 24
 i: Format............: YUV
 i: JPEG Quality......: 80
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
  configuration:
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
 o:   libavdevice    58.  5.100 / 58.  5.100
www-folder-path...: /usr/local/www/
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
 o: HTTP TCP port.....: 9000
 o: username:password.: disabled
 o: commands..........: disabled
[mjpeg @ 0x2e19f30] EOI missing, emulating
Input #0, mpjpeg, from 'http://192.168.100.111:9000/?action=stream':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1024x768 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Output #2, mp4, to '/home/pi/cam/Klingel-20190523_214914.mp4':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #2:0: Video: mjpeg (mp4v / 0x7634706D), yuvj420p(pc, bt470bg/unknown/unknown), 1024x768 [SAR 1:1 DAR 4:3], q=2-31, 25 tbr, 12800 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native))
  Stream #0:0 -> #1:0 (mjpeg (native) -> mjpeg (native))
  Stream #0:0 -> #2:0 (copy)
Press [q] to stop, [?] for help
Output #0, image2, to '"/home/pi/cam/img%03d.jpg"':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg, yuvj420p(pc), 1024x768 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 1 fps, 1 tbn, 1 tbc
    Metadata:
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
Output #1, image2, to '"/home/pi/cam/img%03d.jpg"':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #1:0: Video: mjpeg, yuvj420p(pc), 1024x768 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 0.07 fps, 0.07 tbn, 0.07 tbc
    Metadata:
      encoder         : Lavc58.35.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
[image2 @ 0x2e116a0] Could not open file : "/home/pi/cam/img001.jpg"rate=N/A speed=0.255x
av_interleaved_write_frame(): Input/output error

my command:VIDEO_RECORD_COMMAND = ['ffmpeg',
    '-i', "http://192.168.100.111:9000/?action=stream",
    '-f', 'image2', '-vf', 'fps=1',  '"/home/pi/cam/img%03d.jpg"',
    '-f', 'image2', '-vf', 'fps=1/15',  '"/home/pi/cam/img%03d.jpg"']

out put



    Am Donnerstag, 23. Mai 2019, 00:50:33 MESZ hat Carl Eugen Hoyos <ceffmpeg at gmail.com> Folgendes geschrieben:  
 
 Am Mi., 22. Mai 2019 um 19:47 Uhr schrieb erwin mueller via
ffmpeg-user <ffmpeg-user at ffmpeg.org>:

> ffmpeg version 3.2.12-1~deb9u1+rpt1 Copyright (c) 2000-2018 the FFmpeg developers

That's 2.5 years old and unsupported, please test current FFmpeg git head.

Please remember not to top-post here, Carl Eugen
_______________________________________________
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