How to Icecast

To watch content on the sup/tg/ stream, you'll need to point your media player of choice to:

http://vps.thisisnotatrueending.com:8000/listen.nsv

Recommended viewing applications:

While most modern media players support streaming, the nightly VLC build and PotPlayer are both tested to work with embedded subtitles in streams, when available, as well as .nsv, .ogv, and .webm video formats.

Troubleshooting

The audio's just slightly too late or too soon for the video. (File desync)

If this happens, the encoding was done incorrectly. If you use VLC, you can adjust the audio delay with the k and j keys; often as little as a +/-50ms delay will fix the issue. If it continues to drift, you can simply keep adjusting. (The other applications likely feature this as well.)

The stream is stuttering, but no one else seems to be having a problem. (Connection desync)

The streamer's bandwidth may be shoddy, or an occasional hiccup will occur that can cause the stream to lag out. In these cases, the streamer usually can't do anything about it; it's best to try restarting your stream (Stop and Play) and see if that fixes the issue. (The streamer should also ensure no other applications are using the bandwidth, such as torrents, downloads or even web browsing during the movie.)

Streaming Audio or Video

To make a very long story short, after a multitude of different solutions, ffmpeg is the best and most trustworthy encoding and streaming method to date. The following instructions will make heavy use of ffmpeg to convert a given video file into an appropriate format, then broadcast it to a compatible server, such as Icecast.

Encoding

There are many factors to consider when transcoding media from one format to another; the following example will be using the settings I found most appropriate for my needs, but the extensive ffmpeg documentation should help you determine what values to use when doing it yourself. I'll briefly note the flags as they're invoked.

./ffmpeg.exe -i "/path/to/source.ext" \                                       # input
     -c:v libvpx \                                                            # VP8 video codec, used by webm
     -quality good -b:v 400k -qmin 10 -qmax 40 -maxrate 400k -bufsize 800k \  # quality
     -threads 4 \                                                             # video processing speed
     -vf scale=640:-1 \                                                       # apply filter to force resolution to 640x___
     -an -pass 1 -passlogfile "/path/to/firstpass.log" \                      # disable audio for first pass of encode
     -f webm "/path/to/output_firstpass";                                     # output container webm
 
./ffmpeg.exe -i "/path/to/source.ext" -i "/path/to/subs.srt" \                # input, with subs (must be .srt)
     -c:v libvpx \                                                            # VP8 video codec, used by webm
     -quality good -b:v 400k -qmin 10 -qmax 40 -maxrate 400k -bufsize 800k \  # quality
     -threads 4 \                                                             # video processing speed
     -vf scale=640:-1 \                                                       # apply filter to force resolution to 640x___
     -c:a libvorbis \                                                         # Vorbis audio codec, used by webm
     -pass 2 -passlogfile "/path/to/firstpass.log" \                          # perform second pass
     -f webm "/path/to/output.webm"                                           # output container webm

These settings will produce a .webm of decent quality while minimizing filesize. If you include subtitles, they will be embedded into the .webm itself, and can be accessed during a stream by supporting clients (see above).

To stream to an Icecast server or similar broadcasting service:

./ffmpeg.exe -re -i "/path/to/source.webm" \        # stream ('RE'ad) input to target
     -c copy -f webm -content_type video/webm \     # set file container, copy all video/audio
     icecast://<user>:<pass>@<server>:<port>/<mountpoint>; # target

 

Site code and contents © 2007-2024 thisisnotatrueending.com. All rights reserved. Click here for legal information.
If you are under the age of 18, please leave this site immediately. Asshole.