Changes between Initial Version and Version 1 of StreamDesktop


Ignore:
Timestamp:
May 30, 2014, 9:08:46 PM (11 years ago)
Author:
https://id.mayfirst.org/kosa
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • StreamDesktop

    v1 v1  
     1You might need to stream everything happening in you desktop (as if you want others to be able to watch a videoconference going on live.mayfirst.org wothout them being on the room) and here's an easy way to do it with a single command line (3 commands being piped all together).
     2
     3You would need to use a Debian based distro and install these packages:
     4
     5aptitude install  ffmpeg2theora ffmpeg avconv pulseaudio-utils
     6
     7Then you need to find out what's the output name of you soundcard (as you want to stream what's coming out from your soundcard, not what's going in through your mic) and you can do it this way:
     8
     9
     10{{{
     11pactl list sources |grep alsa_output
     12
     13}}}
     14
     15You might directly store the output in a variable so you can use it later. Like this:
     16
     17
     18{{{
     19export SONIDO=$(pactl list sources |awk '/Name:/ {print $2;exit}'
     20
     21}}}
     22
     23You also need to get the size of you screen with this one:
     24
     25
     26{{{
     27xdpyinfo | awk '/dimensions:/ { print $2; exit }'
     28
     29}}}
     30
     31and you might want to store that in a variable too. Like this:
     32
     33
     34{{{
     35export PANTALLA=$(xdpyinfo | awk '/dimensions:/ { print $2; exit }'
     36
     37}}}
     38
     39Finally, you can run this command using the variables you have created already:
     40
     41
     42{{{
     43avconv  -f pulse -i $SONIDO -f x11grab -s $PANTALLA -r 29 -i :0.0 -target pal-dv -y - |\
     44ffmpeg2theora - -f dv -F 25:5 --speedlevel 0 --width 360 --height 240 -v 4 -a 1 -c 1 -H 9600 -o - |\
     45oggfwd   -n 'NOMBRE' -g 'GENERO' -d 'DESCRIPCION' toussaint.mayfirst.org 8000 source /stream-de-prueba.ogv
     46}}}
     47
     48Please notice you can set the name, genre, and description by replacing the words in CAPITALS. You can also replace the '/stream-de-prueba.ogv' for the right name for your stream and watch it here:
     49
     50http://a.stream.mayfirst.org:8000/stream-de-prueba.ogv