Once it begins to receive the broadcast, the values above will change and a player "visualization" window will open up. The IP address of the Windows 10 machine is 10.0.0.123 and I am broadcasting on port 1234. ?listen is required to put it into "listen mode" otherwise it will time out if the stream is not there.īelow is an example done in Windows 10 receiving the stream from a macOS host's microphone.local_host_or_IP_addr:port is the IP address or hostname and the TCP port of the computer that's listening (not the computer that's streaming). Issue the command ffplay -i tcp://local_host_or_IP_addr:port?listen -hide_banner Using ffplay the remote computer can be set to receive the stream (I used Windows 10 for this part, but will work in macOS/Windows/BSD/Linux) tcp://remote_host_or_IP_:port is the URI value of the remote computer's hostname/IP address and port number it will be listening on.-f is the transport format in this case mpegts (MPEG Transport Stream).Using the same input from the previous answer, we just change the output to a network stream: $ ffmpeg -f avfoundation -i ":1" -t 10 -f mpegts "tcp://remote_host_or_IP_:port" The other method, is to broadcast the audio via TCP via a point-to-point connection. To make this work, you need to set up SSH Keys to facilitate a non-interactive login. The script doesn't do any error checking of any kind but, will record from the microphone, then when finished it will copy it via SCP (secure copy) to a remote computer. This script should fit the bill: #!/bin/bashįfmpeg -f avfoundation -i ":1" -t 10 audiocapture.mp3 Allow the stream to finish recording then copy it to a predetermined location on the network.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |