将一组PNG转换为rawvideo.raw FFMPEG



最近,我一直在尝试修改一个小机器人的引导动画。它是一个.raw文件,包含一个接一个的每个RGB565帧。我已经能够使用获得所有的帧

ffmpeg -f rawvideo -pixel_format rgb565 -video_size 184x96 -framerate 10 -i "boot_anim.raw" -r 1/1 boot_anim%02d.png

但如果我试着用重新包装

ffmpeg -i boot_anim%02d.png -f rawvideo -pix_fmt rgb565 -framerate 10 -video_size 184x96 -r 1/1 "boot_anim.raw"

它只放入前两帧,没有其他内容。我还尝试过libx264和手动放入vcodec。同样的结果。我是ffmpeg和Linux的新手。

以下是完整输出:

ffmpeg version N-98716-gb40dd2f Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --enable-encoder=png --enable-decoder=png
libavutil      56. 58.100 / 56. 58.100
libavcodec     58.100.100 / 58.100.100
libavformat    58. 50.100 / 58. 50.100
libavdevice    58. 11.101 / 58. 11.101
libavfilter     7. 87.100 /  7. 87.100
libswscale      5.  8.100 /  5.  8.100
libswresample   3.  8.100 /  3.  8.100
Input #0, image2, from 'boot_anim%02d.png':
Duration: 00:00:00.44, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, rgba(pc), 184x96, 25 fps, 25 tbr, 25 tbn, 25 tbc
File 'boot_anim.raw' already exists. Overwrite? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (png (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[swscaler @ 0x556d6993d940] full chroma interpolation for destination format 'rgb565le' not yet implemented
Output #0, rawvideo, to 'boot_anim.raw':
Metadata:
encoder         : Lavf58.50.100
Stream #0:0: Video: rawvideo (RGB[16] / 0x10424752), rgb565le, 184x96, q=2-31, 282 kb/s, 1 fps, 1 tbn, 1 tbc
Metadata:
encoder         : Lavc58.100.100 rawvideo
frame=    2 fps=0.0 q=-0.0 Lsize=      69kB time=00:00:02.00 bitrate= 282.6kbits/s dup=0 drop=9 speed= 871x    
video:69kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%

感谢您的帮助!

想明白了。我只需要添加vsync 0

最新更新