How to broadcast mp4 stream - broadcasting

I have mp4 stream available over HTTP to single client
How to broadcast it to multiple clients?
I can write code that will read MP4 stream over HTTP and copy to multiple clients.
But is there some initial frame, header in MP4 stream?
May be some framework or existing server can broadcast mp4 stream?

Use VLC, it has nice streaming possibilities (VLC is for Video Lan Client, by the way).
Just fire up VLC, go to File->Stream..., select the source you want to distribute, choose e.g. http as method, transcode (or don't), and select the port to listen on. From there on, your clients can connect :)

Related

Does ExoPlayer or AVFoundation work with an udpxy stream?

I'm building a frontend for a proprietary IPTV backend, which receives its channel streams via multicast, then for the end users it uses udpxy to convert the traffic from multicast to HTTP. However, neither ExoPlayer or AVFoundation seem to accept this stream (both the VLC app & flutter_vlc_player play this stream nicely) - I'm using the video_player plugin for Flutter, so I may miss over some live stream specific impls. Can anyone point me in the right direction? Thanks!
Media information (VLC):
udpxy: udpxy 1.0-23.12 (prod) standard [Linux 5.10.0-10-amd64 x86_64], the output stream is application/octet-stream (maybe that can cause some problems?)

Get RTSP stream on server from WebRTC

How can I get RTSP stream on server from WebRTC and then use it for my own purposes, for example, to retranslate it somewhere. Maybe there is some solution or library?
Any help is much appreciated!
Denis
If you are willing to hook into the webrtc code then this can be done easily by doing the following:
Build a native webrtc C++ client on server
If the codec used is H.264, tap the output (encoded frames) from H264 RTP receiver.
Use a third party library such as (http://www.live555.com/openRTSP/) to build a RTSP server out of it.
If vp8, you might as well tap the output of vp8 decoder and then use ffmpeg to create rtsp stream out of it. Or consider webm may be?

How to play audio and video file together in SIPp

Can SIPp support play audio and video file together in a call? Thanks.
I am able to initiate a sip audio call. What I want to achieve is, after the callee picks the call, play a audio and video file together.
I want to achieve this using the command line arguments. Has someone done this before?
You should be able to do it the same way you are playing a pre-recorded audio file. Please see the relevant section in the SIPp document:
PCAP (media) commands
PCAP play commands (specified using play_pcap_audio / play_pcap_video attributes) allow you to send a pre-recorded RTP stream using the pcap library.
Choose play_pcap_audio to send the pre-recorded RTP stream using the "m=audio" SIP/SDP line port as a base for the replay.
Choose play_pcap_video to send the pre-recorded RTP stream using the "m=video" SIP/SDP line port as a base.
The play_pcap_audio/video command has the following format: play_pcap_audio="[file_to_play]" with:

how does Webcam stream is usually done?

I am currently doing a small project and one of the components is to capture the webcam stream from one side to the other (Client-->Server). right now i have the stream from the Server as bytes and as far as i know i should transfer these bytes using UDP. My question is how to do that,
is it should be enclosed into a file and then transferred?
should i transfer the raw bytes?
should i create a buffer at the client side and when it gets full show it on the screen?
in short i would like to know how to implement the transfer of the stream from the server to the client (i need just on side).
You can stream a webcam to a client via multiple ways.
use Windows media Server/ Flash media Server. Push your webcam to the server by Windows Media Encoder or flash media encoder, and use the server live link to playback on the client(windows /Web).
Use Windows Media Encoder to stream your webcam to anyone without a server involved. when your encoder starts, you will get a URL to view your stream, which you can use to playback on the client(windows /Web).
use third party streaming services, where they give you a publishing point to publish your webcam stream, and use the link provided by them to playback on the client(windows /Web).. (check with brighcove or Mogulus by LiveStream
Hope this helps.

how to stream high quality video and audio from iPhone to remote server through Internet

I am seeking the following three items, which I cannot find on STACKOVERFLOW or anywhere:
sample code for AVFoundation capturing to file chunks (~10seconds) that are ready for compression?
sample code for compressing the video and audio for transmisison across the Internet?
ffmpeg?
sample code for HTTP Live Streaming sending files from iPhone to Internet server?
My goal is to use the iPhone as a high quality AV camcorder that streams to a remote server.
If the intervening data rate bogs down, files should buffer at the iPhone.
thanks.
You can use AVAssetWriter to encode a MP4 file of your desired length. The AV media will be encoded into the container in H264/AAC. You could then simply upload this to a remote server. If you wanted you could segment the video for HLS streaming, but keep in mind that HLS is designed as a server->client streaming protocol. There is no notion of push as far as I know. You would have to create a custom server to accept pushing of segmented video streams (which does not really make a lot of sense given the way HLS is designed. See the RFC Draft. A better approach might be to simply upload the MP4(s) via a TCP socket and have your server segment the video for streaming to client viewers. This could be easily done with FFmpeg either on the command line, or via a custom program.
I also wanted to add that if you try and stream 720p video over a cellular connection your app will more then likely get rejected for excessive data use.
Capture Video and Audio using AVFouncation. You can specify the Audio and Video codecs to kCMVideoCodecType_H264 and kAudioFormatMPEG4AAC, Frame sizes, Frame rates in AVCaptureformatDescription. It will give you Compressed H264 video and AAC aduio.
Encapsulate this and transmit to server using any RTP servers like Live555 Media.