[FFmpeg-trac] #1751(undetermined:new): FFmpeg keeps streaming but stream is blank/offline
FFmpeg
trac at avcodec.org
Tue Sep 18 23:07:17 CEST 2012
#1751: FFmpeg keeps streaming but stream is blank/offline
-------------------------------------+-------------------------------------
Reporter: taqattack | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: ffmpeg | Blocked By:
stream random stop | Reproduced by developer: 0
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Hello. I'm creator of FFsplit project (http://www.ffsplit.com). We have
been using ffmpeg on windows to encode and stream videos to CDNs. One of
the most annoying issues that popped up was that the stream would suddenly
stop but ffmpeg would keep going as if nothing wrong happened. I basically
solved this inside FFsplit by reading and detecting improper packet from
byte arrays that are sent to it and looking for the incorrect/incomplete
packet. But recently I was able to solve this issue inside FFmpeg source
code. Here's what I did:
In libavformat/rtmpproto.c, I changed:
{{{
if (size < 11) {
av_log(LOG_CONTEXT, AV_LOG_DEBUG, "FLV packet too small %d\n", size);
return 0;
}
}}}
to
{{{
if (size < 11 && !rt->flv_off) { // <--- Added "&& !rt->flv_off"
av_log(LOG_CONTEXT, AV_LOG_DEBUG, "FLV packet too small %d\n", size);
return 0;
}
}}}
(Source: http://broadcast.oreilly.com/2011/11/flash-media-serverffmpeg-
annoy-1.html)
From what I understand, the FLV packet size was bigger than RTMP and this
solves it. Checking it inside FFsplit, the improper byte arrays dont show
up anymore. I hope someone sees this and incorporates it inside FFmpeg.
Thank you!
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1751>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list