View Full Version : Find IDR frames in HVEC?
Travillion
3rd December 2021, 21:59
How can I get a list of IDR frames from an HVEC stream? With h264 streams I would convert to raw h264 and then use framecounter to produce a text file of each frame and it's type. I tried that with an HVEC stream (converted to raw h265 with ffmpeg) but framecounter wouldn't accept the 265 file as input.
Thanks in advance.
kolak
3rd December 2021, 22:04
ffprobe -v error -skip_frame nokey -show_entries frame=pkt_pts_time -select_streams v -of csv=p=0 input
0.000000
2.502000
3.795000
6.131000
10.344000
I assume frame=pkt_pts_time could be change to give you eg. frame number instead of time.
other ways are there as well using ffmpeg itself:
https://superuser.com/questions/1345616/get-the-list-of-i-frames-in-a-video-in-ffmpeg-python
microchip8
3rd December 2021, 22:24
it's called HEVC, not HVEC, by the way
Selur
4th December 2021, 09:08
As a side note: Code patches for FrameCounter (https://github.com/Selur/FrameCounter) to not only count hevc frame but also output their frame type are welcome. ;)
Travillion
4th December 2021, 18:42
ffprobe -v error -skip_frame nokey -show_entries frame=pkt_pts_time -select_streams v -of csv=p=0 input
0.000000
2.502000
3.795000
6.131000
10.344000
I assume frame=pkt_pts_time could be change to give you eg. frame number instead of time.
other ways are there as well using ffmpeg itself:
https://superuser.com/questions/1345616/get-the-list-of-i-frames-in-a-video-in-ffmpeg-python
Thank you!
Travillion
4th December 2021, 18:43
it's called HEVC, not HVEC, by the way
Doh! I knew that.... High Video Efficiency Coding just doesn't have the same ring to it.
Travillion
4th December 2021, 18:44
As a side note: Code patches for FrameCounter (https://github.com/Selur/FrameCounter) to not only count hevc frame but also output their frame type are welcome. ;)
Believe me if I knew coding I would help! I've used and loved your framecounter for a few years now.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.