bytedeco/javacv

FFMpeg How to seek large file (HTTP source)?

Open

#1,803 opened on Apr 16, 2022

View on GitHub
 (3 comments) (0 reactions) (1 assignee)Java (1,583 forks)batch import
help wantedquestion

Repository metrics

Stars
 (6,985 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

I have a large file published by lighttd server and custom inputstream for buffer it and use it. Then i call the setTimestamp(ts) i got a downloading file until necessery ts position. Its a very long time. For fix it i tried call avformat_seek_file(oc, -1, offset, offset, offset, AVSEEK_FLAG_BYTE) and have partial success. but timestamp reseted and begin from zero. Also i look messages in std output

[mp3float @ 0x7f75041dc6c0] Could not update timestamps for skipped samples.
[mp3float @ 0x7f75041dc6c0] Header missing
[mp3float @ 0x7f75041dc6c0] Could not update timestamps for skipped samples.

How to seek in large files with saving ts? May i have a seek by bytes have fix missing headers?

Contributor guide