Git Product home page Git Product logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
Fix included in JavaCV 0.6!

Original comment by [email protected] on 16 Sep 2013 at 4:08

  • Changed state: Fixed

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 3, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.