Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Identification of Frame Type using Xuggle
1er décembre 2012, par SamveenI'm trying to extract just the I-Frames from a video using the Xuggle API. I took the first example from the Xuggle source from here and removing the display code, added the following code snippet to identify the frame type of the current frame:
// Decode loop { if (picture.isComplete()) { com.xuggle.xuggler.IVideoPicture.PictType type = picture.getPictureType() if(type == com.xuggle.xuggler.IVideoPicture.PictType.I_TYPE) System.out.println("(I-Frame)\n"); else if(type == com.xuggle.xuggler.IVideoPicture.PictType.B_TYPE) System.out.println("(B-Frame)\n"); else if(type == com.xuggle.xuggler.IVideoPicture.PictType.P_TYPE) System.out.println("(P-Frame)\n"); else if(type == com.xuggle.xuggler.IVideoPicture.PictType.S_TYPE) System.out.println("(S-Frame)\n"); else if(type ==com.xuggle.xuggler.IVideoPicture.PictType.DEFAULT_TYPE) System.out.println("(Default)\n"); else System.out.println("(Other)\n"); } // }
Using this code, I never get an I-Frame in my test video, which by definition of being it being a video is impossible (every video's first frame MUST be an I-Frame) and every frame is identified as
When I use mplayer to extract the I-Frames from the same video using:
mplayer video20.mp4 -benchmark -nosound -noaspect -noframedrop -ao null \ -vo png:z=6 -vf framestep=I
I correctly get a set of I-Frames.
The number of frames displayed by my code is identical to that extracted by mplayer without the framestep filter
mplayer video20.mp4 -benchmark -nosound -noaspect -noframedrop -ao null \ -vo png:z=6
The input video in question is an H264 encoded video.
My question is that what can I do to correctly get the I-Frames from the video using xuggle
I picked up the method from Java - Keyframe extraction from a video
-
How to resize a video to make it smaller with FFmpeg [closed]
1er décembre 2012, par AlanIs it possible to resize my videos to make them smaller with FFmpeg?
I have an original video dimensions of 1024x576, now I want to resize the video to 720x480 to meet the requirement.
How can I do this?
-
ChromaKey FLV Transparency
1er décembre 2012, par Mr DI have over 20000 FLV's at the moment. They currently have no alpha channel and are all CGI generated text on a black background.
My issue: I need to be able to remove the black background and make it transparent, so I can use these videos to layer over pictures in my flash project.
It needs to be an automated process, that can go through the whole dir of videos and remove the backgrounds
What I've tried?
I have spent the last three days pulling my hair out. Currently the option I see is to write a custom filter for ffmpeg.
The end goal:
Layer the flv videos over randomly generated videos in an adobe air application built in flex.
-
Animated Gif using PHP 5 and ffmpeg [closed]
1er décembre 2012, par user1828200I make an Animated Gif, by download a video from youtube with youtube-dl and then convert it into AVI with
ffmpeg
and then make animated gif throughconvert
. It works, but speed is very slow.Here is my code
Youtube Download:
shell_exec("youtube-dl -o JNJNoaIU7qs.flv --format=5 --audio-quality=9 http://www.youtube.com/watch?v=JNJNoaIU7qs);
Convert to AVI , because I want to make Small Gif so time manipulation is not done with youtube-dl thats why i convert avi with time manipulation
shell_exec("ffmpeg -i JNJNoaIU7qs.flv -sameq -ss 00:00:5 -t 00:00:10 JNJNoaIU7qs.avi");
Make Gif
shell_exec("convert -quiet -delay 0 JNJNoaIU7qs.avi JNJNoaIU7qs.gif");
It creates the GIF files, but it is very slow, how can I increase the speed of conversion?
-
Process audio packets decoded with ffmpeg
1er décembre 2012, par EricFollowing my other post, I am wondernig if it is possible to do some process like MFCC extraction on the decoded audio packets. The code I use decode audio and video from mpeg-2 file using ffmpeg. Process on video is done using opencv as this library permits to grab frames on by one. I need to process the corresponding audio samples in the same time.
Thanks.