We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi I have one bug report and question.
I'm using javacv as FFmpeg wrapper. I received raw video frames and tried to flip frames when encoding, but using vflip fliter throws an exception.
java.lang.IllegalArgumentException at java.nio.Buffer.limit(Buffer.java:275) at org.bytedeco.javacv.FFmpegFrameFilter.pull(FFmpegFrameFilter.java:359)
On debugging,I identified the cause. With vflip filter, the imageStride of the frame returned by ffmpeg will be negative.
javacv/src/main/java/org/bytedeco/javacv/FFmpegFrameFilter.java
Lines 582 to 588 in 51c5714
This process doesn't seem to consider it. So I changed code to use absolute value and it works fine.
if (ptr != null && !ptr.equals(image_ptr[0])) { image_ptr[0] = ptr.capacity(frame.imageHeight * Math.abs(frame.imageStride)); image_buf[0] = ptr.asBuffer(); } frame.image = image_buf; frame.image[0].position(0).limit(frame.imageHeight * Math.abs(frame.imageStride)); frame.imageChannels = frame.imageStride / Math.abs(frame.imageWidth);
I didn't use OpenCV flip function because process of converting array to mat and converting it to FFmpeg frame looks inefficiency. Was it good choice?
Thank you.
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
Fixed with pull #977, thanks!
Which has now been integrated in version 1.4.2. Thanks again for the fix!
No branches or pull requests
Hi
I have one bug report and question.
I'm using javacv as FFmpeg wrapper.
I received raw video frames and tried to flip frames when encoding, but using vflip fliter throws an exception.
On debugging,I identified the cause.
With vflip filter, the imageStride of the frame returned by ffmpeg will be negative.
javacv/src/main/java/org/bytedeco/javacv/FFmpegFrameFilter.java
Lines 582 to 588 in 51c5714
This process doesn't seem to consider it.
So I changed code to use absolute value and it works fine.
I didn't use OpenCV flip function because process of converting array to mat and converting it to FFmpeg frame looks inefficiency.
Was it good choice?
Thank you.
The text was updated successfully, but these errors were encountered: