[FFmpeg-devel] r16159 has disabled skipping of initial non-keyframes

Wolfram Gloger wmglo
Sun Dec 21 22:45:07 CET 2008


> From: Michael Niedermayer <michaelni at gmx.at>
>
> stream copy of files without keyframes
> 
> a patch that replaces start_time there with a new user settable variable
> is welcome

Ok.  Like this?

Regards,
Wolfram.

--- trunk/ffmpeg.c	2008-12-21 22:21:12.000000000 +0100
+++ ffmpeg-wg/ffmpeg.c	2008-12-21 22:39:49.000000000 +0100
@@ -196,6 +196,7 @@
 static char *vstats_filename;
 static FILE *vstats_file;
 static int opt_programid = 0;
+static int copy_initial_nonkeyframes = 0;
 
 static int rate_emu = 0;
 
@@ -1353,7 +1354,7 @@
                         AVPacket opkt;
                         av_init_packet(&opkt);
 
-                        if ((!ost->frame_number && !(pkt->flags & PKT_FLAG_KEY)) && start_time)
+                        if ((!ost->frame_number && !(pkt->flags & PKT_FLAG_KEY)) && !copy_initial_nonkeyframes)
                             continue;
 
                         /* no reencoding needed : output the packet directly */
@@ -3767,6 +3768,7 @@
     { "dts_delta_threshold", HAS_ARG | OPT_FLOAT | OPT_EXPERT, {(void*)&dts_delta_threshold}, "timestamp discontinuity delta threshold", "threshold" },
     { "programid", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&opt_programid}, "desired program number", "" },
     { "xerror", OPT_BOOL, {(void*)&exit_on_error}, "exit on error", "error" },
+    { "copyinkf", OPT_BOOL | OPT_EXPERT, {(void*)&copy_initial_nonkeyframes}, "copy initial non-keyframes" },
 
     /* video options */
     { "b", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" },




More information about the ffmpeg-devel mailing list