"This option will drop/duplicate video frames to synchronise the video " \
"track on the audio track." )
+#define HURRYUP_TEXT N_( "Hurry up" )
+#define HURRYUP_LONGTEXT N_( "Allows you to specify if the transcoder " \
+ "should drop frames if your CPU can't keep up with the encoding rate." )
+
static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
SCALE_LONGTEXT, VLC_FALSE );
add_float( SOUT_CFG_PREFIX "fps", 0, NULL, FPS_TEXT,
FPS_LONGTEXT, VLC_FALSE );
+ add_bool( SOUT_CFG_PREFIX "hurry-up", VLC_TRUE, NULL, HURRYUP_TEXT,
+ HURRYUP_LONGTEXT, VLC_FALSE );
add_bool( SOUT_CFG_PREFIX "deinterlace", 0, NULL, DEINTERLACE_TEXT,
DEINTERLACE_LONGTEXT, VLC_FALSE );
add_integer( SOUT_CFG_PREFIX "width", 0, NULL, WIDTH_TEXT,
static const char *ppsz_sout_options[] = {
"venc", "vcodec", "vb", "croptop", "cropbottom", "cropleft", "cropright",
- "scale", "fps", "width", "height", "deinterlace", "threads",
+ "scale", "fps", "width", "height", "deinterlace", "threads", "hurry-up",
"aenc", "acodec", "ab", "samplerate", "channels",
"senc", "scodec", "soverlay", "sfilter",
"audio-sync", NULL
int i_height;
vlc_bool_t b_deinterlace;
int i_threads;
+ vlc_bool_t b_hurry_up;
int i_crop_top;
int i_crop_bottom;
var_Get( p_stream, SOUT_CFG_PREFIX "fps", &val );
p_sys->f_fps = val.f_float;
+ var_Get( p_stream, SOUT_CFG_PREFIX "hurry-up", &val );
+ p_sys->b_hurry_up = val.b_bool;
+
var_Get( p_stream, SOUT_CFG_PREFIX "width", &val );
p_sys->i_width = val.i_int;
{
subpicture_t *p_subpic = 0;
+ if( p_stream->p_sout->i_out_pace_nocontrol && p_sys->b_hurry_up )
+ {
+ mtime_t current_date = mdate();
+ if( current_date + 100000 > p_pic->date )
+ {
+ msg_Dbg( p_stream, "late picture skipped ("I64Fd")",
+ current_date + 100000 - p_pic->date );
+ p_pic->pf_release( p_pic );
+ continue;
+ }
+ }
+
if( p_sys->b_master_sync )
{
mtime_t i_video_drift;
(int)(i_video_drift - i_master_drift) );
#endif
p_pic->pf_release( p_pic );
- return VLC_EGENERIC;
+ continue;
}
else if( i_video_drift > i_master_drift + 50000 )
{