Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2014-10-31 Thread Ankush
I know its long time since this case was posted but i am facing the same problem now. So did you find any possible solution for it as it could be helpful? ___ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-08-05 Thread Don Moir
- Original Message - From: Roger Pack rogerdpa...@gmail.com To: This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter. libav-user@ffmpeg.org Sent: Thursday, August 02, 2012 2:48 PM Subject: Re: [Libav-user] Why does av_seek_frame() not seek

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-08-05 Thread Michael Bradshaw
On Sun, Aug 5, 2012 at 5:51 AM, Don Moir donm...@comcast.net wrote: I see this has been reported as ticket #1575 but why this is reported as an enhancement and not a bug, god only knows. This should not be a documentation issue and in my way of thinking, its a bug. We don't need gray areas

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-08-05 Thread Don Moir
- Original Message - From: Michael Bradshaw mbrads...@sorensonmedia.com To: This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter. libav-user@ffmpeg.org Sent: Sunday, August 05, 2012 11:09 AM Subject: Re: [Libav-user] Why does av_seek_frame() not seek

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-08-02 Thread Roger Pack
Could you provide a sample that does not seek to a keyframe with ffmpeg -ss x -i input out.png (I tested this yesterday on random mpeg2video samples and afaict, it did work.) With me, I get this: with this file: http://rogerdpack.t28.net/incoming/sintel.mpg $ ffmpeg -i sintel.mpg -vcodec

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-08-02 Thread Roger Pack
$ ffmpeg -i sintel.mpg -vcodec copy -acodec copy -ss 90.0 starting_at_90.mpg then try and use it again: $ ffmpeg -i starting_at_90.mpg -vframes 1 -f image2 -an snap.jpg I get this warning message: [mpeg2video @ 01f09860] warning: first frame is no keyframe Anybody know if this is

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-08-02 Thread Michael Bradshaw
On Thu, Aug 2, 2012 at 12:10 PM, Roger Pack rogerdpa...@gmail.com wrote: Could you provide a sample that does not seek to a keyframe with ffmpeg -ss x -i input out.png (I tested this yesterday on random mpeg2video samples and afaict, it did work.) With me, I get this: with this file:

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-08-02 Thread Roger Pack
I believe that does no seeking there. Putting -ss after the input will cause ffmpeg to demux up to the requested timestamp, so it's not quite related to seeking (putting -ss before the input will seek the input file). Since -a/vcoded copy avoids re-encoding, it just copies the packets

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-07-23 Thread Michael Bradshaw
On Thu, Jul 19, 2012 at 2:01 PM, Michael Bradshaw mbrads...@sorensonmedia.com wrote: [...] I guess we should define what would be considered erroneous seeking to make sure I'm on the same page as everyone, as it's possible I'm not. Would these be considered problematic: 1) Seek is performed,

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-07-23 Thread Carl Eugen Hoyos
Michael Bradshaw mbradshaw@... writes: Anyone have any answers on these two things? If the answer to the above would be yes can anyone else verify that ffmpeg -dump -loglevel debug -ss 38 -i 704x480-m2v-ac3.mpg -vframes 1 out.jpg does not seek to a keyframe? As said, afaict it does seek to a

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-07-23 Thread Michael Bradshaw
On Mon, Jul 23, 2012 at 11:12 AM, Carl Eugen Hoyos ceho...@ag.or.at wrote: Michael Bradshaw mbradshaw@... writes: Anyone have any answers on these two things? If the answer to the above would be yes can anyone else verify that ffmpeg -dump -loglevel debug -ss 38 -i 704x480-m2v-ac3.mpg

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-07-23 Thread Hendrik Leppkes
On Mon, Jul 23, 2012 at 7:12 PM, Carl Eugen Hoyos ceho...@ag.or.at wrote: Michael Bradshaw mbradshaw@... writes: Anyone have any answers on these two things? If the answer to the above would be yes can anyone else verify that ffmpeg -dump -loglevel debug -ss 38 -i 704x480-m2v-ac3.mpg

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-07-23 Thread Carl Eugen Hoyos
Hendrik Leppkes h.leppkes@... writes: Anyone have any answers on these two things? If the answer to the above would be yes can anyone else verify that ffmpeg -dump -loglevel debug -ss 38 -i 704x480-m2v-ac3.mpg -vframes 1 out.jpg does not seek to a keyframe? As said, afaict it does seek

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-07-23 Thread Michael Bradshaw
On Mon, Jul 23, 2012 at 12:50 PM, Carl Eugen Hoyos ceho...@ag.or.at wrote: [...] You are probably right, I assumed that from a users' perspective, the only relevant question is if above command line returns a gray frame or the next keyframe. Ah, I see. I think that's where the confusion is

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-07-23 Thread Don Moir
- Original Message - From: Michael Bradshaw mbrads...@sorensonmedia.com To: This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter. libav-user@ffmpeg.org Sent: Monday, July 23, 2012 3:10 PM Subject: Re: [Libav-user] Why does av_seek_frame() not seek

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-07-20 Thread Don Moir
Afair, Reimar believes the seek function should not try hard to find a keyframe because seeking faster is more important. This most important thing is consistency. In my case (and anyone really), that means when I do a seek, the first returned packet should be a key frame packet and the time

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-07-19 Thread Carl Eugen Hoyos
Hendrik Leppkes h.leppkes@... writes: On Thu, Jul 19, 2012 at 8:18 AM, Carl Eugen Hoyos wrote: Michael Bradshaw mbradshaw at ... writes: But when I seek, the first packet returned out of the demuxer is not a keyframe packet, and I have to read several (~45ish) packets until I encounter a

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-07-19 Thread Hendrik Leppkes
On Thu, Jul 19, 2012 at 8:31 AM, Carl Eugen Hoyos ceho...@ag.or.at wrote: Isn't this necessary for some codecs / at least for H264? Wouldn't the API do exactly the same? Sure, if you end up seeking to a non-keyframe, it should not decode garbage frames. The point here is that we would want

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-07-19 Thread Hendrik Leppkes
On Thu, Jul 19, 2012 at 9:25 AM, Carl Eugen Hoyos ceho...@ag.or.at wrote: So if the file is ~2GB and (as a user) I seek approximately to the middle of the video and decide to seek back then, the video should be decoded from the beginning to find the keyframe before the position I want to seek

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-07-19 Thread John Stebbins
On 07/19/2012 09:25 AM, Carl Eugen Hoyos wrote: Hendrik Leppkes h.leppkes@... writes: On Thu, Jul 19, 2012 at 8:31 AM, Carl Eugen Hoyos wrote: Isn't this necessary for some codecs / at least for H264? Wouldn't the API do exactly the same? Sure, if you end up seeking to a non-keyframe, it

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-07-19 Thread Michael Bradshaw
On Thu, Jul 19, 2012 at 12:18 AM, Carl Eugen Hoyos ceho...@ag.or.at wrote: Michael Bradshaw mbradshaw@... writes: But when I seek, the first packet returned out of the demuxer is not a keyframe packet, and I have to read several (~45ish) packets until I encounter a keyframe. Could you

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-07-19 Thread Carl Eugen Hoyos
Michael Bradshaw mbradshaw@... writes: But when I seek, the first packet returned out of the demuxer is not a keyframe packet, and I have to read several (~45ish) packets until I encounter a keyframe. Could you provide a sample that does not seek to a keyframe with ffmpeg -ss x -i

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-07-19 Thread Don Moir
- Original Message - From: Michael Bradshaw mbrads...@sorensonmedia.com To: This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter. libav-user@ffmpeg.org Sent: Thursday, July 19, 2012 1:13 PM Subject: Re: [Libav-user] Why does av_seek_frame() not seek

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-07-19 Thread Michael Bradshaw
On Thu, Jul 19, 2012 at 12:42 PM, Carl Eugen Hoyos ceho...@ag.or.at wrote: [...] Afair, Reimar believes the seek function should not try hard to find a keyframe because seeking faster is more important. I think the current functionality is OK, provided it's documented well. Though to be honest

Re: [Libav-user] Why does av_seek_frame() not seek to a keyframe?

2012-07-19 Thread Michael Bradshaw
On Thu, Jul 19, 2012 at 1:54 PM, Hendrik Leppkes h.lepp...@gmail.com wrote: [...] If you want to do accurate seeks with only avformat, you have to add a lot of boilerplate on top of it right now - or if you want to do accurate seeks even with ffmpeg. Sure, if you tell it to seek, it'll output