-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if FFmpegFrameGrabberSimple(inputStream) not use grabber.setFrameNumber(num) #1234
Comments
setFrameNumber() won't work well for streams with variable frame rates. Try
to use setTimestamp() instead.
|
|
Well, you'll need to give me something to reproduce this issue if you expect some help. |
this simple demo can reproduce the problem! you can try it ! thanks |
Ah, that's the problem. |
good! thanks |
public static void main(String[] args) throws FileNotFoundException, FrameGrabber.Exception { .ts files don't have an index,why InputStream Instead of File is normal ? |
Either work the same for me. I'll need something to reproduce that if it doesn't work for you for some reason. |
.ts file doesn't work,but .mp4 file is normal ! I found that avformat_find_stream_info() doesn't work by .ts file! Either work the same for me!but it work no same! It's confusing to me |
You're right, it isn't working the same for MPEG-TS. It feels like there is a bug in FFmpeg somewhere there, and should probably be reported upstream... |
Well,thanks |
Actually, after implementing |
Awesome !it appears to work fine! that is cool !Thank you |
Fix now included in JavaCV 1.5.1. Thanks for reporting! |
Caused by: org.bytedeco.javacv.FrameGrabber$Exception: avformat_seek_file() error -1: Could not seek file to timestamp 2920000.
https://github.com/bytedeco/javacv/blob/master/src/main/java/org/bytedeco/javacv/FFmpegFrameGrabber.java#L619
https://github.com/bytedeco/javacv/blob/master/src/main/java/org/bytedeco/javacv/FFmpegFrameGrabber.java#L812-L814
if use avformat_alloc_context AND avio_alloc_context to Allocating memory will not seek frames
thanks
The text was updated successfully, but these errors were encountered: