Restreaming video from XSplit to multiple JustinTV/TwitchTV channels in different resolutions and bitrates - live

I have a really simple question but the answer may be a little more complex I guess.
Okay. Let's go. I have an Application called Xsplit Broadcaster (http://www.xsplit.com/). It supports streaming video through RTMP. Now what I want to do is this:
+--(720p)--> TwitchTV FirstChannel
XSplit --(720p RTMP)-->[MyTranscodingServer]--+
+--(360p)--> TwitchTV SecondChannel
Is there a simple way to do this?
Additional info: Both channels accept standard RTMP stream on their RTMP endpoint using either username/password or streamkey. The server operating system is GNU/Linux

Yes answer is a bit more complex. The simplest way to do this is to use Gstreamer www.gstreamer.net to do the above. It will recieve rtmp and then you can transcode it off to two other formats. However you do have to learn gstreamer a bit if you don't know it.
Another option would be ffmpeg where you read the source duplicate it (say into named pipes) and run two ffmpeg for two outputs.
Both methods will work. gstreamer will allow you to write your own application which can give you more control in the future. ffmpeg is equally powerful (gstreamer uses ffmpeg for a lot of operation) but as I said before gst applications will give more flexibility (if you need it) in the future. However you can get the first version running off the command line.
Something like this should work for gstreamer: [you have to find the exact pipeline you need. This is just a guideline]
gst-launch rtmpsrc <options> ! decodebin2 name=d ! tee name=vt ! queue ! x264enc <options> ! flvmux name=m1 ! rtmpsink d. ! tee name=at ! faac <options> ! m1. vt. ! queue ! x264enc <otheroptions> ! flvmux name=m2 ! rtmpsink at. ! queue ! faac <otheroptions> m2.
FFmpeg cmd line should be something like:
ffmpeg -i rtmp://src -acodec aac <audio options> -vcodec libx264 <video options> -f flv rtmp://output
But I am not 100% sure whether it will give rtmp output directly like that.Perhaps you may have to use ffserver if it doesn't.

Related

Powershell ffmpeg

I am successfully u sing ffmpeg via powershell to compress video files, however I can't get the compression to occur in a single location, I only have success when I make separate inputs and outputs.
For example, this command will be successful:
ffmpeg -y -i \\path\$x -vf scale=1920:1080 \\diff_path\$x
this will not do anyhting or will corrupt the file:
ffmpeg -y -i \\path\$x -vf scale=1920:1080 \\path\$x
I think I understand why this doesn't work, but I'm having a hard time finding a solution. I want the script to address a file and compress it in it's current location, leaving only a single compressed video file.
Thanks all
Not possible. Not the answer you want, but FFmpeg is not able to perform in-place file editing, which means it has to make a new output file.

Passing a captured binary file through snort

Is it possible to pass pre-captured binary files through snort for analysis (with flagging or detection as the ultimate goal)?
You can use -r option for that

Silencing "guessed channel layout" for FFmpeg

Does anyone know what parameters I can run FFmpeg under to silence console messages about guessing channel layouts for input streams?
That message is a warning. To suppress all warnings, the loglevel should be < 24, so e.g. ffmpeg -v 16 -i in.wav out.mp3.
You can also disable performing the action of guessing (not just its announcement) by the input option of -guess_layout_max i.e. ffmpeg -guess_layout_max 0 -i in.wav out.mp3. The issue with this is that the output won't be flagged with a channel layout. You can correct this by explicitly setting output channels option -ac N where N is the number of channels in the output.

How to check whether mplayer plays a file or not?

I am trying to check if mplayer is playing an mp3 file. I currently use this line from python
strace -p " + str(mplayer.pid) + " 2>&1 | head -n 200 | grep 'read(3'
That is because I know that mplayer makes system calls when reading file from descriptor number 3. However, no matter how many lines I analyze, there is not a single reading operation.
I only know of one reliable way to determining whether MPlayer is playing something, and that is by running it as slave and reading its ASCII pipe continuously.
Watching text occurrences in that pipe of media data not found, Failed to open or STARTING PLAYBACK and whether the process has quit (it is done playing).

How can I view output of tshark -V via Wireshark or similar?

Recently updated my Wireshark on a server, and lost the ability to use -R and -w from the CLI. Since I'm tracing SIP and RTP calls, I need to use -R and not -f.
I found out using -V is very useful (shows the packet tree on screen) and then I can redirect the output to a file. Unfortunately I'm not able to open that file through Wireshark to view properly (contains too muh text to easily scroll through).
I tried using -x t add the hex dump (removed -V), but still that is not openable through Wireshark when copying the text file to my PC.
Any ideas how I can trace using -R (with or without -V), copy the file to my PC and still be able to read it through Wireshark? I don't have issues to convert the file to a readable format.. Just need anything to view the files and share them :)
Thanks all,
//M