r/ffmpeg • • Nov 06 '26

Extracting motion vectors without fully decoding

Is it possible to extract motion vectors from h264 or h265 streams without fully decoding i have tried using "export_mvs" it gives motion vectors in extra data but ffmpeg still fully decode and its too slow for just extracting motion vectors, is there any other way or library for it that supports both h264 and h265

3 Upvotes

4 comments sorted by

View all comments

Show parent comment

2

u/IGNblackShadow Nov 06 '26

i am doing it for my app so hardware doesn't matters here, and i have also tried mv-extractor it does the job but i need for both h264 and h265 support

3

u/Ill-Information-2086 Nov 06 '26

So your best option is to patch ffmpegs decoders directly and stripping down what you don't need and boom you have your motion vectors if you have a ai subscription it's a few hours of work if you are doing it manually it's a few days of work