
Show HN: How I know what my neighbors uploaded on YouTube - thenewvu
http://tubenearyou.com
======
timothya
Looks like this site is just a wrapper around the YouTube search API, which
allows you to specify a location to retrieve results from.

From the documentation[0], _" The location parameter, in conjunction with the
locationRadius parameter, defines a circular geographic area and also
restricts a search to videos that specify, in their metadata, a geographic
location that falls within that area. The parameter value is a string that
specifies latitude/longitude coordinates."_

Looks like you can add a location to your video in the Advanced Settings panel
in the video settings:
[http://i.imgur.com/AtnTu7F.png](http://i.imgur.com/AtnTu7F.png)

As far as I can tell, location is not added by default (I tried uploading a
video that has embedded location data and that location was not added to
YouTube; I would have to add the location manually).

[0]:
[https://developers.google.com/youtube/v3/docs/search/list](https://developers.google.com/youtube/v3/docs/search/list)

~~~
RyJones
how many products are "just a wrapper"? Why deride someone else's hack?

~~~
verbin217
Why infer derision from a statement that needn't necessarily have been?

That something required a small amount of code or effort is valuable
information. And actually, among hackers, usually positive.

~~~
skj
The word "just" (at least with this meaning) trivializes what follows.

~~~
verbin217
Yeah, after reading this again I think you're right.

------
smy1es
I'm pretty impressed by this. It certainly shows a whole bunch of stuff
happening near me that I had no idea about.

So, how many videos are typically geotagged on Youtube? Most of them, or just
those uploaded from phones and tablets with GPS?

~~~
krick
Same thoughts here. Nothing really impressive in my case, but since I'm used
to think that where I live is pretty boring place it's somewhat relieving to
see that there's actually _life happening_ around me.

I guess I should take a walk more often.

------
aw3c2
_Please_ let me middle/right click on videos so I can open them in tabs.

~~~
dredmorbius
I'd far prefer some sort of interface to allow me to _queue the motherfucking
videos in the queue-capable viewer of my choice_. VLC has some of these
features, though its tendency to catch fire and halt (destroying the queue in
the process) is annoying.

~~~
pdkl95
[https://github.com/rg3/youtube-dl](https://github.com/rg3/youtube-dl)

    
    
        1. right-click -> "Copy Link Location"
        2. middle click to paste the link into you shell
        3. run "youtube-dl" on the URL(s)
        4. watch the videos in whatever video player you want
    

One of these days I should make a quick firefox extension that adds a context-
menu option to collapse it down to one step.

You will have to update youtube-dl every time (see the "-U" option) Google
decides to change the obfuscation. Also, you may want to try the --list-
extractors and --extractor-descriptions options, to see the _long_ list of
sites that are supported, which includes support for things like youtube
playlists searches.

~~~
thegeomaster
I have a cute setup for playing YouTube videos (mostly music) via SSH from my
phone when I'm lying on my bed and too lazy to get up. There's a small CL
script which searches YouTube based on a query, then fires up youtube-dl and
dumps the raw file to a named pipe. Then, when the header and everything
needed for VLC to start streaming is ready, it starts up VLC via its ncurses
interface, so I can volume up/down, pause/play and seek if needed from my
phone. VLC is nice enough to fire up an X11 window if you give it the right
DISPLAY environment variable over SSH, so you can watch the video (even make
it fullscreen via the ncurses interface). Once the video finishes playing,
obviously, the named pipe and the data is gone---everything's in memory
anyways.

These days I'll get to uploading it to GitHub, maybe even turn it into a
Firefox extension/Android app. Though it's a little specific to my use case: I
have a quality sound system attached to my desktop computer so it doesn't feel
right to listen to stuff on my laptop/phone when there is such a great setup
lying around. And setting up SBCL and Shelly just to run Common Lisp scripts
is a little bit of an overkill.

Sorry for the off-topic, just felt like sharing this bit of my computer-aided
laziness :)

~~~
dredmorbius
Hrm, sounds interesting. How are you buffering this, if at all?

~~~
thegeomaster
Well, everything goes through the FIFO pipe. VLC should block on reading if
there is not enough data, though I haven't tested it in that case (I have a
cable connection so video hiccups don't normally happen). The script buffers
the first couple of kilobytes so the header is immediately available, but
beyond that buffering should be handled by the kernel. Though I might be
misunderstanding your question...

~~~
dredmorbius
I tried writing to a named pipe but youtube-dl griped.

    
    
       mkfifo FIFO
       youtube-dl -o - $SOME_URL > FIFO &
       mplayer FIFO
    

youtube-dl quits:

youtube-dl: error: using output template conflicts with using title, video ID
or auto number

~~~
thegeomaster
Hm, this works for me. Maybe try with `-f best`? Here's a minimal working
example (just figured out it doesn't even need the header buffering hack I was
using so far):

    
    
        $ mkfifo FIFO
        $ youtube-dl -f best -o - 6h9vr_xwTj4 > FIFO &
        $ vlc - < FIFO
    

And VLC plays the video just fine. youtube-dl downloads it from YouTube as the
bytes are read() by VLC, so the D/L speed is around 25KiB/s.

Though I assume you can also stream this at full speed by doing a `mktemp` and
dumping the data into the file. In my experience, VLC handles files which are
still being appended data just fine, but it'll freak out if it reaches EOF
before the end of the stream. If your /tmp is tmpfs, which it is everywhere
AFAIK, the only difference is that the video is being downloaded in full
speed. Alternatively, if your downlink is fast (for instance, 4MiB/s) and you
don't mind the slight delay, you can as well download the file wholly as
mentioned in one of the ancestor comments.

~~~
dredmorbius
mktemp creates a normal file and stores to disk. The FIFO avoids that, which
is why I'm interested.

~~~
thegeomaster
Actually, as I mentioned, /tmp is (AFAIK) everywhere a tmpfs mount, which
means these files are kept in RAM and stored to disk only if their pages are
swapped.

~~~
dredmorbius
/tmp is _typically_ but not _always_ a tmpfs mount. Presumptions about where
files are or aren't actually written to disk given modern virtual memory is
... somewhat fraught.

It also happens that _my_ /tmp is physically allocated.

And named pipes really and truly work differently (though there can still be
buffering).

That said, no joy (though I tracked down the issue above -- configfile setting
conflicting with commandline parameters, somewhat annoyingly).

------
m-i-l
Smallest distance you can select seems to be 5km, and I live in central
London, so that's a few million people "nearby".

~~~
tommoor
Yep, San Francisco is even worse as you'd expect - <1km option would be nice
:)

~~~
hafifuyku
10m, 100m should work. "Valid measurement units are m, km, ft, and mi. For
example, valid parameter values include 1500m, 5km, 10000ft, and 0.75mi."

------
civild
Someone living near my parents looks to have uploaded a hundred or so
"chemtrail attack" videos. I honestly had no idea that people in the UK were
into that sort of thing, but that's the internet I guess.

~~~
slater
Funny, just checked near me (I'm in San Francisco), and lo & behold,
chemtrails over SF, too! They're spraying everywhere!! ;)

------
A_COMPUTER
All church services and used car sales near me, haha. So, is there any way to
get the exact geotagging location, or is this obscured by Youtube?

~~~
lukeadams
Car dealership and "house for sale" videos for me out in the suburbs of North
Texas ;)

------
arihant
I'm not sure what should surprise me more. The fact that I'm somehow living at
epicentre of Zumba thumpquake or that I was completely unaware of _so many_
women my age in my 1 km radius.

Jokes aside, the sad thing is that YouTube would most likely have locations
set by IP. So I'm certain the distances are off. At best this thing can tell
me videos from my city. Still a neat hack.

~~~
PhasmaFelis
This post is currently the only Google result for "Zumba thumpquake". No
quotes, even. So I still don't know what the heck it is, but thanks for
helping me achieve a Googlewhack. :D

~~~
SZJX
Zumba is a dance.

------
protomyth
So the site asks if it can use my location and I click yes. Safari asks if it
can use my location which I allow. I then hit the search button and am dumped
into a map of Russia. Oh well. Tried on iPhone and it gives an address in the
next town over, but the map shows the pointer in the correct town. What the
heck?

~~~
thenewvu
sorry, that's my bad. I will fix it. For now, please manually pick your
favorite places on the map.

------
kruk
It's fun! I didn't know YouTube had this functionality.

A few comments:

\- It could use a couple of smaller radius settings though (1km and 100m).
Nothing that Chrome Console can't fix but not everyone is a developer.

\- The intro page is a bit confusing, at first glance it might seem like an
Android application, "Google Play" button being most prominent.

\- The search bar is a bit short, if you just type the number and street name
it's likely you'll end up in a different country or state.

~~~
thenewvu
Thank you so much for the feedback. I come from a C++ dev, hope you know how
hard to be good at Web UI :D. But trust me, it will be better in time.

------
mahouse
It does not work here, I have a desktop computer with no geolocation
capabilities (no wifi), it just shows a white screen below the text.

~~~
thenewvu
It's a bug when the app can not detect your location. Please manually pick
your favorite places in the map for now.

------
jnpatel
It seems strange that it uses HTML5 Geolocation, but still drops me in Russia
by default. Are others seeing the same behavior?

~~~
Gracana
I'm tethered to my phone and it showed up with my exact address, so no, it
worked maybe a little too perfectly.

~~~
nly
I'm on home broadband and it got it down to my road... does FF cache your
location?

------
joehaaga
i built something similar for twitter.
[http://student.seas.gwu.edu/~jhaaga/YukOrYay/php/homepage.ph...](http://student.seas.gwu.edu/~jhaaga/YukOrYay/php/homepage.php)

~~~
thenewvu
It's cool. Hope to see a better version in the future.

------
christiangenco
My wife noticed a typo:

> Specify keyword and radius to get a result near what your want.

s/your/you/

~~~
thenewvu
thank you so much, sorry for my bad English, I will fix it.

------
mod
Well done, this was pretty neat.

Nearly all real-estate walk-throughs, but found a couple of neat things after
wading through those.

~~~
thenewvu
Thank you so much!

------
robodale
Yay - nothing but car dealership videos.

------
stockkid
Interesting that majority of vids are sales video (car, property, etc.) on
many locations I tried.

~~~
vonklaus
I had this result as well. At first, I thought I was getting spammed but every
result for the first few pages were real estate and car dealerships. As noted
above, you may have to manually make the location available so that would self
select gor these services.

------
SZJX
lol "travel the world". Don't be so grandiose. The only way to actually
explore and travel the world is to set your feet out and get around, learn the
language and culture. This is such nonsensical branding.

------
nsxwolf
Pretty much nothing but used car ads for me.

~~~
thenewvu
Please search with some interesting keywords.

------
alpacaaa
This is amazing.

~~~
thenewvu
Thank you so much for supporting me.

