On Tue, May 5, 2020 at 10:42 PM william keeling <[email protected]>
wrote:

> I have an issue that has me stumped. I have written a program than creates
> a flash video container (H.264 video and AAC audio streams) and writes it
> to a URL. If the URL is a file it is and playable and uploadable with no
> issues. But if the URL is a RTMP then it is stream but with buffering
> waits. But if the URL is pipe:1 passed to ffmpeg -i - -acodec copy -vcodec
> copy -f flv rtmp://a.rtmp.youtube.com/live2/<key> works just fine.
>
> Here is the setup code:
>
>
>                 int status=0;
>
>  //  setup format context and io context
>
> //  tried with and without avformat_network_init();
>
> //            avformat_network_init();
>
>                 if ((status = avio_open(&io_ctx, filename,
> AVIO_FLAG_WRITE)))
>
>                                 {
>
>                                 fprintf(stderr, "Could not open output
> file '%s' (error '%s')\n", filename, av_err2str(status));
>
>                                 return -1;
>
>                                 }
>
>                 avformat_alloc_output_context2(&flv_frmtctx, NULL, "flv",
> NULL);
>
>                 if (!flv_frmtctx)
>
>                                 {
>
>                                 fprintf(stderr, "Could not allocate
> output format context\n");
>
>                                 return -1;
>
>                                 }
>
>                 flv_frmtctx->pb = io_ctx;
>
>                 if (!(flv_frmtctx->url = av_strdup(filename)))
>
>                                 {
>
>    fprintf(stderr, "Could not copy url.\n");
>
>                                 return -1;
>
>                                 }
>
>
>
> The I understand the FFMPEG command is just a passthru with just copy of
> both streams and no changes to either stream or container but it streams
> just fine.
>
> So any ideas what I am doing wrong or missing in my code that is being
> done by FFMPEG?
>
>
>
Please show the full example ffmpeg options to reproduce your issue,

You mentioned many URLs in your question. Which URL is input url,, and
which URL is output url?
_______________________________________________
Libav-user mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to