Hello
I have confused one thing for Video Frame extraction.
I have sample.mp4 video , 15FPS
https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mp4-file.mp4
I tried extracting Keyframe with FFMPEG.
ffmpeg -skip_frame nokey -i sample.mp4 -vsync 0 -frame_pts true out%d.png
I get 29 Pictures and I believe I have got 29 I frames. (If I have wrong, Please correct me)
[Attachment 58370 - Click to enlarge]
Then I tried extracting specific timeline(10 sec) frame with picture
ffmpeg -i sample.mp4 -ss 00:00:10 -frames:v 1 test1.png
This output picture, I can not find same one among my Keyframes I get.
[Attachment 58371 - Click to enlarge]
Question: test1.png, What is frame type? Does it one of P or B frame not I ?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 6 of 6
Thread
-
-
VirtualDub shows the frame at 10.00 seconds a P frame (and it matches the test1.png image, and your I frame images all match what VirtualDub shows as I frames). ffpropbe shows the same:
Code:{ "media_type": "video", "stream_index": 0, "key_frame": 0, "pkt_pts": 153600, "pkt_pts_time": "10.000000", "pkt_dts": 153600, "pkt_dts_time": "10.000000", "best_effort_timestamp": 153600, "best_effort_timestamp_time": "10.000000", "pkt_duration": 1024, "pkt_duration_time": "0.066667", "pkt_pos": "813473", "pkt_size": "736", "width": 320, "height": 240, "pix_fmt": "yuv420p", "sample_aspect_ratio": "1:1", "pict_type": "P", "coded_picture_number": 150, "display_picture_number": 0, "interlaced_frame": 0, "top_field_first": 0, "repeat_pict": 0, "chroma_location": "left" },
Last edited by jagabo; 12th Apr 2021 at 08:33.
-
Thank you.
How to get such information on virtualdub? I am not familiar with virtualdub yet. Please let me know.
{
...
"pict_type": "P"
}
Actually, the video player I am using(Chrome Web Player), it shows "thumbnail preview" when it has moved mouse point on progress bar. It looks extract thumbnail image every 10 sec from the video source. So, I expect it will be "I" frame.But when I extract "I" frame thru ffmpeg, there is not matched (I frame picture vs thumbnail preview) at all.
I think the web video player will display thumbnail with P frame. (Please correct me if I have worng)
Thank youLast edited by symoon2021; 12th Apr 2021 at 09:15.
-
VirtualDub can show you the frame type below the timeline slider. I don't remember if it defaults to show it. You may have to go into the preferences and enable it. It shows K for I frames, P for P frames, and B for B frames.
[Attachment 58377 - Click to enlarge]
If your player is showing thumbnails at 10 second intervals it is not restricted to I frames. The video doesn't have keyframes at 10 second intervals. -
By the way, you can navigate directly to keyframes in VirtualDub using Shift+RightArrow (next keyframe), or Shift+LeftArrow (previous keyframe).
Similar Threads
-
Workable Key frame cutting/copying test
By Budman1 in forum Video ConversionReplies: 3Last Post: 2nd Jun 2018, 15:52 -
Frame Rate, Bitrates ans Frame by frame comparison
By novreis in forum Newbie / General discussionsReplies: 1Last Post: 5th Feb 2018, 18:40 -
iffmpeg all key frame option
By bohitomi in forum MacReplies: 2Last Post: 15th Jul 2017, 12:44 -
Just an idea: ffmpeg based key frame accurate cutting,...
By Selur in forum Newbie / General discussionsReplies: 30Last Post: 21st Mar 2017, 04:56 -
Encoding just the cut portion up to the key frame during editing.
By Budman1 in forum EditingReplies: 22Last Post: 20th Jun 2016, 11:33