Ticket #1334 (new patch)

Opened 11 months ago

Last modified 8 months ago

sout transcode ignores low fps in vlc 0.86 but works ok in vlc 0.82

Reported by: teseolan Assigned to:
Priority: normal Milestone: Bugs paradize
Component: Encoders Version:
Severity: major Keywords:
Cc: Platform(s): all
Difficulty: unknown Work status: Not started

Description

When you use -sout=#transcode{fps=1.00,vcodec=MJPG,vbr=512,scale=0.5}:duplicate{dst=std{access=http,mux=asf,dst=http.... }} in vlc 0.86, you never get 1 fps, but using vlc 0.82 it works ok.

I think the problem is in transcode.c, lines 2055, 2302 and 2315 where we have

if ( p_pic->date - i_pts > MASTER_SYNC_MAX_DRIFT p_pic->date - i_pts < -MASTER_SYNC_MAX_DRIFT ) { msg_Dbg( p_stream, "drift is too high, resetting master sync" ); date_Set( &id->interpolated_pts, p_pic->date ); }

For low fps, p_pic->date and i_pts are quite different, so the program always "resets" master sync, and the frames that should be dropped are not. As a result, the transcoded video has the same frame-rate as the original stream.

In VLC 0.82, this "resetting" code was not present.

I suggest taking into account the interval between frames in the transcoded video when deciding if master sync must be resetted.

Plaese take into account that low frame rate are often used in video surveillance, and are required for transmition across mobile networks.

Attachments

vlc_transcode_drift_fps.diff (3.1 kB) - added by ileoo on 01/02/08 09:23:31.
scale transcode drift according to fps values

Change History

01/02/08 09:23:31 changed by ileoo

  • attachment vlc_transcode_drift_fps.diff added.

scale transcode drift according to fps values

01/02/08 09:24:32 changed by ileoo

could you test attached diff to see if it's even close what's needed. It scales drift value according to fps values, but I'm not sure if that's enough.

01/08/08 08:38:51 changed by ileoo

  • owner changed.
  • version deleted.
  • component changed from Stream output to Encoders.

01/21/08 19:40:47 changed by ileoo

  • type changed from defect to patch.