Reputation:
I need to make a stream from remote rtmp server to my server. In other words, I have to convert remote rtmp server to make a new stream which is exactly the same with remote rtmp and return it. Is it possible with PHP with third party applications?
Upvotes: 0
Views: 2670
Reputation: 666
It is possible with FFMPEG. Something like
$cmd = $options['ffmpegPath'] .' ' . " -threads 1 -f flv \"" . $rtmpAddress . "/". $streamOut . "\" -i \"" . $rtmpAddress ."/". $streamIn . "\" >&$log_file & ";
exec($cmd, $output, $returnvalue);
To see/run a sample, check the code of this WP plugin that does transcoding on the streams with FFMPEG: https://wordpress.org/plugins/videowhisper-live-streaming-integration/
Upvotes: 1