facebook / idb

idb is a flexible command line interface for automating iOS simulators and devices
https://fbidb.io
MIT License
4.51k stars 432 forks source link

How to dynamically scale the H264 encoded stream #823

Open sbfkcel opened 1 year ago

sbfkcel commented 1 year ago

I recorded the H264 video stream of the iPhone, and the width and height of the video are different when rotating vertically and horizontally.

After conversion through ffmpeg -f h264 -i pipe:0 -vf scale=-1:ih*0.5 -vcodec libopenh264 -tune zerolatency -b 900k -framerate 30, it becomes the initial uniform width and height in any direction.