<div dir="ltr">Also to set rtmp options I think you can just use av_dict_set on an AVDictionary and pass that to avformat_write_header.<div><br></div><div>David</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 29, 2020 at 2:54 PM william keeling <<a href="mailto:williamkeeling@hotmail.com">williamkeeling@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">
I still have not found a solution for this issue.<span> 
</span>I wonder if I need to use avio_open2 (not avio_open).<span> 
</span>Avio_open2 takes AVDictionary of options as a parameter.<span> 
</span>Does anyone know how to find any documentation of the options that an available for the RTMP protocol?<u></u> <u></u></p>
Thanks,<br>
William</div>
<div id="gmail-m_8754580275322293525appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_8754580275322293525divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> william keeling <<a href="mailto:williamkeeling@hotmail.com" target="_blank">williamkeeling@hotmail.com</a>><br>
<b>Sent:</b> Monday, August 24, 2020 6:33 PM<br>
<b>To:</b> FFmpeg user questions <<a href="mailto:ffmpeg-user@ffmpeg.org" target="_blank">ffmpeg-user@ffmpeg.org</a>>; <a href="mailto:libav-user@ffmpeg.org" target="_blank">libav-user@ffmpeg.org</a> <<a href="mailto:libav-user@ffmpeg.org" target="_blank">libav-user@ffmpeg.org</a>><br>
<b>Subject:</b> Re: [FFmpeg-user] RTMP issue</font>
<div> </div>
</div>

<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I had avformat_network_init() in the code before and have found no difference with or without it.  I added back and reran the test again with the verbose logging and received the same results and same log.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
pi@pi2cam:/userland/build/bin $ ./rcam -D dmic_sv -d 180  -q 30 -w 1920 -h 1080 rtmp://<a href="http://a.rtmp.youtube.com/live2/" target="_blank">a.rtmp.youtube.com/live2/</a><KEY>
<div>[tcp @ 0x199bb70] Starting connection attempt to 2607:f8b0:401a:26::8 port 1935</div>
<div>[tcp @ 0x199bb70] Successfully connected to 2607:f8b0:401a:26::8 port 1935</div>
<div><br>
</div>
<div>[aac @ 0x19a9620] Qavg: 116.588</div>
[AVIOContext @ 0x199dfd0] Statistics: 0 seeks, 12400 writeouts</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks please keep the ideas coming,</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
William </div>
<div id="gmail-m_8754580275322293525x_appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_8754580275322293525x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> ffmpeg-user <<a href="mailto:ffmpeg-user-bounces@ffmpeg.org" target="_blank">ffmpeg-user-bounces@ffmpeg.org</a>> on behalf of Chris Miceli <<a href="mailto:chris@miceli.net.au" target="_blank">chris@miceli.net.au</a>><br>
<b>Sent:</b> Monday, August 24, 2020 6:05 PM<br>
<b>To:</b> FFmpeg user questions <<a href="mailto:ffmpeg-user@ffmpeg.org" target="_blank">ffmpeg-user@ffmpeg.org</a>><br>
<b>Subject:</b> Re: [FFmpeg-user] RTMP issue</font>
<div> </div>
</div>
<div><font size="2"><span style="font-size:11pt">
<div>Hi William,<br>
<br>
I'm by no means an expert on the matter but I tried having a look for you.<br>
At least one issue would be that you are not calling<br>
avformat_network_init() which<br>
is a requirement for any protocol which needs network [1]<br>
<br>
I would have tested and tried this for you, however I do not have the<br>
hardware laying around.<br>
<br>
I wish you the best of luck and let me know how it goes.<br>
<br>
[1] - libavformat/libavformat.h lines 40-41<br>
<br>
*Chris Miceli*<br>
<br>
On Mon, Aug 24, 2020 at 10:17 AM william keeling <<a href="mailto:williamkeeling@hotmail.com" target="_blank">williamkeeling@hotmail.com</a>><br>
wrote:<br>
<br>
> I added the AV_LOG_VERBOSE and got the following output:<br>
><br>
> pi@pi2cam:/userland/build/bin $ ./rcam -D dmic_sv -d 5  -q 30 -w 1920 -h<br>
> 1080 rtmp://<a href="http://a.rtmp.youtube.com/live2/" target="_blank">a.rtmp.youtube.com/live2/</a><KEY><br>
> [tcp @ 0x18acb70] Starting connection attempt to 2607:f8b0:401a:7::8 port<br>
> 1935<br>
> [tcp @ 0x18acb70] Successfully connected to 2607:f8b0:401a:7::8 port 1935<br>
><br>
> [aac @ 0x18ba620] Qavg: 118.451<br>
> [AVIOContext @ 0x18aefd0] Statistics: 0 seeks, 341 writeouts<br>
><br>
><br>
> If you can point me to an example of logging callback I will try and add<br>
> it if you think it will yield more useful information.<br>
><br>
> Thanks in advance for your ideas and help,<br>
> William<br>
><br>
> ________________________________<br>
> From: ffmpeg-user <<a href="mailto:ffmpeg-user-bounces@ffmpeg.org" target="_blank">ffmpeg-user-bounces@ffmpeg.org</a>> on behalf of Moritz<br>
> Barsnick <<a href="mailto:barsnick@gmx.net" target="_blank">barsnick@gmx.net</a>><br>
> Sent: Monday, August 24, 2020 9:25 AM<br>
> To: FFmpeg user discussions <<a href="mailto:ffmpeg-user@ffmpeg.org" target="_blank">ffmpeg-user@ffmpeg.org</a>><br>
> Subject: Re: [FFmpeg-user] RTMP issue<br>
><br>
> Hi William<br>
><br>
> On Mon, Aug 24, 2020 at 00:40:04 +0000, william keeling wrote:<br>
><br>
> > My question is an issue with a program written to live stream to<br>
> > YouTube working is all modes other than rtmp live stream.<br>
><br>
> For programming with the ffmpeg libav* libraries, you should usually<br>
> turn to the libav-user mailing list, But perhaps we can help.<br>
><br>
> > finishes the stream is never processed by YouTube. When the stream is<br>
> > piped (pipe:1 URL) thru FFMPEG (demuxed and muxed only -- ffmpeg -i -<br>
> > -vcodec copy -acodec copy -f flv rtmp:<URL>) the live stream works<br>
> > without issues.<br>
><br>
> At least that means that your content encoding, bit rate, number of<br>
> audio channels, and so on, are correct for YouTube. It's just the<br>
> muxing, or perhaps something like a flag or metadata.<br>
><br>
> > So, I need to understand what FFMPEG command line is doing with rtmp:<br>
> URL that I am not doing with the FFMPEG API.<br>
> > My source code is at <a href="http://github.com/wkeeling63/rcam" target="_blank">github.com/wkeeling63/rcam</a>. Any ideas you have I<br>
> > would love to hear as I am stumped.<br>
><br>
> Too bad ths only compiles on Raspberry Pi, so there's no way to<br>
> reproduce your muxing issue.<br>
><br>
> Since you didn't provide a log callback using av_log_set_callback(),<br>
> shouldn't your application show all the usual ffmpeg/libav* log output<br>
> on stdout? Can you provide us with that ouptut? Raise the log level<br>
> with e.g. av_log_set_level(AV_LOG_VERBOSE), if required.<br>
><br>
> Thanks,<br>
> Moritz<br>
> _______________________________________________<br>
> ffmpeg-user mailing list<br>
> <a href="mailto:ffmpeg-user@ffmpeg.org" target="_blank">ffmpeg-user@ffmpeg.org</a><br>
> <a href="https://ffmpeg.org/mailman/listinfo/ffmpeg-user" target="_blank">https://ffmpeg.org/mailman/listinfo/ffmpeg-user</a><br>
><br>
> To unsubscribe, visit link above, or email<br>
> <a href="mailto:ffmpeg-user-request@ffmpeg.org" target="_blank">ffmpeg-user-request@ffmpeg.org</a> with subject "unsubscribe".<br>
> _______________________________________________<br>
> ffmpeg-user mailing list<br>
> <a href="mailto:ffmpeg-user@ffmpeg.org" target="_blank">ffmpeg-user@ffmpeg.org</a><br>
> <a href="https://ffmpeg.org/mailman/listinfo/ffmpeg-user" target="_blank">https://ffmpeg.org/mailman/listinfo/ffmpeg-user</a><br>
><br>
> To unsubscribe, visit link above, or email<br>
> <a href="mailto:ffmpeg-user-request@ffmpeg.org" target="_blank">ffmpeg-user-request@ffmpeg.org</a> with subject "unsubscribe".<br>
_______________________________________________<br>
ffmpeg-user mailing list<br>
<a href="mailto:ffmpeg-user@ffmpeg.org" target="_blank">ffmpeg-user@ffmpeg.org</a><br>
<a href="https://ffmpeg.org/mailman/listinfo/ffmpeg-user" target="_blank">https://ffmpeg.org/mailman/listinfo/ffmpeg-user</a><br>
<br>
To unsubscribe, visit link above, or email<br>
<a href="mailto:ffmpeg-user-request@ffmpeg.org" target="_blank">ffmpeg-user-request@ffmpeg.org</a> with subject "unsubscribe".</div>
</span></font></div>
</div>
</div>

_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="https://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">https://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br>
To unsubscribe, visit link above, or email<br>
<a href="mailto:libav-user-request@ffmpeg.org" target="_blank">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".</blockquote></div>