Re: [Libav-user] Criteria for h.264 key-frame detection

2013-10-25 Thread Paul B Mahol
On 10/20/13, Robert Krueger krue...@lesspain.de wrote: Hi, I have AVCHD files from a camera (Panasonic Lumix GH1) that demux and decode with libavformat/libavcodec detecting no other keyframe but the first (both, the first video packet and video frame are marked as keyframe), which is not

Re: [Libav-user] Criteria for h.264 key-frame detection

2013-10-25 Thread Robert Krüger
On Fri, Oct 25, 2013 at 5:59 PM, Paul B Mahol one...@gmail.com wrote: On 10/20/13, Robert Krueger krue...@lesspain.de wrote: Hi, I have AVCHD files from a camera (Panasonic Lumix GH1) that demux and decode with libavformat/libavcodec detecting no other keyframe but the first (both, the first

Re: [Libav-user] Criteria for h.264 key-frame detection

2013-10-22 Thread Robert Krüger
On Mon, Oct 21, 2013 at 8:26 PM, Carl Eugen Hoyos ceho...@ag.or.at wrote: Robert Krüger krueger@... writes: I was interested to know how you found out that ffmpeg thinks the 28th frame is a random access point I concatenated the second until the 29th frame of the input sample and tested

Re: [Libav-user] Criteria for h.264 key-frame detection

2013-10-22 Thread Robert Krüger
On Tue, Oct 22, 2013 at 1:03 PM, Carl Eugen Hoyos ceho...@ag.or.at wrote: Carl Eugen Hoyos cehoyos@... writes: Robert Krüger krueger at ... writes: I just cut away everything from the file until the start of the packet containing the 27th frame (tail -c4329532 gh1_720p.mts

Re: [Libav-user] Criteria for h.264 key-frame detection

2013-10-22 Thread Carl Eugen Hoyos
Robert Krüger krueger@... writes: Afaict, the 27th frame is not shown, ffmpeg thinks that it is no random access point. What do you mean by not shown? It is not decoded unless flags2 showall is used because FFmpeg thinks the 27th frame is not a random access point. Carl Eugen

Re: [Libav-user] Criteria for h.264 key-frame detection

2013-10-22 Thread Carl Eugen Hoyos
Robert Krüger krueger@... writes: Afaict, the 27th frame is not shown, ffmpeg thinks that it is no random access point. What do you mean by not shown? It is not decoded unless flags2 showall is used because FFmpeg thinks the 27th frame is not a random access point. You are

Re: [Libav-user] Criteria for h.264 key-frame detection

2013-10-22 Thread Robert Krüger
On Tue, Oct 22, 2013 at 3:06 PM, Carl Eugen Hoyos ceho...@ag.or.at wrote: Robert Krüger krueger@... writes: Afaict, the 27th frame is not shown, ffmpeg thinks that it is no random access point. What do you mean by not shown? It is not decoded unless flags2 showall is used because

Re: [Libav-user] Criteria for h.264 key-frame detection

2013-10-22 Thread salsaman
Carl, sorry to butt in, but you mentioned earlier: I was under the impression that lavf/lavc support recovery points very well (even in slightly broken streams), ie that you (as a user) can choose if you only want to seek to a recovery point (slower, done by ffplay) or to some frame no matter if

Re: [Libav-user] Criteria for h.264 key-frame detection

2013-10-21 Thread Carl Eugen Hoyos
Robert Krüger krueger@... writes: In case of the files I am talking about here, there are no recovery point SEIs after the first frame so libavformat/avcodec is probably doing everything correctly, too. Since I think I know that these streams in fact do have random access points, I will

Re: [Libav-user] Criteria for h.264 key-frame detection

2013-10-21 Thread Carl Eugen Hoyos
Robert Krüger krueger@... writes: If my debug output is correct, both contain no B-slices/frames (I just noticed that) but they do contain I-slices/frames. If I am not missing something, those I-Frames should be valid random access points then. Do you mean you debugged the sample (with

Re: [Libav-user] Criteria for h.264 key-frame detection

2013-10-21 Thread Robert Krüger
On Mon, Oct 21, 2013 at 4:21 PM, Carl Eugen Hoyos ceho...@ag.or.at wrote: Robert Krüger krueger@... writes: If my debug output is correct, both contain no B-slices/frames (I just noticed that) but they do contain I-slices/frames. If I am not missing something, those I-Frames should be valid

Re: [Libav-user] Criteria for h.264 key-frame detection

2013-10-21 Thread Carl Eugen Hoyos
Robert Krüger krueger@... writes: Since only P- and I-slices are parsed (I can see that in the debug output), I would indeed expect every I-frame (meaning any frame only consisting of one I-slice in the stream) to be a valid access point So you mean a P-frame after an I-frame is not

Re: [Libav-user] Criteria for h.264 key-frame detection

2013-10-21 Thread Carl Eugen Hoyos
Robert Krüger krueger@... writes: Even better. Which commit are you talking about? Iirc, fixed ticket with keyword h264. You mean 2738? I believe this is the one I meant. Carl Eugen ___ Libav-user mailing list Libav-user@ffmpeg.org

Re: [Libav-user] Criteria for h.264 key-frame detection

2013-10-21 Thread Robert Krüger
On Mon, Oct 21, 2013 at 6:38 PM, Carl Eugen Hoyos ceho...@ag.or.at wrote: Robert Krüger krueger@... writes: Btw, is it intentional that you don't answer questions I ask in my emails? Please understand that you know much more than I do about H.264 so I simply cannot answer most of your

Re: [Libav-user] Criteria for h.264 key-frame detection

2013-10-21 Thread Carl Eugen Hoyos
Robert Krüger krueger@... writes: I was interested to know how you found out that ffmpeg thinks the 28th frame is a random access point I concatenated the second until the 29th frame of the input sample and tested decoding with current FFmpeg. I also wanted to test with the reference

[Libav-user] Criteria for h.264 key-frame detection

2013-10-20 Thread Robert Krüger
Hi, I have AVCHD files from a camera (Panasonic Lumix GH1) that demux and decode with libavformat/libavcodec detecting no other keyframe but the first (both, the first video packet and video frame are marked as keyframe), which is not what I would have expected for those clips as the GOP

Re: [Libav-user] Criteria for h.264 key-frame detection

2013-10-20 Thread Carl Eugen Hoyos
Robert Krüger krueger@... writes: I have AVCHD files from a camera (Panasonic Lumix GH1) that demux and decode with libavformat/libavcodec detecting no other keyframe but the first (both, the first video packet and video frame are marked as keyframe), which is not what I would have expected

Re: [Libav-user] Criteria for h.264 key-frame detection

2013-10-20 Thread Carl Eugen Hoyos
Robert Krüger krueger@... writes: So are you saying that AVPacket.key_frame should be set to 1 for recovery points in H.264? No, on the contrary, I don't think this would work (depending on the definition of work) in the sense that the frame marked as key_frame cannot be independently