Comments (6)
Seems to be related to the way the PTS is calculated:
http://thompsonng.blogspot.jp/2011/09/ffmpeg-avinterleavedwriteframe-return.html
I think I remember this error could happen if we try to write two frames with
the same timestamp. Can you check and see if all the calls to
recorder.setTimestamp() end up with unique monotonically increasing values?
Original comment by [email protected]
on 2 May 2013 at 2:36
from javacv.
Thanks for the response Samuel. Yea, it is definitely related with PTS
calculation. I saw that post and try to "retry" it to use it as a "later" frame
but then it may cause the frame to be "overlapped" by the frame that happens
after. I tried to look at multiple frames at a time and use a heuristic
function to queue up the recording (audio have to be recorded in real time in a
separate recorder and use ffmpeg to combine them together later)...anyways,
long story short. Using the retry method reduce the error rate from about 15%
to about 1% but frames may still be overlapped and lost.
Also tried to use setFrame, but the way PTS gets calculated is weird and does
not produce the same results as expected as setTimestamp()
Anyone have better suggestions? :)
Original comment by wzsddtc
on 2 May 2013 at 2:56
from javacv.
FFmpegFrameRecorder automatically bumps up the timestamp according to the frame
rate, so maybe you could to not call setTimestamp() at all if you are about to
call it with a value <= getTimestamp() ?
Original comment by [email protected]
on 2 May 2013 at 3:00
from javacv.
I created a patch for the sample file here:
http://code.google.com/p/javacv/source/detail?r=c514ee108a3e158e0fbf920f939403e9
28f7119d
Please let me know that it does the trick, thanks!
Original comment by [email protected]
on 11 May 2013 at 5:41
- Changed title: [Android + FFMpeg] Encoding error while using FFMpegRecorder in RecordActivity.java
- Changed state: Started
from javacv.
Fix included in JavaCV 0.6!
Original comment by [email protected]
on 16 Sep 2013 at 4:08
- Changed state: Fixed
from javacv.
I created an app which converts images to video using ffmpeg recorder but I am
facing distortion issue . As I have number of images and each image has
different sizes so when I produce video from those images, video get distorted .
Please help me.
Original comment by [email protected]
on 21 May 2015 at 3:57
from javacv.
Related Issues (20)
- JavaCv on android doesen't work HOT 5
- Access violation and like that HOT 2
- Face Recognition using Eigen and Fisher Face. HOT 8
- problems to acces data from all the detected patterns with singleTracker HOT 4
- Encoded H264 video using FFmpegFrameRecorder missing last few frames HOT 8
- sample RecordActivity broken version 0.5 HOT 3
- Dependent Libraries opencv_legacy HOT 18
- Can't compile JavaCV from source code HOT 2
- cvCalcOpticalFlowPyrLK method will cause fatal error HOT 2
- no jnivideoInputLib in java.library.path HOT 1
- Javacv 0.5 linux-x64 requires new glibc HOT 5
- Using Javacv And Opencv in same project HOT 1
- Null pointer error(native method ) HOT 2
- JavaFX Media Player can not play output video created by Javacv 0.5 HOT 1
- How to grab keyframe from a video with javacv? HOT 23
- canvas.showimage opens empty window on Mac OS Lion HOT 9
- FFmpegFrameGrabber won't grab till the end of video. HOT 12
- Conversion of audio in FFMpegFrameGrabber HOT 6
- Cached value of CvMat.fullSize and *Buffer fields might get incorrect HOT 34
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javacv.