4

I was having some difficulty with running a Live Screencast under Linux. I've found jtvlc and tried using that, but whenever I use it the stream comes out either blank or lagged with extremely high latency. I have a fast internet connection and a fast computer, but am I perhaps taxing it too much?

Any ideas on what I could possibly be doing wrong?

# 1. Get an account on http://www.justin.tv/
# 2. Copy streaming key from: http://www.justin.tv/broadcast/adv_other
# 2. Install VLC: http://www.videolan.org/vlc/
# 3. Get Win/Mac/Lin Stream Client: \
# http://apiwiki.justin.tv/mediawiki/index.php/Linux_Broadcasting_API
# 4. Adjust the vlc parameters to your liking and run VLC like this

#!/bin/bash
cvlc screen:// --input-slave=pulse:// \
    --screen-width 1920 \
    --screen-height 1080 \
    --screen-fps 5 \
    -v input_stream \
    --sout='#duplicate{ dst="transcode{ scale=1, venc=x264{ keyint=60 }, vcodec=h264, vb=600, acodec=mp4a, ab=32, channels=2, samplerate=22050 } :rtp{dst=127.0.0.1,port=1234,sdp=file:///tmp/vlc.sdp} "}' \
    --sout-transcode-threads=4 & sleep 2

# 5. Run JTVLC to stream like this:
./jtvlc/jtvlc omnipotententity censored /tmp/vlc.sdp

# Notes:
#- If you want to see what you're about to stream add 'dst=display, '
# before 'dst="transcode['
# More about the VLC parameters: http://wiki.videolan.org/Documentation:Modules/screen

Update:

I've fixed my issue... for the most part. I was trying to put too much information through my upstream. I've since reduced my resolution and used the crf option for x264.

Now my script lookes like this:

# 1. Get an account on http://www.justin.tv/
# 2. Copy streaming key from: http://www.justin.tv/broadcast/adv_other
# 2. Install VLC: http://www.videolan.org/vlc/
# 3. Get Win/Mac/Lin Stream Client: \
# http://apiwiki.justin.tv/mediawiki/index.php/Linux_Broadcasting_API
# 4. Adjust the vlc parameters to your liking and run VLC like this

#!/bin/bash
cvlc screen:// --input-slave=pulse:// \
    --screen-width 1920 \
    --screen-height 1080 \
    --screen-fps 5 \
    -v input_stream \
    --sout='#duplicate{ dst="transcode{ scale=1, width=1280, height=720, venc=x264{ keyint=60, crf=35 }, vcodec=h264, acodec=mp4a, ab=32, channels=2, samplerate=22050 } :rtp{dst=127.0.0.1,port=1234,sdp=file:///tmp/vlc.sdp} "}' \
    --sout-transcode-threads=4 & sleep 2

# 5. Run JTVLC to stream like this:
./jtvlc/jtvlc omnipotententity redacted /tmp/vlc.sdp

# Notes:
#- If you want to see what you're about to stream add 'dst=display, '
# before 'dst="transcode['
# More about the VLC parameters: http://wiki.videolan.org/Documentation:Modules/screen

That being said, I still do have a few problems. Sometimes when I change the stuff on the screen a bunch it fails to encode properly. Which is odd, because screencasting through Skype 4.0 works just fine. So there's still a few kinks to work out.

I'm leaving the bounty open and I'm actively trying things mentioned. I'll still assign the bounty, even though I self-resolved.

OmnipotentEntity
  • 1,632
  • 17
  • 23

3 Answers3

3

This is probably a shot in the dark but I have a feeling that

--screen-fps 5 \

should be the problem. try to change 5 to a higher value like 50 and see what happens.

Nima
  • 1,648
0

Another product that you can try :

WebcamStudio For GNU/Linux

harrymc
  • 498,455
0

Try this..!

# 1. Get an account on http://www.justin.tv/
# 2. Copy streaming key from: http://www.justin.tv/broadcast/adv_other
# 2. Install VLC: http://www.videolan.org/vlc/
# 3. Get Win/Mac/Lin Stream Client: \
#    http://apiwiki.justin.tv/mediawiki/index.php/Linux_Broadcasting_API
# 4. Adjust the vlc parameters to your liking and run VLC like this

#!/bin/bash
cvlc screen:// \
    --screen-width 1576 \
    --screen-height 886 \
    --screen-fps 5 \
    --screen-caching 200 \
    --screen-top 75 \
    -v input_stream \
    --sout='#duplicate{ dst="transcode{ scale=1, width=630, height=354, venc=x264{ keyint=60 }, codec=h264, vb=600, acodec=mp4a, ab=32, channels=2, samplerate=22050 } :rtp{dst=127.0.0.1,port=1234,sdp=file:///tmp/vlc.sdp} "}' \
    --sout-transcode-threads=2 &

# 5. Run JTVLC to stream like this:
jtvlc justintvusername streamkey /tmp/vlc.sdp

# Notes:
#- If you want to see what you're about to stream add 'dst=display, '
# before 'dst="transcode['
# More about the VLC parameters: http://wiki.videolan.org/Documentation:Modules/screen

If that doesn't works you can try Live Desktop Streaming via DLNA on GNU/Linux.