<br><br><div class="gmail_quote">On Thu, Apr 5, 2012 at 6:42 AM, padam <span dir="ltr"><<a href="mailto:skaromana@wp.pl">skaromana@wp.pl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi, this is my first post. I have to say, that my english isn't well, so you<br>
have to forgive me.<br>
<br>
So, i am writing a little application in C using Gstreamer, but i don't know<br>
how to get information about actual frame. I should be able to check that,<br>
when i'm watching movie or listening mp3, or other formats. Another problem<br>
is that i would like to get to concrete frame. For example i paused a movie,<br>
i check that i'm in 200 frame (it don't have to be keyframe) and i want to<br>
tell app that i want to get to 198 frame.<br></blockquote><div><br>GStreamer (generally) deals with everything in terms of nanoseconds. So in theory, all you need is the video's framerate, and then you can create a seek event corresponding to an exact frame, or you can figure out what frame corresponds to a buffer's timestamp.<br>
<br>In practice, how well this works depends on properties of the container format, and the overall correctness of all the GStreamer plugins involved. In my quest for frame accuracy, I've only extensively tested MOV (H.264 video) files from Canon DSLR cameras... but luckily enough, GStreamer deliverers flawless frame-accuracy with this files (well, after I fixed a goof or two in my math).<br>
<br>Note the conversion from nanoseconds to frame is a bit trickier as you'll have to correctly round a floating point value to the nearest integer. You can see how I did both directions in Python here:<br><br><a href="http://bazaar.launchpad.net/~novacut/novacut/trunk/view/head:/novacut-thumbnailer#L64">http://bazaar.launchpad.net/~novacut/novacut/trunk/view/head:/novacut-thumbnailer#L64</a><br>
<br>Anyway, I'm totally obsessed with frame-accuracy, so never hesitate to pester me with questions... and I'd love to hear what kind of results you get with the types of video you're working with. I haven't yet done serious tests for the audio equivalent, sample accurate seeking, so I have no idea how well things work there.<br>
</div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I don't know what to do. i thinking about it over few days, and i can't come<br>
up with any idea.<br>
Please for help.<br>
<br>
--<br>
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/number-of-actual-frame-tp4534716p4534716.html" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/number-of-actual-frame-tp4534716p4534716.html</a><br>
Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div><br>