Giter Site home page Giter Site logo

seek_to_frame with GOP files about pyffmpeg HOT 3 OPEN

ssurui avatar ssurui commented on July 28, 2024
seek_to_frame with GOP files

from pyffmpeg.

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 28, 2024
Hi martin, 

Sorry for very late reply. I was very busy at the moment you wrote, and I 
forgot to answer later. 


* It is true, that even with all option enabled sometime FFMPEG is not able to 
seek 
to the exact frame you were querying.

However, the wrapper code normally contains some code that does the following :
* check the start time of the sequence (to avoid some offset),
* seek a little bit before the programmed sequence and then use step(), as long 
we don't reach the expected time code... 

* These option may be enabled or disabled using some options in the constructor 
and/or the track selector... (Unfortunately the behavior of FFMPEG in seeking 
sometime depends of the version of FFMPEG, and on the version, so to write a 
good player is not all the time as straightforward as it ought to be)


So, what seems possible, that if you have a long-gop you need to seek earlier 
than 
usual and then to find out the good frame... In order to do that try to increase
the value of seek_before in the constructor... It is possible that a quite 
large value is necessary... Because, for most video format it is becoming more 
and more un-necessary, I somehow kept these value to a minimum in order not to 
slow-down the 
reading process for others.

Let me know if it helps, sorry for that very late answer.

Original comment by [email protected] on 4 Jan 2011 at 3:48

from pyffmpeg.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 28, 2024
[deleted comment]

from pyffmpeg.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 28, 2024
Hello,

I have a problem slightly similar to this. I've noticed that when I use 
seek_to_frame(N) to seek to frame N and then do get_next_frame() to read the 
frame, I get frame N+1. Obviously, I can work around this by doing 
seek_to_frame(N-1) and then get_next_frame() in order to get frame N. However, 
this prevents me from ever reading the first frame of a video file (frame 0). 
Even if I just open the video and then call get_next_frame() right away, I 
still get the second frame of the video (frame 1). Am I missing something here?

I should mention that, apart from the small problem above, Pyffmpeg has been 
working great for me. It allows me to seek to specific frames in many different 
file formats, including ones where ffmpeg and OpenCV fail miserably. Thank you 
so much for your work on this.

Original comment by [email protected] on 2 Mar 2012 at 12:53

from pyffmpeg.

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.