Re-broadcast a 96 kbps Shoutcast stream to a 192 kbps Icecast server [closed] - icecast

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 months ago.
Improve this question
I run a radio station which streams live to an Icecast server that I host myself on a VPS. My stream is 192 kbps MP3.
I want to carry a syndicated show which is delivered live via a 96 kbps MP3 Shoutcast stream.
I figure the smoothest way to "switch over" is to have this syndicated live content re-streamed via a Mountpoint on my Icecast. I can then use Icecast's built-in "move clients" feature to seamlessly move clients from one Mountpoint to another.
So the question is: What tools are out there that will run on a Linux server to read a Shoutcast stream and re-stream it to an Icecast server? (Note the bitrates are different).
I've already tried using Icecast's relay feature, and although it works as per spec, I'm not able to move clients between the main Mountpoint and the relay Mountpoint because of the different bitrates (the client just presents silence when I switch over). So I've ruled out using the Icecast relay feature and decided I should somehow use a tool to read a Shoutcast stream and re-stream it to an Icecast server.
Can anyone suggest a way of achieving this?

In general a tool to rebroadcast in this context is called a stream transcoder.
Sounds like Liquidsoap is a very good match for your particular use case.
You can use the fallback/override functionality to automatically move all clients around, while providing an unchanged entry through one mountpoint.
Alternatively Liquidsoap has functionality built in to deal with multiple sources and producing one stream.
There are many other options. FFmpeg, VLC, mpd…

Related

Is there a "serverless" solution for a (gaming) server? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I am working on a game atm and started to research about an alternative solution to dedicated servers.
The reason I am doing this is that I have little administration knowledge and would prefer to spend the time in programming instead of learning that. Especially when it comes to security to the dedicated machine itself and not my application that runs on it.
So my question is whether there is a possibility of a server where you can just run your code written e.g. in golang and have less or easier administration and a much better or the same security?
It would be perfect if I just get an endpoint connection to my application when a client wants to communicate without the care of security concerns outside of my application.
I have looked on some services from aws and google (not tested for now) but with the whole range everything is confusing to me.
Information about the type of game:
realtime multiplayer
for now I use TCP with Flatbuffer to communicate (TCP should be also fine here)
server is written in golang and for the client for testing I use libgdx (java), but would probably change to something else when I solved other questions
with server I mean where the logic is run server-side and the communication between the client to the database is made through the server
If you really want to avoid maintaining a server for your software, consider dockerizing your server software, and run it on AWS Fargate. It will not necessarily be cheaper than a dedicated server, but you will not have to maintain any infrastructure or OS.
Short anwser, no.
Serverless architectures doesn't work well with TCP, because of various reasons. The First one to be that FaaS is made to be short lived - opening a TCP connection with sockets would create a long live for the function, thus making its costs go high.
Second, BaaS usually has a delay of some microseconds, and also doesn't support TCP connections.
But you see, with BaaS you can develop a turn-based multiplayer game, because the delay isn't that critical on these types of applications.

How to see videos from a network stream(http)? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I was wondering: how does youtube or any other website containing videos, send such data to clients?
When using the web browser, and asking for a webpage, what happens is that the browser sends an HTTP GET request to the server, which returns the html page; but how does the video data get transferred?
Is it opened an additional connection to do that?
And, is there a way to capture this stream in a program using some software library?
What i want to achieve is something like the VLC's network stream feature, which allows you to watch videos from youtube, but i don't know where to start from.
Thanks
Youtube is primarily using MPEG DASH for video streaming. If you click on any Youtube video with the right mouse button and select stats for nerds you will see it:
HTTP based video streaming protocols like MPEG DASH, HLS, Smooth streaming, etc. have a manifest file which describes how the actual video data is structured (there is information like URLs to each media chunk, available representations, information about the bitrate of each representation etc.). The client first downloads this manifest, parses it, and starts downloading the segments. After each download the client measures the channel throughput. And based on this information makes a decision which chunk to download in the next request.
Using youtube-dl you can for example see which representations are available:
youtube-dl -F https://www.youtube.com/watch?v=b6u9WJ01Oxs
Together with curl you can also download the DASH manifest (MPD)
curl $(youtube-dl https://www.youtube.com/watch?v=GbHSMwc4eCA --youtube-include-dash-manifest --dump-intermediate-pages -s | grep manifest.google | cut -d ' ' -f 5) > dash_manifest.mpd
After downloading the MPD you can play it for example with GPACs Osmo4 (MP4Client). Or maybe even VLC (I'm not sure if the DASH plugin in VLC was updated since 2012).
Simplest protocol,
HTTP GET returns a video file with the proper mime type header.
As that's piracy prone and not really suitable for live streaming, some plugins use their own protocol, like rtmp, Or a protocol over HTTP, like HLS
To watch videos from youtube, you could check the youtube-dl project. Youtube is a moving target, so it requires lots of maintenance, and it's against their eula.

MITM with winpcap and/or sockets? - C++ [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
i am developing an MITM for windows. I am using winpcap. I did correctly the arp spoofing and the ip fordwarding to the victims of my network. The problem of winpcap is that you cant control the packets, you need sockets to do this.
With winpcap you read incoming packets, you filter them, change them and send to router ok, easy. The problem comes when you need to act as a server. For example, if we want to supplant an executable we need to serve our own exe. And we cant use sockets to serve our file to the victims because we are using winpcap, we must create all the packet and send it with pcap_sendpacket(), we must hear the victim responses, how?, the only way is waiting all incoming packets from all victims and from different protocols and to filter all searching our ACK, for all packets tcp in the download.
Is this way viable? Or shall i create a server in each sniffer port and to do this with sockets?. Mmmm ideas pls. What is better, and what would you do?
Thanks and sorry for my English :)
Regards!.
Yes, this is possible. Here are the steps that you need to take to do this successfully.
Identify an unused IP address on the subnet. If you try to use the address that is already bound you will be racing against and fighting the IP stack in the host OS. Since it knows nothing of the connections that you're managing/spoofing, it will send RST packets in reaction to almost every response packet that you receive (Note, I'm assuming that you're using TCP)
Select a MAC that you will use. You actually can use the same MAC as the host OS network stack, which will allow you to operate without actually putting the interface into promiscuous mode. The host OS will not interfere since the Layer 2 addresses will not match the host OS's knowledge of the Layer 2 address, but you will still have to supply ARP replies for your Layer 2 address when other host look for you.
Effectively, write your own IP stack. Yes, you will be responsible for calculating checksums, tracking session state and everything else.
A far easier approach that you seem to be resistant to is to use Scapy. Scapy abstracts much of this for you, allowing you to focus on the logic of what it is you're actually trying to do. For example, Scapy will take care of the checksums for you if you'd like it to.

How to test internet application at local computer (windows-7)? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
This application sends data periodically to a server. What I need to do is setup a testing environment on the local developing machine so that I can check the correct packets are being sent in each situation. I thought a good approach would be a server VM set up on the local computer which would receive the packets and respond just like the real thing, but the problem is how do I route the packets of an application running on windows to a VM machine. I don't want to modify my application code. I just want to have windows pass on the packets it receives from the application to the VM or otherwise another application that will do the testing. Is this possible? If not, please let me know about any other solution(s) to this problem.
If you're running a decent VM you should be able to give it an IP address visible from the host, and configure it so that you can run web servers on it, ssh to it, etc.
Look at the networking features of your VM. Or find a tutorial on how to do this, such as this one for VirtualBox:
http://www.tolaris.com/2009/03/05/using-host-networking-and-nat-with-virtualbox/
Well it's some kind of a hack but you can use ARP Poisoning (man in the middle attack) to sniff packets. There is a tool named Cain & Abel which can do this for you. I've used this tool to sniff packets between two non-pc machines. Use at your own risk and if your anti-virus tool alerts, know that the tool has no virus but what it does is detected as one.
Edit: Please note that my approach doesn't require a VM server.

Distinguishing file downloads from web-page requests at the network layer [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I'm using a packet sniffer on Windows. How do you tell the difference between a packet that is downloading a file and a packet that is loading a website or just navigating a website? I realise that http is not a packet and it's on top of a TCP packet but how would I do this? I'm new and certainly confused! I'm using C++ and Visual Studio 2010.
Assuming the 'file download' is a HTTP file download, not a SMB or FTP one (that is too easy of a question): the HTTP response of a file download may contain a content-disposition header.
There's no difference because they are exactly the same thing.
You can use Wireshark to analyse network traffic, and can apply protocol filters to view traffic by protocols.
However, protocol filters would not filter if data is a file or a page (as Seth mentioned they are the same thing)