[FFmpeg-user] Trying to extract an image from a video

Damien Vandame d.vandame at gmail.com
Mon Sep 26 03:51:55 EEST 2022


Hi,
Sorry to disturb you, I'm trying to extract only one image from a video.
Using ffmpeg with Windows.
It does work, but there is a warning I'd like to get rid of.

Can anybody tell me the right syntax?
Thank you very much!

This is the syntax I'm currently using :

*E:\tests>ffmpeg -i myvideo.mp4 -r 1 -ss 7 -frames:v 1 myvideo.jpg*
ffmpeg version 2022-09-22-git-af919cf780-full_build-www.gyan.dev Copyright
(c) 2000-2022 the FFmpeg developers
  built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static
--disable-w32threads --disable-autodetect --enable-fontconfig
--enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib
--enable-lzma --enable-libsnappy --enable-zlib --enable-librist
--enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth
--enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24
--enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi
--enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom
--enable-libjxl --enable-libopenjpeg --enable-libvpx
--enable-mediafoundation --enable-libass --enable-frei0r
--enable-libfreetype --enable-libfribidi --enable-liblensfun
--enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf
--enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec
--enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx
--enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl
--enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt
--enable-libopencore-amrwb --enable-libmp3lame --enable-libshine
--enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc
--enable-libilbc --enable-libgsm --enable-libopencore-amrnb
--enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa
--enable-libbs2b --enable-libflite --enable-libmysofa
--enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      57. 36.102 / 57. 36.102
  libavcodec     59. 44.100 / 59. 44.100
  libavformat    59. 32.100 / 59. 32.100
  libavdevice    59.  8.101 / 59.  8.101
  libavfilter     8. 49.100 /  8. 49.100
  libswscale      6.  8.112 /  6.  8.112
  libswresample   4.  9.100 /  4.  9.100
  libpostproc    56.  7.100 / 56.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'myvideo.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.40.101
  Duration: 00:00:07.04, start: 0.000000, bitrate: 3218 kb/s
  Stream #0:0[0x1](und): Video: h264 (Constrained Baseline) (avc1 /
0x31637661), yuv420p(progressive), 720x900 [SAR 1:1 DAR 4:5], 3216 kb/s,
29.97 fps, 29.97 tbr, 11988 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0000027394fee7c0] [swscaler @ 0000027394ffb7c0] deprecated
pixel format used, make sure you did set range correctly
[swscaler @ 0000027394fee7c0] [swscaler @ 0000027395024940] deprecated
pixel format used, make sure you did set range correctly
[swscaler @ 0000027394fee7c0] [swscaler @ 0000027395052480] deprecated
pixel format used, make sure you did set range correctly
[swscaler @ 0000027394fee7c0] [swscaler @ 0000027395084b00] deprecated
pixel format used, make sure you did set range correctly
[swscaler @ 0000027394fee7c0] [swscaler @ 00000273950ac180] deprecated
pixel format used, make sure you did set range correctly
[swscaler @ 0000027394fee7c0] [swscaler @ 00000273950ed340] deprecated
pixel format used, make sure you did set range correctly
[swscaler @ 0000027394fee7c0] [swscaler @ 000002739510af40] deprecated
pixel format used, make sure you did set range correctly
[swscaler @ 0000027394fee7c0] [swscaler @ 000002739515f8c0] deprecated
pixel format used, make sure you did set range correctly
[swscaler @ 0000027394fee7c0] [swscaler @ 000002739516de80] deprecated
pixel format used, make sure you did set range correctly
[swscaler @ 0000027394fee7c0] [swscaler @ 0000027395198fc0] deprecated
pixel format used, make sure you did set range correctly
[swscaler @ 0000027394fee7c0] [swscaler @ 00000273951b7780] deprecated
pixel format used, make sure you did set range correctly
[swscaler @ 0000027394fee7c0] [swscaler @ 0000027395209dc0] deprecated
pixel format used, make sure you did set range correctly
[swscaler @ 0000027394fee7c0] [swscaler @ 000002739521c3c0] deprecated
pixel format used, make sure you did set range correctly
Output #0, image2, to 'myvideo.jpg':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.32.100
  Stream #0:0(und): Video: mjpeg, yuvj420p(pc, progressive), 720x900 [SAR
1:1 DAR 4:5], q=2-31, 200 kb/s, 1 fps, 1 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc59.44.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
[image2 @ 00000273929beb40]
*The specified filename 'myvideo.jpg' does not contain an image sequence
pattern or a pattern is invalid.[image2 @ 00000273929beb40] Use a pattern
such as %03d for an image sequence or use the -update option (with
-frames:v 1 if needed) to write a single image.*
frame=    1 fps=0.0 q=6.2 Lsize=N/A time=00:00:00.00 bitrate=N/A speed=   0x
video:45kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown

PS - If I use the -update option, it does not work at all.

Thanks again,

Best regards,

Damien Vandame


More information about the ffmpeg-user mailing list