FFmpeg
Sample
## Convert mp4 to webm ffmpeg -i input.mp4 output.webm ## Convert gif to mp4 ffmpeg -i input.gif -movflags faststart -pix_fmt yuv420p output.mp4 ## 指定時間でカット ffmpeg -i input.mp4 -t 10.0 -c copy output.mp4 ffmpeg -i input.mp4 -ss 00:01:00 -to 00:02:00 -c copy output.mp4 ## 入力FPSを変更 = 再生時間が変わる ffmpeg -r 30 -i input.gif -movflags faststart -pix_fmt yuv420p output.mp4 ## 出力FPSを変更 = 再生時間は変わらない ffmpeg -i input.gif -movflags faststart -pix_fmt yuv420p -r 30 output.mp4
Troubleshooting - Blown-Out with Converting iPhone MOV to MP4/Webm
https://trac.ffmpeg.org/wiki/colorspace
https://www.reddit.com/r/ffmpeg/comments/o00ymo/help_iphone_hevc_file_converted_to_h264_has_color/
https://zenn.dev/razokulover/scraps/4282a6911e4ca7
https://apple-log.work/2021/12/24/
特に何も指定せずMOVを変換すると白飛びしてしまう
ffmpeg -i input.mov output.webm
以下の様にColorspaceの調整などで対応は可能だが、特にこだわりがなければVLCの変換機能などを利用した方が簡単
ffmpeg -i input.mov output.webm -pix_fmt yuv420p -vf "eq=brightness=0.0:saturation=1.0:contrast=1.0:gamma=1.0"
References
Acknowledgments
Daiphys is a professional-service company for research and development of leading-edge technologies in science and engineering.
Get started accelerating your business through our deep expertise in R&D with AI, quantum computing, and space development; please get in touch with Daiphys today!
Daiphys Technologies LLC - https://www.daiphys.com/