0

I am using ffmpeg 3.1.4 If i stream via command line on Mac 10.10.5 its done properly.

However when i compile source code and add library files in my cocoa app and try to stream i get errors.

Format context is created properly using :

avformat_alloc_output_context2(_avOutputFormatContext, _avOutputFormat, "flv", "rtmp://path/swati.flv"

File is opened properly :

avio_open(&_avOutputFormatContext->pb, cStreamName, AVIO_FLAG_WRITE);

However Error is received at :

avformat_write_header(_avOutputFormatContext, NULL);

It gives -22 error

Any suggestion what should i do.

llogan
  • 121,796
  • 28
  • 232
  • 243
Swati
  • 2,870
  • 7
  • 45
  • 87
  • Without knowing what formats you're using there's likely not an answer to your question... – l'L'l Oct 26 '16 at 16:37
  • Since there no whole code is available, Can't say in detail but you are passing wrong/invalid argument to `avformat_write_header`. Check whether `_avOutputFormatContext` is initialized properly – twid May 12 '17 at 08:12

0 Answers0