我使用 iPhone SE、iOS 版本 11.4.1(15G77)录制了一段视频。
我想以最佳质量提取尽可能多的单独和冻结帧。我猜我每秒最多可以获得 30 个冻结帧?
我ffmpeg -i /tmp/IMG_1234.MOV -r 1/1 /tmp/$filename%03d.bmp
每秒只得到一个定格帧。
我必须做什么才能获得尽可能多的不同/单独的冻结帧?
下一步是提取定格帧,不是整个视频,而是从位置 a 到位置 b。例如从 00:05 到 00:10 (mm:ss) 的所有帧。
以下是来自 ffmpeg 的有关该文件的信息:
ffmpeg -i /home/merlin/Downloads/IMG_8087.MOV
ffmpeg version 3.4.4-0ubuntu0.18.04.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --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-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --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-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/merlin/Downloads/IMG_8087.MOV':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2018-09-04T05:43:47.000000Z
com.apple.quicktime.make: Apple
com.apple.quicktime.model: iPhone SE
com.apple.quicktime.software: 11.4.1
com.apple.quicktime.creationdate: 2018-09-04T07:43:47+0200
Duration: 00:00:17.48, start: 0.000000, bitrate: 15925 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 15818 kb/s, 29.98 fps, 29.97 tbr, 600 tbn, 1200 tbc (default)
Metadata:
rotate : 90
creation_time : 2018-09-04T05:43:47.000000Z
handler_name : Core Media Data Handler
encoder : H.264
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 95 kb/s (default)
Metadata:
creation_time : 2018-09-04T05:43:47.000000Z
handler_name : Core Media Data Handler
Stream #0:2(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
Metadata:
creation_time : 2018-09-04T05:43:47.000000Z
handler_name : Core Media Data Handler
Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
Metadata:
creation_time : 2018-09-04T05:43:47.000000Z
handler_name : Core Media Data Handler
At least one output file must be specified
提前感谢您抽出时间:)
答案1
看起来-r 30/1
参数满足我的要求。
ffmpeg -i /tmp/IMG_1234.MOV -r 30/1 /tmp/$filename%03d.bmp
不知道是否有更多的参数可以获得更清晰的定格帧。