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-boun...@ffmpeg.org> on behalf of Strahinja Radman <dr.stras...@gmail.com> Sent: Friday, October 30, 2020 2:35 PM To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. <libav-u...@ffmpeg.org> Cc: FFmpeg user questions <ffmpeg-user@ffmpeg.org> Subject: Re: [Libav-user] [FFmpeg-user] RTMP issue On Fri, Oct 30, 2020 at 5:03 PM Devin Heitmueller <dheitmuel...@kernellabs.com<mailto:dheitmuel...@kernellabs.com>> wrote: On Thu, Oct 29, 2020 at 5:54 PM william keeling <williamkeel...@hotmail.com<mailto:williamkeel...@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-u...@ffmpeg.org<mailto:libav-u...@ffmpeg.org> https://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email libav-user-requ...@ffmpeg.org<mailto:libav-user-requ...@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 _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".