kkroening / ffmpeg-python

Python bindings for FFmpeg - with complex filtering support
Apache License 2.0
10.06k stars 892 forks source link

convert one-channel images (depth images) into video? #421

Open jiequanz opened 4 years ago

jiequanz commented 4 years ago

Can we convert depth frames into video? I am using this for color images:

process = (
    ffmpeg
    .input('pipe:', framerate=15, format='rawvideo', pix_fmt='bgr24', s='640x480')
    .output('videos/movie264.mp4', pix_fmt='nv21', **config)
    .overwrite_output()
    .run_async(pipe_stdin=True)
)

How should we set format and pix_fmt? The depth image only has one channel.

mike-twa commented 4 years ago

I've used a pix_fmt of gray16be which is a 16-bit mono image