zzz.i2p

Development discussions
How to test UDP Streaming Audio « Quick Hints, Tricks, and Howtos « I2P Help, Hints, Advice
 
Sun, 30 Nov 2008, 08:40pm #1
zzz
Administrator
Zzz

UPDATE - NOW IN I2PTUNNEL - SEE Feb. 26 post below.

Prerequisites: Java SDK, ant, mtn, and VLC or other audio player supporting UDP input streams (winamp should work with the right plugin). Uses 'streamr' by welterde, but I made some backward-incompatible tweaks to it so get the latest from mtn.

- Get latest i2p.streamr from mtn
- Copy example.config.sdl to config.sdl; comment out the "bar" portion (producer); edit the "remote" line in the "foo" portion to put in the key for streamr.zzz.i2p (get it here )
- cd lib; ln -s $I2P/lib/i2p.jar
- Ask me on #i2p if streamr.zzz.i2p is up.
- ant run. You will see the new destination on your router console. You will see some 'pw' debug output. If streamr.zzz.i2p is up, you should see a lot of 'r' debug output.
- Start VLC
- Increase input buffer: Tools->Preferences->(Show all settings)->Input/Codecs->Access modules->UDP, change from 300 to 10000 ms
- Media->Open Network, Protocol UDP, leave address blank, Port 1234. Click Play. Wait 10 seconds for the buffer and you should hear something.

See also http://forum.i2p/viewtopic.php?t=2665 .

Last edited: Fri, 27 Feb 2009, 09:45pm by zzz

Sun, 30 Nov 2008, 08:57pm #2
zzz
Administrator
Zzz

How to host a stream
--------------------
UPDATE - NOW IN I2PTUNNEL - SEE Feb. 26 post below.

Prerequisites: as above.

- Create low bitrate content. I could not figure out how to make VLC transcode correctly to a bitrate lower than 64kb, or mono, no matter what the setting is. 24, 32, and 48 kb seem to be the sweet spots. Too low and packet drops lead to big dropouts in the audio. Too high and you get massive packet drops. I made mono files with 'lame -b 32 -m m in.mp3 out.mp3'.

- Edit the 'bar' portion of config.sdl as necessary.

- Stream a file in VLC with Media->Streaming, pick a file, click Stream. Then select RTP and Prefer UDP over RTP. Leave RTP address blank. Set UDP-over-RTP address to localhost. Set the UDP-over-RTP port to the port in config.sdl. Under Profile, pick Custom, with RAW encapsulation, Video codec unchecked, Audio Codec MP3, with the bitrate that matches the bitrate of your file, 1 Channel. Click Stream. Can't figure out how to stream a playlist yet.

- ant run if you haven't already. You should see a lot of 'i' debug output. If a client connects you will also see 'r' debug output.

Last edited: Fri, 27 Feb 2009, 09:46pm by zzz

Sat, 13 Dec 2008, 09:38am #3
Simba
Lurker

Do you mean to be enough fast it for Mumble (http://mumble.sourceforge.net/) could?

Sun, 14 Dec 2008, 01:43pm #4
zzz
Administrator
Zzz

Don't know - try it

Sun, 14 Dec 2008, 02:50pm #5
Simba
Lurker

I have the mtn 0.6.5-4 from echelon.i2p but I don't find i2p.streamr.
What mine here mtn or where can I download the package?

Sun, 14 Dec 2008, 03:06pm #6
zzz
Administrator
Zzz

it's in a separate branch. see prerequisites and instructions ^^^ above ^^^

Wed, 21 Jan 2009, 09:58pm #7
zzz
Administrator
Zzz

For a microphone source:

Capture device->video device name: None (!), audio device name: Default

Encapsulation: WAV

Fri, 27 Feb 2009, 09:49pm #8
zzz
Administrator
Zzz

UPDATE - Streamr pointed to I2PTunnel as of 0.7-7. mtn i2p.streamr no longer required.

Create a Streamr Client or Streamr Server in I2PTunnel, configure the host and port, and start. Then follow VLC instructions above for client or server.

Thanks to welterde for the original code and for agreeing to the port to I2PTunnel. The code will also be a base for SOCKS UDP support.

Sat, 18 Feb 2012, 11:38pm #9
zzz
Administrator
Zzz

Results of tests today:

Client side: Use Streamr client tunnel pointing to localhost 1234. In VLC, Media-Streaming, udp://@:1234

Server side: Use Streamr server tunnel. In VLC:
Media-Streaming, set file name, click Stream, ...

Sat, 18 Feb 2012, 11:45pm #10
zzz
Administrator
Zzz

bugs on i2ptunnel index page:

- server doesn't show b32 address
- client stays on yellow star

other bugs:

- stops sometimes and have to restart the client tunnel
- packet loss

Try other encapsulations, perhaps that have FEC?

Sun, 19 Feb 2012, 12:37am #11
KillYourTV
I2P Legend
Resume

2nd example for Client side after creating the client tunnel (worked OK):

mplayer udp://:portnumber -cache 1024

Sun, 19 Feb 2012, 07:33pm #12
quest
Contributor

zzz wrote:

Try other encapsulations, perhaps that have FEC?

plain FEC is suitable mostly for single bit errors in the bitstream. It doesn't tolerate loads of "blanking", or "erasures" (which is, the packet loss). You have to apply FEC + interleaving at least twice to a bunch of packets to tolerate blanking. And FEC encoding/decoding is heavily CPU-intensive (calculations within Galois field) so, FEC is usually implemented in hardware.
And if you wish to go for FEC, you should consider reading about BCH, LDPC, Turbo-codes and other CCSDS proposals (which is the origin for most of FEC algorithms).

I've tried MultiPAR, IceECC, RSC32 for doing FEC on CPU, the speed is mostly horrible. Your milage may vary.

Another approach is to send the same packet more than once, but that might be even worse for the i2p net.

And I'm wondering, is there any way to implement some sort of a multicast streaming in the net?

Sun, 19 Feb 2012, 08:04pm #13
zzz
Administrator
Zzz

thx for the info.

We do have a very old proposal to do multicasting at the OBEP to multiple IBGWs. It would be tricky to implement.

Mon, 20 Feb 2012, 10:14pm #14
zzz
Administrator
Zzz

zzz wrote:

bugs on i2ptunnel index page:

- server doesn't show b32 address
- client stays on yellow star

Fixed in 0.8.12-16-rc

Sun, 17 May 2020, 09:25pm #15
zzz
Administrator
Zzz

I resurrected the 12 year old streamr.zzz.i2p to test ratchet.

To test:

- Make sure you have streamr.zzz.i2p in your addressbook. If not, either try to go to it in your browser, use the stats.i2p jump service, and save it in your addressbook (there's not actually a webserver there, that's ok) - or, just use o7wxtjvmlggwbbza4ld2cvlchzcnj4fmuwrwhcdyb2bydcsiyhma.b32.i2p below.

- Create streamr client tunnel in hidden services manager:
Port: 1234
Tunnel Destination: streamr.zzz.i2p or
o7wxtjvmlggwbbza4ld2cvlchzcnj4fmuwrwhcdyb2bydcsiyhma.b32.i2p
Encryption type: ECIES-X25519 (Experts only!)
Save

- Open vlc media player. Media -> Open Network Stream. enter Network URL: rtp://@:1234 and click Play.

- Start streamr client tunnel

- Should start hearing the stream after a few seconds to a minute.

To stop, please close the client tunnel (not just VLC), to save me the bandwidth.

Tue, 19 May 2020, 10:42pm #16
ReturningNovice
I2P Legend
Sitelogo

If the I2PRouter is not on the same machine as the VLC player, what changes are needed?

Wed, 20 May 2020, 11:36am #17
zzz
Administrator
Zzz

On streamr client config, change target->host to the IP of the machine VLC player is on

Thu, 21 May 2020, 01:28am #18
ReturningNovice
I2P Legend
Sitelogo

oh derp! I should've figured that out myself. LOL