Static_header_rounded_top

Friday, December 21, 2007

New social features and viewer profiles!

We've been working really hard for the past two weeks on enhancing the site with social features that our users have been requesting for months, and are finally ready to release them today. Now, as a Justin.tv user, you can:

  • Create a customizable viewer profile
  • Add broadcasters you like to your favorites
  • Find friends on Justin.tv and be friends with them!
  • Send private messages to other users
  • See what people are watching on their profiles
  • Import your existing contacts from your web-mail account
You can get to any viewers profile by going to www.justin.tv/username/profile. Here is mine. Other viewers can friend you from your profile, and you can friend other users by finding their profiles or by clicking on them in chat.

Hope you enjoy the new features! They guys wanted to have a contest to see who in the office would get the most friends, but I've hacked the system so that everyone is automatically friends with Justin :)

Happy Holidays!

Broadcasting Your Desktop

We're commonly asked the question "how do I broadcast things on my desktop on Justin.tv?"

There are two answers, both simple.

Webcam Software:

Using the type of software outlined in this guide titled "Adding Cool Effects to Your Broadcast," you can select "Desktop" either as your primary video source or picture-in-picture video source, useful for virtual kissing. Most programs allow you to capture your entire desktop, or select a specific window you want to broadcast live.

Capture Cards:

Discussed in this guide titled "Broadcasting Live From Your TV," video capture cards can do more than record an external component video source. If you are planning to broadcast a live videogame or clan match, I recommend using a hardware capture solution to reduce lag. These cards can capture your entire desktop which Justin.tv can recognize as a video source provided the proper software is installed.

Happy Holidays from Justin.tv!

Sent to us by Anthony of justin.tv/quintano_media, here's a suitably ridiculous holiday greeting from the Justin.tv team.

I definitely should have provided a better picture.

Thursday, December 20, 2007

Kiss Me and I'll Kiss You Back

Check out these Justin.tv search results for "virtual kiss."

Apparently a new fad spreading around the network is giving your favorite broadcaster a germ-free "virtual kiss." Using a picture in picture program like the ones described here, Arnaud of fromparistv is spreading his affection around Justin.tv.

If you line the video frame up just right I hear he's a pretty good kisser, though I'm not about to verify that.


Watch live video from fromparis on Justin.tv

Wednesday, December 19, 2007

Justin.tv network - now faster than ever!

I'm a big fan of monitoring - writing programs to check up on how well other programs are working. So the past couple of weeks that's been mostly what I've been doing. Hopefully you've been noticing our quality-of-service rising as various problems get found and fixed.

Some of the problems I found seemed to be network-related, and I narrowed them down to our hardware. Luckily a similar experience at a previous company made me quickly suspect a pair of daisy-chained Dell network switches were no longer up to the job of scaling with Justin.tv!

Kyle quickly got hold of a very nice HP switch, which we installed today, and it's now powering the site at record speeds!

Friday, December 14, 2007

The Charity Challenger

Some of you may know Norah, you may have even seen her around the site. She's starting a channel tomorrow morning called the Charity Challenger. She'll be completing your your challenges live in exchange for donations to the charity of the day (starting with Make a Wish tomorrow at 10AM Pacific).

There's a lot more to say about her plan but I can't really tell you better than she can. Thus, go check her JTV blog for a great summary of her motivation!

If you get a chance to stop by, offer her some support or just laugh at her many fears :D

the charity challenger

P.S. If you are able to make a donation, dont forget to send verification of your contribution to charity.challenger@justin.tv for your chance to win a t-shirt just like the one pictured above!

Thursday, December 13, 2007

New Justin.tv "I'm watching" widget

I came up with the idea for our new "I'm watching" widget one evening a few days ago and couldn't rest until I'd finished it. Jacob did some awesome design work, and we got the project done in record time.

You can embed the widget anywhere that allows you to add HTML code, and it will tell people what you're watching right now on justin.tv (so long as you're logged in). For example, here's what I'm watching right now:



Whenever you're not logged in to justin.tv, the widget will just say "I watch justin.tv".

Update: There's now also a vertical-style embed, which looks like this:



To make your own embed, just use this simple form.

Wednesday, December 12, 2007

Music on Justin.tv



Whether it be live fan chats, live shows, touring on the road, exclusive backstage access, in-studio recording sessions, interviews, ticket giveaways or promotional contests, live video is a great way for fans to connect to their favorite recording artists. Check out all the amazing studios and bands that are broadcasting live on Justin.tv.

Want your band to be featured?
Please fill out the artist request form at the bottom of this page!

Artists:



Jonas Brothers
Teen Rock group from New Jersey
www.justin.tv/jonasbrothers
Meixco Fan Channel: http://www.justin.tv/jonasbrothersmexico
myspace
Label: Hollywood Records



P.O.D.

Rock band from San Diego
www.justin.tv/payableondeath
myspace
Label: INO/Columbia Records



Hadouken!
Grindie Rock band from the UK
www.justin.tv/hadouken
myspace
Label: Atlantic Records



Scissors For Lefty
Alternative Rock band from San Francisco
www.justin.tv/scissorsforlefty
myspace
Label: Eenie Meenie



Offical Push Play
Pop-rock band from New York
www.justin.tv/officialpushplay
myspace
Label: Unsigned



Killola

Rock band from Los Angeles
www.justin.tv/killola

myspace

Label: Unsigned



The High Strung
Rock band from Detroit
www.justin.tv/thehighstrung
myspace
Label: Park The Van




The Teeth
Alternative Rock band from Philadelphia
www.justin.tv/theteeth
myspace
Label: Park The Van



Chris Young
Rapper/Freestyler from San Diego
www.justin.tv/chrisyoung
myspace
Label: StoneQuest



Pigeon John
Hip Hop Artist from Los Angeles
www.justin.tv/pigeonjohn
myspace
Label: Quannum Projects



Your Favorite Enemies
Rock Band from Montreal
www.justin.tv/yfe_tv
myspace
Label: Unsigned



The Ruse
Indie Rock band from Los Angeles
www.justin.tv/theruse
myspace
Label: Unsigned



Cheryl Hill
Rock band from Austin
www.justin.tv/cherylhill
myspace
Label: Unsigned



Anthony Renzulli Band
Alternative rock band from New jersey
http://www.justin.tv/arband
myspace
Label: Unsigned



Karisa Nowak
Singer/Songwriter from New York
www.justin.tv/karisanowak
myspace
Label: Unsigned



Jon Valenti
Singer/Songwriter from Modesto
www.justin.tv/jon_valenti
myspace
Label: Unsigned



Timothy Daniel
Singer/Songwriter from New York
www.justin.tv/timothydaniel
myspace
Label: Unsigned

Studios:



Daytrotter.com
www.justin.tv/daytrotter
Daytrotter is a live recording studio based in Iowa. They invited indie artists to come through for special recording sessions, and the tracks are posted to Daytrotter.com. The sessions are also broadcast live, as well as interactive Q&A sessions between fans and artists such as Maritime, the Walkmen, and the High Strung.



EQ.tv
www.justin.tv/eqtv
EQ.tv is a growing network of people who are passionate about music and sustainability. They broadcast live music performances and artist interviews, as well as daily morning talk shows.




Powered by Wufoo

Tuesday, December 11, 2007

Video System Upgrades

I recently discovered a defect in our video server code which was causing some servers to use up 100% of CPU cycles. On Friday we released an update to address this issue which dramatically improved our quality of service and the maximum number of viewers who can watch your channel. Here's a little chart of CPU usage over time, which shows the big drop on Friday:


You probably won't notice a big difference (unless you have 1000+ viewers on your channel), but rest assured we'll be ready when you become the lonelygirl15 of Justin.tv!

Saturday, December 08, 2007

Job Post: Software Intern

There are a lot of pieces that fit together to make Justin.tv work: our video cluster, IRC server, our web app, and our monitoring and search services, to name a few. We're looking for talented engineering interns who want to improve these things and build more.

Responsibilities
  • Contribute to product design and implementation discussions
  • Implement projects from the idea phase to production
  • Test and iterate code before and after production release

Qualifications

  • We like dynamic languages. You should too. A lot of the things we build are in Twisted or Rails.
  • Experience building web applications is a plus.
  • A strong desire to work on website with passionate users and ideas for how to improve it.

Apply

Justin.tv is an equal opportunity employer. All positions are based in San Francisco, CA. To apply please email jobs [at] justin.tv a plaintext resume or just a list of programs built or websites worked on and your academic credentials. Things we can see and play around with online are a plus. You should also send us an answer to our test problem. You can use any language you like.

Internships are available throughout the year, and can turn into full time offers when you are done with school.

Job Post: Flash/Flex Engineer

Justin.tv is the biggest live video site online. We serve hundreds of thousands of video streams a day, and have supported up to 50k live concurrent viewers. Our site is growing every week, and we just added a 10 gbps line to our colo. Our unique visitors are up 900% since January.

There are a lot of pieces that fit together to make Justin.tv work: our video cluster, IRC server, our web app, and our monitoring and search services, to name a few. A lot of our website is dependent on Flash, and we're looking for talented Flash Engineers who know AS2 and AS3 very well who want to be leaders in the development of our Flash.

Responsibilities

  • Contribute to product design and implementation discussions
  • Implement projects from the idea phase to production
  • Test and iterate code before and after production release

Qualifications

  • You should know AS2, AS3, and maybe a little be of Flex.
  • Experience building web applications.
  • A strong desire to work on website with passionate users and ideas for how to improve it.
  • Experience hacking video streams, python, Twisted or rails all a plus.
While we're growing rapidly, Justin.tv is still a small, technology focused company, built by hackers for hackers. Seven of our ten person team are engineers or designers. We believe in rapid development, and push out new code releases every week. We're based in a beautiful office in the SOMA district of SF, one block from the caltrain station. If you want a fun job hacking on code that will touch a lot of people, JTV is for you.

Note: You must be physically present in SF to work for JTV. Completing the technical problem at http://www.justin.tv/problems/bml will go a long way with us. Cheers!

Wednesday, December 05, 2007

Schedule Improvements!

We've spent the past few days working on an improved schedule feature. Improvements include:

  • Combined schedule page (we ripped this off of TV guides across the world)
  • Subscription and reminder emails for events. Viewers can now sign up to get emailed when an event is going to happen!
  • Automatic highlight creation. Highlights for events will now be created after the event occurs automatically for broadcasters.
Hope you guys like these features! We've also revised and reorganized the blog, adding a section for broadcasting guides. Check it out, or submit your own!

Archive Deletion Tool

In the last rollout we included the ability to delete a time range of archives from your channel.

To access this feature, click "Browse Archives" on your channel page and at the bottom there is a link "Need to delete some of your video? Use the archive delete tool."

Clicking there allows you to specify a time range to delete!

Tuesday, December 04, 2007

Broadcasting Live From Your TV (& Other Video Sources)

This guide will explain how to broadcast video sources other than your basic webcam or camcorder, such as game consoles, your TV set, or other RCA video components.

This is a popular request among broadcasters who see channels like Gamer Girl's where she broadcasts a screen capture of a videogame while also running a picture-in-picture camera of her playing.

The primary component required in broadcasting different video sources is a video capture card.

Capture cards come in different flavors. There are internal PC capture cards which are also used as TV tuner cards. These can be installed in your computer and then selected as a new video source in Justin.tv's broadcast window or by 3rd party webcam programs which I covered in this guide.

There are also external USB capture cards useful for laptops and Macs.

Different cards come with different software and abilities, but some popular manufacturers include ATI, AverMedia, Hauppauge, and Pinncale.

Most manufactures make both internal and external USB capture devices.


Dazzle, a USB Capture Card made for Mac by Pinnacle



The AverTV Purity 3D internal TV Tuner/Capture Card by AverMedia


When used in combination with webcam programs allowing picture-in-picture, having a capture card to add another camera or video source is a great way to enhance your broadcast!

Unintended consequences

Author: Emmett

We recently decided to add events on Justin.tv to search as part of the enhanced site-wide schedule we're working on.

We thought that adding something to search would just require couple pieces of work. We need a new template for the type of search result, and then we need to add events to our search index. Shouldn't be more than a 30 minute project, all told.

Of course, as I begin implementing it, I immediately notice a complication: every other kind of searchable item on Justin.tv can be sorted by page views, in addition to newness and best text match. So now we have to decide whether to either:

  • Special case the sort code and remove the page view sort for events
  • Add a page views counter for events, requiring a small change to the database schema and a small amount of code in several places. [1]
Neither of these options is particularly difficult, but only because we got lucky and the original change was small as well. We decided to add the counter, if only to satisfy our own OCD. The "just a template" change winds up touching 6 or 7 different parts of the site. This is not a fluke, it's typical. New features nearly always require changes you would never have dreamed of prior to implementation.

This is why second system syndrome is so hard to avoid: It's like invading Vietnam or Iraq. At first everything seems perfectly fine, but the deeper in you get the more unforseen complications emerge. Eventually you find yourself under fire from all directions, and you just want to get it over with before you bleed out any worse than you already are.

[1] As a side note, this is why standard databases suck: part of the reason I want to avoid adding a page view counter to events is that it's going to require making a schema change. Of course, I could create a page_views table that solves the problem generically, but that would have been more work to set up in the beginning, when I had no idea I'd have this problem. And because schemas are costly to change in a running system, changing over to that solution would take yet more work now.

Ruby Shorthand

Author: Emmett

Justin.tv's web code is written in Ruby. I've found myself using the same collection idioms over and over, so I've abstracted several of them into a file called shorthand.rb.



Most of our web code consists of manipulating collections in one form or another, which is probably why all the shorthand methods are for that. I'm particular proud of my % operator, which I believe is a specialized mapcar in spirit. Without further ado, code!




module Enumerable
def %(field)
map {|o| o.send(field)}
end
end

class Hash
def keys_sorted_by_value(options = Hash.new, &block)
limit = options[:limit] || size
offset = options[:offset] || 0

sorted = map.sort_by do |key, value|
if block
yield(key, value)
else
value
end
end

sorted.reverse! if options[:reverse]

sorted.map {|key, value| key}.slice(offset, limit) || Array.new
end

def hmap
h = dup
keys.each do |k|
h[k] = yield h[k]
end
h
end

def to_params
map {|k, v| "#{k}=#{CGI::escape v.to_s}"}.join("&")
end
end


class Array
def hash_by(field)
h = Hash.new
each {|o| h[o.send(field)] = o}
h
end

def center_first
centered = Array.new
last_pushed = false
each do |x|
centered.push(x) unless last_pushed
centered.unshift(x) if last_pushed
last_pushed = !last_pushed
end
centered
end

def random_subset(n=size)
shuffle.slice(0, n)
end

def shuffle
sort_by { rand }
end

def divide
evens = Array.new
odds = Array.new
each_with_index do |x, i|
if i % 2 == 0
evens << x
else
odds << x
end
end
[evens, odds]
end

def remove!(item)
reject! {|x| x == item}
end

def remove(item)
reject {|x| x == item}
end
end


Other coders: If you have your own idioms like these, I'd love to see them! Post them!

Second live tech talk - Peter Seibel

Author: Bill

We've lined up our second live tech talk. After Leah talks about OAuth on November 29th, Peter Seibel will be talking about Why Syntax [Does|Doesn't] Matter, on December 13th. Peter is the author of the best Common Lisp tutorial going, and is now working on his second book, Coders At Work.

If you're close to the justin.tv office, drop by for the talk. If not, you can catch it live (and participate in the q&a) at the hackerTV channel. If you don't catch it live, the archive will soon show up on that page.

JTV Search API

Author: Bill

We launched the new justin.tv search engine a few days ago. Now I'm excited to announce that it has an API you can use in your own programs.



We've based the API on some very familiar open standards - basically HTTP and JSON, so using it should be a piece of cake from just about any language. To see an example in Common Lisp, scroll to the end of this post.



To use our search API, you just need to send an HTTP request to http://search.justin.tv:6979/ with a bunch of parameters. Here's a complete list of the parameters that are available right now:




qThe search query (required). Keywords are separated by url-encoded spaces ('+' or '%20'). Anything non-alphanumeric is ignored.
sort-byOne of 'bestmatch' (default), 'newest', 'oldest', 'mostviews'.
pagePage number in results set, default 1.
results-per-pageMaximum 100, minimum 10, default 10.
show-archivesReturn video archives. 'yes', 'true', 'on' all do the same thing.
show-live-broadcastersReturn users who are currently broadcasting. 'yes', 'true', 'on' all do the same thing.
show-offline-broadcastersReturn users who are not currently broadcasting. 'yes', 'true', 'on' all do the same thing.
If none of the above three are specified, they are all assumed to be 'true'.
broadcastersOnly return results from a list of named broadcasters, e.g. 'b1,b2,b3'.
encode-asOne of 'html-fragment' (default), 'html-page', 'json'.


So let's say we want to build a small application, using the search api, that alerts us whenever a new video clip is available that has something to do with cats. Here's a query that would be a good starting point for an application like that:



?q=cat&sort-by=newest&show-archives=true&encode-as=json



Let's pull that apart and look at what each piece does.








q=catWe're interested in search results whose metadata contain the word "cat".
sort-by=newestWe want the most recently produced results.
show-archives=trueWe do want video archives in our results. Note that show-live-broadcasters and show-offline-broadcasters will both default to 'false' because we've set show-archives to 'true'.
encode-as=jsonThe results set should be encoded using json.


Let's send that query to search.justin.tv and see what we get back:



http://search.justin.tv:6979/?q=cat&sortby=newest&show-archives=true&encode-as=json



returns:



[{"type": "video_archive", "broadcaster": "ggjeffy", "id": 28144, "title": "Cat doing cat stuffs", "start_time": 1186542932, "duration": 180}, {"type": "video_archive", "broadcaster": "nekomimi_lisa", "id": 39175, "title": "Nekomimi Cat Doing The Cat Dance", "start_time": 1191805139, "duration": 108}, {"type": "video_archive", "broadcaster": "nekomimi_lisa2", "id": 9832, "title": "CAT FIGHT!!", "start_time": 1185954224, "duration": 180}, {"type": "video_archive", "broadcaster": "nekomimi_lisa2", "id": 9818, "title": "cat trying to hump blanket", "start_time": 1185939617, "duration": 180}, {"type": "video_archive", "broadcaster": "ashleymarie", "id": 36553, "title": "Sister Cat Fight Part 1", "start_time": 1190060150, "duration": 80}, {"type": "video_archive", "broadcaster": "ibrbigottopee", "id": 34698, "title": "I thought i saw a putty cat", "start_time": 1189149636, "duration": 66}, {"type": "video_archive", "broadcaster": "ashleymarie", "id": 36555, "title": "Sister Cat Fight Part 2", "start_time": 1190060349, "duration": 66}, {"type": "video_archive", "broadcaster": "audratv", "id": 39679, "title": "Attack of the Fuzzy Cat Part 2", "start_time": 1191985459, "duration": 180}, {"type": "video_archive", "broadcaster": "audratv", "id": 39656, "title": "Cat Attack", "start_time": 1191980666, "duration": 180}, {"type": "video_archive", "broadcaster": "xk3ll3yx", "id": 40879, "title": "Cat on Head!", "start_time": 1192431728, "duration": 71}]



Now we need to decode that blob of json. Fortunately there's a library to do that for every language under the sun (look on the json page for yours).



So let's see how we would start writing that feline-video-feed in my favorite language, Common Lisp. First we need libraries for doing the http request and the json decoding. trivial-http and cl-json are more than good enough:

(require :trivial-http)
(require :json)

Let's write a "find-cats" function, which will send the http request and return the results as a string:

(defparameter *url*
"http://search.justin.tv:6979/?q=cat&sort-by=newest&show-archives=true&encode-as=json")

(defun find-cats ()
(let ((stream (first (last (trivial-http:http-get *url*))))
(json nil)
(line nil))
(loop while (setf line (read-line stream nil nil)) do
(push line json))
(apply #'concatenate 'string (nreverse json))))

Now we just need to call that function periodically, parse the json, and print any new cat videos:

(defun cats-alert ()
(let ((known-cat-videos (make-hash-table :test #'equalp)))
(loop
(let ((cats (json:decode-json-from-string (find-cats))))
(dolist (cat cats)
(unless (gethash cat known-cat-videos)
(setf (gethash cat known-cat-videos) t)
(format t "New cat video!~%~A~%http://www.justin.tv/~A/~A~%~%"
(rest (assoc 'title cat))
(rest (assoc 'broadcaster cat))
(rest (assoc 'id cat)))
(force-output))))
(sleep 600))))

That's it, we're done! Here's an example of the program's output:

CL-USER> (cats-alert)
New cat video!
Get the cat butt out of the way!
http://www.justin.tv/fistonet/44923

New cat video!
cat vs dog
http://www.justin.tv/midolgirl/44656

New cat video!
scared cat!
http://www.justin.tv/bobtv/43959

New cat video!
Bob scares the cat! lol
http://www.justin.tv/bobtv/43970

New cat video!
Cat fight. Or something.
http://www.justin.tv/ashleyisawesome/43814

New cat video!
Cat on Head - Part II (With New Web Cam)
http://www.justin.tv/shamrox/43719

New cat video!
Cat fight
http://www.justin.tv/nerdette/42933

New cat video!
Dear cat in the middle of the road, i hate you.
http://www.justin.tv/icantstopiwontstop/42878

New cat video!
Jasmine Playing... (& the amazing flying cat-jumps) TOO CUTE!
http://www.justin.tv/lizzymayhem/42798

New cat video!
KT, the cat, running around acting strange, then craps on the floor
http://www.justin.tv/nekomimi_lisa/43225


We can't wait to see what you do with the APIs we're developing. Email me (bill at justin dot tv) if you have something cool to show off, or if you have any questions or comments.

Saturday, December 01, 2007

Vote for Justin.tv in the Amazon Web Services Startup Challenge!



As we reported last week, Justin.tv is one of seven finalists in the Amazon Web Services Startup Challenge. We're super excited; we've got the opportunity to win $50k in cash and $50k in AWS credits! Last week, we filmed a short video for the competition. This week, Michael and Kyle will head up to Seattle to present Justin.tv to the Amazon panel. In the meanwhile, you can help Justin.tv out by voting for us in the online poll.