[Libav-user] [FFmpeg-user] RTMP issue

Strahinja Radman dr.strashni at gmail.com
Fri Oct 30 21:35:16 EET 2020


On Fri, Oct 30, 2020 at 5:03 PM Devin Heitmueller <
dheitmueller at kernellabs.com> wrote:

> On Thu, Oct 29, 2020 at 5:54 PM william keeling <
> williamkeeling at hotmail.com> wrote:
> >
> > I still have not found a solution for this issue.  I wonder if I need to
> use avio_open2 (not avio_open).  Avio_open2 takes AVDictionary of options
> as a parameter.  Does anyone know how to find any documentation of the
> options that an available for the RTMP protocol?
>
> Have you confirmed that the H.264 stream produced by the hardware encoder
> can actually be decoded by Youtube?  Some of these hardware encoders use
> non-standard/less-common options that might cause problems with a streaming
> service.  Since you're using "-vcodec copy" you're essentially just passing
> through the NAL stream from the hardware encoder unmodified.
>
> I would suggest trying it with an H.264 stream that isn't the output of
> the hardware encoder, just to see if this is really a problem with the RTMP
> as opposed to the H.264 stream contained within it.
>
> Devin
>
> --
> Devin J. Heitmueller - Kernel Labs
> http://www.kernellabs.com
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/libav-user
>
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".


Hi all,

My guess is that your header information is not properly set. This will
cause YouTube or Twitch to not decode the stream. Twitch has much better
tools to diagnose these kinds of problems.
Make sure that you have this code before you call the avcodec_open2:

if (oc->ofmt_ctx->oformat->flags & AVFMT_GLOBALHEADER){
         enc_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
}

-- 

Regards
Strahinja Radman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20201030/aadee26b/attachment.html>


More information about the Libav-user mailing list