danbider / lightning-pose

Accelerated pose estimation and tracking using semi-supervised convolutional networks.
MIT License
223 stars 32 forks source link

support for avi formats #150

Closed Wei21st closed 2 months ago

Wei21st commented 2 months ago

Hi lightning-pose team.

Our lab collects video using avi formats and it seems the lightning-pose only support the mp4 format (correct me if i am wrong!). Could you add features to support avi formats as Deeplabcut did? It seems the online video format convert tools are not free. This will make our work much easier.

Thank you so much!

Best, Nora

themattinthehatt commented 2 months ago

Hi Nora, thanks for your question.

In short, you can easily convert your videos to a format that lightning pose will accept using ffmpeg; you can find an example function here.

A longer answer to your question: .avi is a container format that supports multiple types of data - video and audio streams, metadata, subtitles, etc. The video stream codec (encoder/decoder program) is the thing that matters, in our case for the DALI pipeline. The video codec needs to be h.264, and the function that I linked above will convert the video stream in your .avi file to this codec for you (and then save the result in a .mp4 container).

Wei21st commented 2 months ago

Thanks Matt. I've solve the problem using the code you provided.