0

I'm building an application in C++ that should use FFmpeg to send a live stream to Flash Media Server. For starters I would like to be able to send a .mp4 file. Using the FFmpeg .exe I can do it like this:

ffmpeg -re -i TEST.mp4 -vcodec libx264 -f flv rtmp://[host]/[application]/[stream]

How would you go about implementing something like that in code? I can only figure out how to read data, not write it. I have found functions to open input but nothing about how to connect to FMS. All write functions I can find seems to be how to write to file. Please advice.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Farawin
  • 1,375
  • 2
  • 14
  • 19
  • strange question. There's `ffplay.c`. Use the source Luke, may the force be with you. – user1095108 Feb 12 '13 at 14:05
  • But as far as I understand ffplay is a player and I need to send data not read it. Also, why is it a strange question? – Farawin Feb 13 '13 at 07:05
  • `ffmpeg` has a tradition of terse or non-existent docs. The main reference are the sources. – user1095108 Feb 13 '13 at 07:12
  • I understand that much :) But even after looking through the source I can only find examples on reading from a stream and I need to send data to FMS. – Farawin Feb 13 '13 at 07:24
  • You need to look into `ffmpeg.c` itself then. An extreme solution is to compile the entire `ffmpeg.c` into your application and send it command line parameters (after renaming `main()`). – user1095108 Feb 13 '13 at 07:36

0 Answers0