You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be helpful to have frame-based seeking in the LAV demuxer. I need it specifically for MP4.
I saw #338 and wondered, if it would be possible to use FFMPEG to seek to the right frame, maybe by using libavformat av_index_search_timestamp.
Fully supporting frames in SetTimeFormat could be a bit much to ask. But maybe adding support for ConvertTimeFormat would be less work. IMHO it would just be a call to FFMPEG and if in luck, a result is returned, if not, an error is returned. That could make frame-based seeking doable for some applications.
I hope I understand DirectShow correct there, but it seems IsFormatSupported would then still label frames as unsupported format. It would just happen to work in ConvertTimeFormat, if conditions are right.
Do you think that approach makes sense? If you think that is acceptable, I could try to make a PR.
Thanks in advance for considering!
The text was updated successfully, but these errors were encountered:
Converting from timestamp to frame number or vice-versa will never be very accurate due to rounding errors, gaps, or even variable frame rate. But I guess you could do something like this: seek_time = start_time + (frame_number + 0.5) * frame_rate
(the +0.5 is to calculate the time in middle of start and end of frame, so least chance of getting wrong one)
It would be helpful to have frame-based seeking in the LAV demuxer. I need it specifically for MP4.
I saw #338 and wondered, if it would be possible to use FFMPEG to seek to the right frame, maybe by using libavformat
av_index_search_timestamp
.Fully supporting frames in SetTimeFormat could be a bit much to ask. But maybe adding support for ConvertTimeFormat would be less work. IMHO it would just be a call to FFMPEG and if in luck, a result is returned, if not, an error is returned. That could make frame-based seeking doable for some applications.
I hope I understand DirectShow correct there, but it seems IsFormatSupported would then still label frames as unsupported format. It would just happen to work in
ConvertTimeFormat
, if conditions are right.Do you think that approach makes sense? If you think that is acceptable, I could try to make a PR.
Thanks in advance for considering!
The text was updated successfully, but these errors were encountered: