如何解决将一组PNG转换为原始视频.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并手动放入vcodecs。结果相同。我是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,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
。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。