[rtmpdump] Experimental patch to automatically disable BUFX

Howard Chu hyc at highlandsun.com
Tue Aug 14 09:27:26 CEST 2012

Gunnar wrote:
> Thanks, not yet time to check your patches, but some quick observations 
> I made in regards to the CSPAN server and stream.
> EOF good as trigger, 20k mastodont packets 2.75s apart, keyframes?, 
> stream feed always returns, jumps "backwards" to earlier, latest one.
> ---
> Triggered debugging using the EOF ctrl message from CSPAN, seemed to 
> work very well
> I checked with wiresshark too, easy to search for "pause", found in 
> notify and unpause,etc as ASCII
> Checked actual last timestamp before the EOF and the ones used by 
> rtmpdump to restart stream, and first arrived after restart.
> Some odd behavior, but then noticed the restarted feed continues, or 
> "backwards-jumps" to "nice decimal numbers".
> Additionally a nearby 'mastodont packet" (npacketlenght? somewhere in 
> rtmp.c).
> OK set a print-test for more than 10K, looked good, then 20k, PERFECT!! 
> Catches only these 2.75s packets.
> FInal observation-result.
> - Not sure, not dble-chked, but CSPAN-server seems to want 5.5s buffer
> - every 2.75s, a "huge mastodont rtmp-packet" (have not digged deeper, 
> video keyframe probably??)
> - Most important, after the restart of the stream the feed always starts 
> from the earlier latest "20k mastodont packet"

Yes, an RTMP server can only seek to the nearest keyframe boundary. It would
make most sense to not disable the BUFX hack. Instead, just filter out old
frames after doing the pause/resume.

More information about the rtmpdump mailing list