How do I extract I frames & DC coefficients from an MPEG-4 video?
Asked
Active
Viewed 606 times
2 Answers
2
If you want just the I frames the use ffmpeg to extract them. You can use the -vf select="eq(pict_type\,PICT_TYPE_I)" option to get only the I pictures out. To get the dc coeffs you will have to modify the decoder source code to get it out. I don't think you will directly find a tool to give it to you.

av501
- 6,645
- 2
- 23
- 34
-
thanks for this, could you plz write the complete command to get an I frame from (test.mp4) because iam trying but it not work ? – Saddam Aug 26 '12 at 19:24
-
i have the following command but still error ffmpeg -i test1.mp4 -vsync 0 -vf select="eq(pict_type\, PICT_TYPE_I)" I-Frm-%03d.jpeg – Saddam Aug 26 '12 at 19:52
-
Try only I instead of PICT_TYPE_I – av501 Aug 26 '12 at 19:53
-
This worked for me: Gave me a I pictures only formed video: ffmpeg -i a.mp4 -vsync 0 -vf select="eq(pict_type\,I)" -an -vcodec mpeg4 out.mp4. You can do the same and get jpegs if you want. – av501 Aug 26 '12 at 19:55
-
"ffmpeg -i test1.mp4 -vsync 0 -vf select="eq(pict_type\,I)" -an -f image2 thumbnails-%02d.jpeg " this command works ,NOW i will search how to get DC coefficients , wish me luck & thanks – Saddam Aug 26 '12 at 20:44
1
By using this command I'm able to extract the I-frames
ffmpeg -i input.flv -vf "select='eq(pict_type,PICT_TYPE_I)'" -vsync vfr thumb%04d.png

GShaik
- 197
- 1
- 17