我有五个* .jpeg图像文件:m01.jpeg到m05.jpeg。
我想制作一系列这五张图片的视频,并将其上传到Prezi以用于演示。
FFMPEG似乎是这里工作的工具。我正在使用以下命令生成视频:
ffmpeg -r 2 -i m%02d.jpeg -pix_fmt yuvj420p myvideo.mp4
这会生成一个我可以在本地播放的视频。不幸的是,当我尝试将视频上传到Prezi时,我总是收到以下错误...
"Technical details: id: 2110 the reason is: Event [Event type="stateChange" bubbles=false cancelable=false eventPhase=2]"
......这并不是特别有用。
如果我将a sample MP4 from the web上传到Prezi,则可以正常使用。
我的问题:有人知道我需要将FFMPEG作为参数放在这里,以便从这些图片中生成与Prezi兼容的视频吗?
编辑:根据要求,这是FFMPEG的完整控制台输出。不幸的是,我看不到明显的警告或错误。
sam@x220sm:~/tmp$ ffmpeg -r 2 -i m%02d.jpeg -pix_fmt yuvj420p myvideo.mp4
ffmpeg version 2.8.6-1ubuntu2 Copyright (c) 2000-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
[mjpeg @ 0xd8e620] Changeing bps to 8
Input #0, image2, from 'm%02d.jpeg':
Duration: 00:00:00.20, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 800x600 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 25 tbn, 25 tbc
[libx264 @ 0xd910c0] using SAR=1/1
[libx264 @ 0xd910c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0xd910c0] profile High, level 3.1
[libx264 @ 0xd910c0] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=2 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'myvideo.mp4':
Metadata:
encoder : Lavf56.40.101
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj420p(pc), 800x600 [SAR 1:1 DAR 4:3], q=-1--1, 2 fps, 16384 tbn, 2 tbc
Metadata:
encoder : Lavc56.60.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 5 fps=0.0 q=-1.0 Lsize= 1170kB time=00:00:01.50 bitrate=6390.8kbits/s
video:1169kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.073660%
[libx264 @ 0xd910c0] frame I:1 Avg QP:25.54 size:289842
[libx264 @ 0xd910c0] frame P:4 Avg QP:20.54 size:226716
[libx264 @ 0xd910c0] mb I I16..4: 0.0% 0.2% 99.8%
[libx264 @ 0xd910c0] mb P I16..4: 16.8% 23.8% 59.4% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip: 0.0%
[libx264 @ 0xd910c0] 8x8 transform intra:19.1% inter:0.0%
[libx264 @ 0xd910c0] coded y,uvDC,uvAC intra: 84.5% 85.6% 79.2% inter: 50.0% 100.0% 100.0%
[libx264 @ 0xd910c0] i16 v,h,dc,p: 95% 1% 4% 0%
[libx264 @ 0xd910c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 6% 8% 38% 7% 7% 6% 11% 9% 9%
[libx264 @ 0xd910c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 8% 9% 23% 9% 9% 8% 14% 9% 11%
[libx264 @ 0xd910c0] i8c dc,h,v,p: 72% 10% 5% 13%
[libx264 @ 0xd910c0] Weighted P-Frames: Y:50.0% UV:50.0%
[libx264 @ 0xd910c0] ref P L0: 50.0% 50.0%
[libx264 @ 0xd910c0] kb/s:3829.46
答案 0 :(得分:2)
确保使用"标准"帧速率和兼容的色度子采样方案:
ffmpeg -framerate 2 -i m%02d.jpeg -r 25 -pix_fmt yuv420p -profile:v baseline -movflags +faststart output.mp4
选项:
-framerate 2
将输入帧率设置为2.请注意image demuxer使用-framerate
代替-r
。
-r 25
将输出帧速率设置为25.
-pix_fmt yuv420p
确保4:2:0色度子采样。
-profile:v baseline
使用Baseline H.264配置文件。 Prezi可能不需要。
-movflags +faststart
通过渐进式下载进行播放 - 允许视频在完全下载文件之前开始播放。 Prezi可能不需要,但不包含任何内容。