我试图制作少数幻灯片视频(在本例中为3).jpgs。要做到这一点,我使用
ffmpeg -r 1/5 -i bat%03d.jpg -c:v libx264 -r 30 -pix_fmt yuv420p proba12.mp4
实际上它适用于Windows(它播放每个图像5秒)但是在raspbian上它既不能用于omxplayer也不能用于hello_video.bin(在h264中)。
以下是控制台显示的内容:
pi@raspberrypi:~/Downloads $ ffmpeg -r 1/5 -i bat%03d.jpg -c:v libx264 -r 30 -pix_fmt yuv420p proba12.mp4
ffmpeg version N-89047-g54f8ac199f Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1) 20170516
configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree
libavutil 56. 0.100 / 56. 0.100
libavcodec 58. 3.101 / 58. 3.101
libavformat 58. 2.100 / 58. 2.100
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 0.101 / 7. 0.101
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Input #0, image2, from 'bat%03d.jpg':
Duration: 00:00:00.12, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080
[SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[swscaler @ 0x31ac620] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0x30fef00] using SAR=1/1
[libx264 @ 0x30fef00] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x30fef00] profile High, level 4.0
[libx264 @ 0x30fef00] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 r ef=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 fa st_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=25 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 'proba12.mp4':
Metadata:
encoder : Lavf58.2.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc
Metadata:
encoder : Lavc58.3.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 449 fps=8.0 q=-1.0 Lsize= 1341kB time=00:00:14.86 bitrate= 738.9kbits/s dup=446 drop=0 speed=0.265x
video:1335kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.457740%
[libx264 @ 0x30fef00] frame I:3 Avg QP:15.58 size:442255
[libx264 @ 0x30fef00] frame P:113 Avg QP:18.36 size: 130
[libx264 @ 0x30fef00] frame B:333 Avg QP:27.00 size: 74
[libx264 @ 0x30fef00] consecutive B-frames: 1.1% 0.0% 0.0% 98.9%
[libx264 @ 0x30fef00] mb I I16..4: 2.0% 94.5% 3.5%
[libx264 @ 0x30fef00] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.4% 0.0% 0.0% 0.0% 0.0% skip:99.6%
[libx264 @ 0x30fef00] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.1% 0.0% 0.0% direct: 0.0% skip:99.9% L0:19.2% L1:80.8% BI: 0.0%
[libx264 @ 0x30fef00] 8x8 transform intra:94.5% inter:61.3%
[libx264 @ 0x30fef00] coded y,uvDC,uvAC intra: 85.4% 31.7% 25.4% inter: 0.0% 0.1% 0.0%
[libx264 @ 0x30fef00] i16 v,h,dc,p: 43% 20% 9% 29%
[libx264 @ 0x30fef00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 11% 33% 5% 7% 6% 8% 5% 8%
[libx264 @ 0x30fef00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 14% 15% 7% 11% 8% 9% 9% 6%
[libx264 @ 0x30fef00] i8c dc,h,v,p: 82% 8% 7% 3%
[libx264 @ 0x30fef00] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x30fef00] ref P L0: 99.5% 0.0% 0.4% 0.1%
[libx264 @ 0x30fef00] ref B L0: 71.2% 28.6% 0.3%
[libx264 @ 0x30fef00] ref B L1: 99.1% 0.9%
[libx264 @ 0x30fef00] kb/s:730.29
如果我试图使用文本文件连接这些文件并且我将每个文件的持续时间设置为5会产生不同的显示时间,这也很奇怪...在这个例子中,第一个显示15秒,第二个显示5秒,最后一个10秒......当然这种合并图像的方式在raspbian下也不起作用
我使用Rasberry pi 3b和最新的raspoped noobs在船上
你能指导我一个解决方案吗?我的想法很快......干杯