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] c++ API h264 encoded video does not play on all platforms

2012-07-19 Thread Drabner
I found (and posted) the solution to this: http://stackoverflow.com/questions/11537830/ffmpeg-api-h264-encoded-video-does-not-play-on-all-platforms/11558127#11558127 -- View this message in context:

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

[Libav-user] How do I specify a bitstream filter using the ffmpeg API

2012-07-19 Thread declan harrison
Hi Guys I have a problem creating MPEG2-TS files when using the ffmpeg API. I get the following error thrown by ffmpeg H.264 bitstream malformed, no startcode found, use the h264_mp4toannexb bitstream filter (-bsf h264_mp4toannexb). On the CLI interface I can easily specify the bitstream filter

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 to

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