As of 2016-02-26, there will be no more posts for this blog. s/blog/pba/
Showing posts with label streaming. Show all posts

I have been broadcasting my desktop for a couple of days, mainly because I would need to test my x11grabr. I recalled more than a year ago, I would need to set up things in order to get streaming out. ( You might be seeing a new box showing up at the end of this box, which would be telling you click on the play button! )


Note was shut down on August 5, 2014.

On you can grab the stream key in channel info page1, scroll down for Stream Key.

I am not going to bore you, so here is the script I am currently using:

# 2011-09-06T06:45:42Z



/path/to/x11grabr/x11grabr -s "$VIDEO_SIZE" -r "$FPS" -bnone |
ffmpeg -f rawvideo -pix_fmt bgra -s "$VIDEO_SIZE" -r "$FPS" -i - \
       -f alsa -ac 1 -ar 11025 -i pulse \
       -vcodec libx264 -vpre baseline \
       -acodec libmp3lame -ab 32k \
       -threads 0 \
       -f flv "$STREAM_URL"
       #-f alsa -ac 2 -ar 22050 -i pulse \
       #-acodec pcm_s16le \
       #-acodec libmp3lame -ab 64k \
       #-acodec aac -strict experimental -ab 64k \
       #-acodec aac -strict experimental \

I use 630x352 because it gives me pixel-to-pixel when viewing on I broadcast my desktop, so I dont like the image to be re-scaled. Also, you might want to use built-in x11grab in ffmpeg. So you may need to launch ffmpeg like (untested):

ffmpeg -f x11grab -pix_fmt bgra -s "$VIDEO_SIZE" -r "$FPS" -i :0.0 \
       # the rest of stuff

Note that I have submitted two patches, once they get released you would have better control.

1.1   IRC Chat webchat is pretty buggy, at least it doesnt like me much. I have seen message being eaten up, I thought why the other person kept talking to self. Another issue was funny, I had to turn off (uncheck) in order to show timestamp. But it seems fixed, right now.

If you use irssi, here is the simple configuration I have added:

servers = (
    address = "";
    chatnet = "jtvme";
    port = "6667";
    password = "<YOUR JTV PASSWORD>";
    use_ssl = "no";
    ssl_verify = "no";

chatnets = {
  jtvme = { type = "IRC"; };

channels = (
  { name = "#livibetter"; chatnet = "jtvme"; autojoin = "yes"; },

When I start broadcasting, I fire up irssi and issue /connect jtvme to connect to my own IRC channel.

If you dont have IRC client, currently stable Firefox allows you to open IRC via third-party website, its ehh, I forgot the name. Anyway, it has no problem to connect to JTVs IRC server. It took me sometime to Google correct information and pieced them up into my configuration.

1.2   Music

Streaming with music is always some vague issues. I love watching StarCraft II [SCII] channels and I have seen some complaints over some channels before, but right now it seems fine because those top-page popular channels play music via GrooveShark or YouTube. I dont know if its somewhat ignored by JTV. I dont believe those labels would let JTV off the hook.

At first, I didnt even have audio stream sent to JTV. I found its boring, so I started to play those music I downloaded from Jamendo before. I still didnt give them proper attribution, though I have put a recently played on channel page.

[SCII]Nope, I dont play, I just watch. I use Linux.

2   Ustream

As for Ustream, you need to download the FME XML file, search for <stream>, the string inside is your STREAM_KEY.


# Go Live -> Start Broadcasting


# flashver part is important
STREAM_URL="rtmp://$STREAM_KEY flashver=FMLE/3.0\20(compatible;\20FMSc/1.0)"

/path/to/x11grabr/x11grabr -s "$VIDEO_SIZE" -r "$FPS" -bnone |
ffmpeg -f rawvideo -pix_fmt bgra -s "$VIDEO_SIZE" -r "$FPS" -i - \
       -f alsa -ac 2 -ar 22050 -i pulse \
       -vcodec libx264 -vpre baseline \
       -acodec libmp3lame -ab 48k \
       -f flv "$STREAM_URL"
       # can use flv as well
       # -vcodec flv \
       #-b 1000 -vframes 500 \
       # -threads 0 \
       #-f alsa -ac 2 -ar 22050 -i pulse \
       # -acodec pcm_s16le \
       #-acodec libmp3lame -ab 32k \
       #-acodec libmp3lame -ab 64k \
       #-acodec aac -strict experimental -ab 64k \
       #-acodec aac -strict experimental -ab 32k \
       #-acodec aac -strict experimental \

3   Notes

I dont like broadcasting on Ustream, because it requires you to click on Start Broadcasting on the website and you need to keep the Flash on. Which we Linux users all know, Flash has not-so-good performance. If you know how to bypass it, please leave a comment. However, it has nice beginner controls of your stream, I think you can put on overlay text by using it.

And be careful for your stream key, ffmpeg might print out that URL, which would include your key. I think your can lower your log level, but I dont want to do that, read ffmpeg(1) if you need to.

[1] is gone, because is gone.

Warning is gone and some links and stuff have been removed from this post. (2015-12-05T01:09:17Z)

I have known for years, but only recently I started watching StarCraft II gaming streams. I was bored, no blogging, gotta find something else to kill time.

Just like every websites, the stream pages have too much stuff. When you just want to watch the stream and to chat, thats all. But you get a lot of stuff you dont need, that wastes browsers resource to keep them.

Yes, you can pop out the stream and chat. However, you dont want to pop them every time you want to watch. Why not just a simple URL, bookmark it, and you can get the stream and chat? Moreover, sometimes, I open two streams and one YouTube video from my subscriptions. I need something simple.

Therefore, I started writing this Clean Viewer, here is a screenshot to get you the idea of what I was thinking:

The viewer is seen at bottom right corner. My window manager is dwm, I switched to it only for a couple of days. The web browser is Firefox with Vimperator. Everything is as cleanly as possible. You dont see the window title bar because of dwm, you dont see space waster of browsers toolbars. The only unnecessary thing you can see is the statusline of Vimperator.


I discovered this channel Walking Home when I searched for cooking, its about a long walk from Arizona to Michigan. Its basically a 24/7 channel and a OK channel to use as an example. (There are many channels on, I dont feel OK) It might be boring for most of time, often interrupted due to poor connection, but you could see the real life. Real reality tv, not those scripted unscripted-claimed lame tv shows.

At first glance, it looks like a normal embed, move your mouse over below the logo, you should be able to see the controls.

I like the chat box overlays the video and I can hide the bottom bar to make the video as largely as possible.

I got few suggestions from one of my blog posts. I wasnt really testing them but only some of them.


Some sites are dead and links have been removed. (2015-12-05T01:00:39Z)

  • Grooveshark: I think this one is the best. You can edit your playlist, though that isnt easy to build a playlist with Groovesharks Flash interface in my opinion. The embedded code has only one Flashobject.
  • You can only embed one song only at a time.
  • My Flash Fetish: This seems to have lots of users. It has many different skins. You can decided if you want it autoplay or shuffle the songs. You need to sign up in order to get the code.
  • The Music Hutch
  • Gcast: This one seems to serve podcast shows, but I did see someone use this to play music.

Do you have any more suggestions? leave a comment!

THE US MILITARY has ordered YouTube off of its networks and has launched its own video-sharing Web site for troops, their families and supporters.

Since May 2007, the Defense Department banned employees and soldiers from accessing social not-fighting sites including Youtube and Myspace, citing security and bandwidth issues.

US builds Trooptube

I wonder if U.S. DoD employees watch videos on YouTube all day long? Or how would this involve bandwidth issue? If you already know American Army, then this TroopTube is really not a big thing to you.

Note was closed on 2011-07-31. (2015-07-11T05:48:14Z)

I first visited it to see if I can find a secret LOLcat solider, but for a visitor, you can only see few videos. So I signed up as civilian friend, however, I still see no lolcat.

This sign up form is quite interesting. We all are familiar the Captcha, but when its about the Military, you have change your jargon.

So, am I having the Level 1 Security Clearance? :)

Currently the video is limited to up to 5 minutes or 20 MB, you can also mark videos as private, but how would other people watch that? I see no option to add friends or foes :). You can also comment on videos.

I think normal Internet users will not use this website, but I am really bored, just want to check out.