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

william keeling williamkeeling at hotmail.com
Sat Oct 31 00:27:36 EET 2020


I already have that code

if (flv_frmtctx->oformat->flags & AVFMT_GLOBALHEADER) {
     h264_codec_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;}

Keep the ideas coming

Thanks



________________________________
From: Libav-user <libav-user-bounces at ffmpeg.org> on behalf of Strahinja Radman <dr.strashni at gmail.com>
Sent: Friday, October 30, 2020 2:35 PM
To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. <libav-user at ffmpeg.org>
Cc: FFmpeg user questions <ffmpeg-user at ffmpeg.org>
Subject: Re: [Libav-user] [FFmpeg-user] RTMP issue



On Fri, Oct 30, 2020 at 5:03 PM Devin Heitmueller <dheitmueller at kernellabs.com<mailto:dheitmueller at kernellabs.com>> wrote:
On Thu, Oct 29, 2020 at 5:54 PM william keeling <williamkeeling at hotmail.com<mailto: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<mailto: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<mailto: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/d08f27a3/attachment.html>


More information about the Libav-user mailing list