HI All,
I am very new to video codecs and just trying to figure out what its all about
I compiled ffmpeg library, and made a small C++ program that can extract key frames and save them as images from the videos.
I also noted that distance between keyframes is not even (for most of the videos that I tried divx, xvid mpeg4...)
Distance can vary from 1 to up to 300 frames. As I understand its related to shots encoding, eg new keyframe is inserted only if its very different to previous frame.
(In order to save space)
This is my question: When I convert videos with ffmpeg through console, I can manually specify keyframe distance, default parameter -g and its set to 12.
Is there any way to encode video with FFmpeg so that keframe distance will be variable ? (rather than consistent 12 frames or any other static number)
Thanks
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 3 of 3
Thread
-
-
9 years later i'm playing with ffmpeg encoding "compilant dvix home theater" files for i'm not sure yet which reason... but i'm stuck with that defalut -g 12 in there. i can override it by setting manual max keyframe to ...120... but now the keyfamres are every 120 seconds despite scene change. WTF. I change the library to x264 and boom, keyframes are normal, following scene changes... back to mpeg4 or libxvid, it gets back evil. What are we doing wrong? does that -12 flag is burnt into ffmpeg since decades and nobody figured out it would be great to remove it as those libs aren't much used these days?
Similar Threads
-
Vide on commercial sites
By PowerFalcon in forum Video Streaming DownloadingReplies: 9Last Post: 10th Jun 2012, 10:12 -
Joing mkv files when they are not splitted at keyframes
By wateshadon in forum EditingReplies: 1Last Post: 11th Jul 2011, 13:01 -
FFMPEG Flags for FLV keyframes
By infinull in forum Video ConversionReplies: 0Last Post: 13th Apr 2010, 22:36 -
vide size
By maxone58 in forum DVD RippingReplies: 7Last Post: 28th Mar 2010, 23:01 -
Batch Converting of Varouous vide fromats to Flash flv with ffmpeg
By tempgp in forum ProgrammingReplies: 0Last Post: 7th Dec 2007, 15:58