i need codes that can read a video stream and extract frames out of the stream, I,P,B frames , and i want it under windows,
please any body can help me
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 30 of 45
Thread
-
-
don't post the same thing multiple times.
--
"a lot of people are better dead" - prisoner KSC2-303 -
sorry but that sort of thing you need to hire a programmer for.
only i frames are complete. p, b and others are just the changes from the referenced frame. the first byte of the frame ends in a code signifying what type it is.--
"a lot of people are better dead" - prisoner KSC2-303 -
-
look i want to extract the I,P and B frames from the video(bit form) and i want to know how to discreminate between them , is there any bits or flags that i can use to discriminate the different types, i found a line code in ffmpeg that extract the I frames but as images(.jpg).
i want to use this information that are in the application layer to discriminate between frames while applying discarding policied in the device that works in the network layer. i know it is not feasable but i have to find a way to discriminate betwwen the video frame in the network layer. i need a code or something that finds the frame types and how can we modify the codecs to add flags to recognise the frames???????????? please help me -
You can also look at framecounter by selur (see post #3). I don't know if sources are available , you can PM him
http://forum.doom9.org/showthread.php?t=163553 -
thank u very much, but look i am beginner in video encoding, i want an ffmpeg line that could give me the types beside extracting them, i will then use these info as an input to my project using Matlab, i dont know if Matlab can support ffmpeg line codes, but i will try to find that.
i downloaded FFdshow and i get two video encoder configuration and i saw the OSD that u mentioned, then how can apply this program on some video file? -
-
my project is about proposing a new discarding policy when the buffer in the access point or the router overflow taking into consideration the video frame types, so
1- i want to extract them first from the video and i want these frames(images) to be as an input to the matlab.(help me in this, i found a line code that extract I frames only, i want them all, with 30fps)
2- as images if i use matlab to convert these images to numbers or matrices or something(i dont know what but i suppose matlab can read images), is there any numbers or flags that discriminate the diff types.
sorry if i have problems in telling u what i want -
VirtualDub and VirtualDub Mod can save the frames as BMP, JPG, PNG, or TGA images. They can also show the frame type on the status line (at the bottom of the window). You'll have to keep track of the frame types manually though. You could use VirtualDub(mod) to save the image sequence then use ffdshow to save a list of frame types.
Do you realize you can't skip a P frame unless you skip all the way to the next I frame? And within the MPG file the frames will not be in display order.Last edited by jagabo; 15th Jan 2012 at 09:28.
-
please any expert can answer me, i want commands so i will be able to include them to mattlab, not a full code or program like Member VirtualDub
-
is there any way that the output images in the folder will have I,P images, i dont need just information, i need the diff types as images
-
i saw the link, but i did not find what i want, how to get the diff frames and discriminate them when they r images?
-
You can't.
Once they've been decoded, and encoded to images - they are no longer I, B, P . They are no longer video, and probably not in the same colorspace either (Y'CbCr vs. RGB). I, B, P refers to the frametype while it's still in video format, under a certain compression scheme . Even if you take the output directly from the decoder (uncompressed YCbCr) , then I, B, P no longer applies
Take the list generated by selur's utility , or ffdshow osd to determine frametypes of what the original video was. -
i dont know how to use ffshow, can u help me. these frame types are input to my project , i need to extract the video types? i dont know what to do, this is a big problem
-
In ffdshow you need to enable the OSD (On Screen Display) filter:
Start -> All Programs -> ffdshow -> Video Decoder Configuration
In the left pane select and enable the OSD filter. In the right pane enable Frame Type. If you want a text file with a list of frame types enable the Save To option and specify where you want the file.
While you're in this dialog I recommend you make sure ffdshow puts an icon in the System Tray when it's in use. In the left hand pane click on Tray, Dialog and Paths. In the right hand pane, in the Tray Icons section, make sure that Modern or Classic is selected. After doing this you will know when ffdshow is in use because an ffdshow icon will appear in the System Tray.
Now you need to make sure your video player will use ffdshow as the MPEG 2 (or whatever codec you are working with) decoder. At the top of the left hand pane select Codecs. Make sure MPEG2 is enabled (set to libavcodec).
After doing all that open your MPG file in a media player. Make sure that media player isn't using its own internal MPEG 2 decoder. Play the video. If ffdshow is in use you'll see the frame type at the top left corner of the windows. If you have file output enabled you'll see a text file that looks like:
;Frame type:
;I
;B
;B
;P
;B
;B
;P
;B
etc. -
how to make sure that media player isn't using its own internal MPEG 2 decoder
-
It depends on which player you are using.
You may also have to raise the priority of ffdshow or uninstall any other MPEG 2 decoders you have installed. Try Filmerit, RadLight FilterManager, DirectShow Filter Manager... -
sorry, i tried , idid what u said, but nothing appear neither the .csv file
-
The following command will produce a number sequence of JPG images and a text file, list.txt, that shows information about each frame:
Code:ffmpeg -i src.m2v -vf showinfo -f image2 img%05d.jpg 2>list.txt
img00001.jpg
img00002.jpg
img00003.jpg
etc.
list.txt will have the information about the frames, including the frame type:
Code:ffmpeg version N-33698-g6bca574, Copyright (c) 2000-2011 the FFmpeg developers built on Oct 16 2011 13:33:14 with gcc 4.6.1 configuration: --enable-gpl --enable-version3 --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib libavutil 51. 21. 0 / 51. 21. 0 libavcodec 53. 20. 1 / 53. 20. 1 libavformat 53. 16. 0 / 53. 16. 0 libavdevice 53. 4. 0 / 53. 4. 0 libavfilter 2. 43. 6 / 2. 43. 6 libswscale 2. 1. 0 / 2. 1. 0 libpostproc 51. 2. 0 / 51. 2. 0 [mpegvideo @ 01F88400] Estimating duration from bitrate, this may be inaccurate Input #0, mpegvideo, from 'src.m2v': Duration: 00:00:02.49, bitrate: 8000 kb/s Stream #0:0: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 16:15 DAR 4:3], 8000 kb/s, 25 fps, 25 tbr, 1200k tbn, 50 tbc Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting format 'yuvj420p' [buffer @ 01F8FF80] w:720 h:576 pixfmt:yuv420p tb:1/1000000 sar:16/15 sws_param: [showinfo @ 01B4DF00] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'Parsed_showinfo_0' [scale @ 01B4DE60] w:720 h:576 fmt:yuv420p -> w:720 h:576 fmt:yuvj420p flags:0x4 Output #0, image2, to 'img%05d.jpg': Metadata: encoder : Lavf53.16.0 Stream #0:0: Video: mjpeg, yuvj420p, 720x576 [SAR 16:15 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 25 tbc Stream mapping: Stream #0.0 -> #0.0 (mpeg2video -> mjpeg) Press [q] to stop, [?] for help [mpeg2video @ 01F88C60] warning: first frame is no keyframe [showinfo @ 01B4DF00] n:0 pts:40000 pts_time:0.040000 pos:66560 fmt:yuvj420p sar:16/15 s:720x576 i:B iskey:0 type:B checksum:1101685353 plane_checksum:[1049478894 2607004329 3431784628 0] [mpeg2video @ 01F88C60] warning: first frame is no keyframe [showinfo @ 01B4DF00] n:1 pts:80000 pts_time:0.080000 pos:94208 fmt:yuvj420p sar:16/15 s:720x576 i:B iskey:0 type:B checksum:3319530612 plane_checksum:[4032006158 919803314 2062640805 0] [showinfo @ 01B4DF00] n:2 pts:120000 pts_time:0.120000 pos:0 fmt:yuvj420p sar:16/15 s:720x576 i:B iskey:1 type:I checksum:1579548086 plane_checksum:[1976757627 1710351740 3618187952 0] [showinfo @ 01B4DF00] n:3 pts:160000 pts_time:0.160000 pos:143360 fmt:yuvj420p sar:16/15 s:720x576 i:B iskey:0 type:B checksum:1050519086 plane_checksum:[3030810004 2417069096 565025891 0]
-
ffmpeg can also pipe raw data into other programs , you might want to have a look at that. I don't know if matlab can accept it, but some other programs can . So you might pipe raw YUV instead of jpeg/png image sequences
http://ffmpeg.org/ffmpeg.html#pipe
Similar Threads
-
What do people do with mpeg-1/2 video mpgv at 59.94 frames per second?
By johnharlin in forum Video ConversionReplies: 6Last Post: 23rd Aug 2012, 19:30 -
Virtualdub VCR capture no dropped frames but 5400 inserted frames in 1 hour
By suloku in forum CapturingReplies: 12Last Post: 17th Aug 2011, 22:33 -
need help unblending previously blended frames rather than dropping frames
By BilboFett in forum Video ConversionReplies: 15Last Post: 12th May 2011, 21:15 -
mencoder: seeking to frames (or cropping start frames)
By manchurian_candidate in forum LinuxReplies: 3Last Post: 13th Dec 2010, 08:53 -
inserted frames without dropped frames in VirtualDub capturing VHS
By whschlebaum in forum CapturingReplies: 0Last Post: 23rd Aug 2007, 20:59