xiphmont: (Default)
[personal profile] xiphmont
At long, long last, the big video project is done! At least, the first episode, of what I hope to be many episodes over the next few years, is done.

I present Xiph.Org's first self-produced educational documentary: "A Digital Media Primer for Geeks"

It also comes with it's own wiki discussion and 'further reading" site!

Hoorj!

Date: 2010-09-23 03:29 pm (UTC)
From: [identity profile] kenshi.livejournal.com
requires Java to view. Bummer.

Date: 2010-09-23 03:40 pm (UTC)
From: [identity profile] xiphmont.livejournal.com
Java is the last ditch fallback if your browser doesn't support any of the codecs natively; it tries to use a Java implementation of Ogg playback.

HTML5 stuff is all new, so in-browser playback is going to be spotty as yet.

Date: 2010-09-23 03:37 pm (UTC)
From: [identity profile] dossy.livejournal.com
How do you get the video to stary playing on Chrome 6 for Mac? If I click the "Play" triangle, the rest of the page behind the player gets some alpha-channel lightbox effect, but the video doesn't actually play ... and there's no "stop" or "close" button to go back to the page.

Date: 2010-09-23 03:44 pm (UTC)
From: [identity profile] xiphmont.livejournal.com
When it loads originally, do you see the beginning of the video? It should start with a title screen, then Chrome goes to showing the first frame with a little vertical bar. Does that come up?

Date: 2010-09-23 08:22 pm (UTC)
From: [identity profile] dossy.livejournal.com
In the grand scheme of "a picture's worth a thousand words" ... then motion pictures should be worth a few million, right?



http://www.youtube.com/watch?v=3iIwEyDK8gc (http://www.youtube.com/watch?v=3iIwEyDK8gc)

See what I mean?

Date: 2010-09-23 08:58 pm (UTC)
From: [identity profile] xiphmont.livejournal.com
Yes, good way to show it!

Well, Chrome is clearly saying "I can play WebM" or the little WebM indicator wouldn't be there. What I can see is that the 'play' arrow never turns white, which means Chrome is never loading the video. It still lets you press play, but then it doesn't let you back out... I assume that even if you wait before pressing play, the arrow never turns white and just stays gray?

Chrome 6 tested on a Mac by Rillian does work, but we have found it to be a bit dodgy just as yet in other ways... not sure what is happening. The Javascipt is working or it wouldn't have the title screen. If you change resolution and don't press play, does the arrow ever turn white? I wonder if your machine is somehow failing to contact downloads.xiph.org for some reason.

Date: 2010-09-24 12:06 am (UTC)
From: [identity profile] dossy.livejournal.com
Yeah, there's definitely some problem w/ Chrome fetching the .webm file --

Image

However, if I just open a new tab and paste in the URL http://downloads.xiph.org/video/A_Digital_Media_Primer_For_Geeks-360p.webm ... it does load, and play in the tab ... ?!?!

Then, once it's in cache, if I reload the original page http://xiph.org/video/vid1.shtml, the video plays inside the page as expected.

Then, if I clear cache, and reload http://xiph.org/video/vid1.shtml, the old "broken" behavior repeats itself.

Date: 2010-09-24 10:52 am (UTC)
From: [identity profile] xiphmont.livejournal.com
Thatnks, that's all useful information. I don't have the slightest clue why it's not working--- but I think I have enough to get Chrome devs involved now. BTW, what version exactly? There have been a bunch of Chrome 6 updates.

Date: 2010-09-24 12:28 pm (UTC)
From: [identity profile] dossy.livejournal.com
Google Chrome 6.0.472.59 - although, in launching the "About Google Chrome" dialog, it tells me there's an update for 6.0.472.63 available and that I should restart ... do you want me to see if this "fixes" the problem? If it does ... I won't be able to test any fixes against .59, though ... heh.

Date: 2010-09-25 04:03 pm (UTC)
From: [identity profile] xiphmont.livejournal.com
Certainly do--- it's the first thing that the Chrome devs will ask me. If it fixes the problem, chances are it was a bug that got fixed.

Date: 2010-09-23 03:54 pm (UTC)
jered: (Default)
From: [personal profile] jered
Very nice! How much support did you have in the production process? It's very polished.

Date: 2010-09-23 05:16 pm (UTC)
From: [identity profile] xiphmont.livejournal.com
The video part of the production was just me :-)

Date: 2010-09-23 04:01 pm (UTC)
From: (Anonymous)
Video's pretty cool and interesting. There's a typo in the blackboard at 13:15 (0x00=0; 0xFF=256), however it gets fixed in the next take. Maybe not the best place to ask but — any updates on temporal RDO for Theora, or was that abandoned in favor of WebM?

Excellent

Date: 2010-09-23 05:23 pm (UTC)
From: (Anonymous)
Wow, that is an excellent video. Very well produced, well explained, and I think it goes into exactly the right amount of detail.

I particularly loved the in-video demonstration of sampling rates, aliasing, clipping and so on.

The one thing I think you missed out: What *is* an audio 'frame'? They don't really have frames do they, so I guess it is an arbitrary collection of samples?

Re: Excellent

Date: 2010-09-27 04:00 pm (UTC)
From: [identity profile] nullc.livejournal.com
Yes. In formats that even have a concept of framing a "frame" of raw audio is some integer number of samples, as per the whim of the software/formats in question.

Date: 2010-09-23 10:30 pm (UTC)
From: [identity profile] thpeech.livejournal.com
It completely crashes my Firefox v3.0.1 when I try to view it. It follows the link to your website, then the whole browser goes whoompf and disappears. (Actually much more efficiently than when it shuts itself down.)

Broken java

Date: 2010-09-24 01:08 am (UTC)
From: [identity profile] nullc.livejournal.com
Sounds like the Java applet support is broken on your system, you should probably reinstall it on remove it. This may save you some crashes on other websites too.

Date: 2010-09-24 08:30 am (UTC)
From: [identity profile] thedeemon.livejournal.com
Great work!
Just wondering, how much time did it take to make it?

Date: 2010-09-24 10:03 am (UTC)
From: [identity profile] xiphmont.livejournal.com
I started 'working' on it end of May, by which I mean that's when I ordered the camera. Lots of things slowed me down through June and July (software bugs galore) and shooting wrapped up over Labor Day weekend. By that point, the software was still not working smoothly and I didn't get a final render that was more or less correct until during OLF (Sept 10th). At this point, though, I'm sure I could make another without hitting any new bugs in the workflow I used.

Writing by far took the most time, followed by memorizing lines. There were eight total shooting sessions, each required several hours of memorization and practice before turning on the camera. It's dense for a video and I tried not to waste time with endless asides; the danger was making it sound like I was reading source code. It was originally supposed to be only 10-15 minutes but even ruthless editing could only get it down to 30 :-)

Date: 2010-09-24 10:34 am (UTC)
From: [identity profile] thedeemon.livejournal.com
Thanks! Really impressive amount of work!

Date: 2010-09-24 08:35 am (UTC)
From: [identity profile] thedeemon.livejournal.com
When starting talking about video you say:
The Sampling Theorem applies to all three video dimensions just as it does the single time dimension of audio.

Obvious questions:
1. Why does it apply? Original signal is not continuous anymore.
2. What are the consequences? Does Nyquist frequence have any sense for video?

Date: 2010-09-24 10:05 am (UTC)
From: [identity profile] xiphmont.livejournal.com
1. Sure it is! It's continuous until you sample it.

2. Nyquist applies to video; it applies to any sampled signal. Aliasing across the X/Y dimensions in video is what causes Moire patterns. Aliasing in the time dimension is what causes effects like 'propellors spinning backwards' or 'fluorescent lights flickering' like you see in alot of webcam vids.
Edited Date: 2010-09-24 10:06 am (UTC)

Date: 2010-09-24 10:53 am (UTC)
From: [identity profile] thedeemon.livejournal.com
When sampling audio it's continuous because membrane in microphone is moving, and movements of all physical macroobjects are continuous.
But when sampling video (or just photo) the process is completely different: a bunch of discrete photosensors counting discrete photons for some time. Where does continuity come from? Sorry if it sounds stupid.

Date: 2010-09-24 01:10 pm (UTC)
From: [identity profile] ajaxxx.livejournal.com
Nyquist says that sampled signals are equivalent to their analog sources iff the sample resolution is more than twice as large as the smallest thing you're sampling. It's a statement about the entropy of a signal, literally about how much information is needed to encode it without loss. In visual terms, each sensor is responsible for sampling the photons from some number of steradians of the view; if the object is too small in the scene it will be incompletely sampled and you'll see aliasing.

Your first sentence gives away your discomfort with quantum processes by saying "macro". Space is physically discrete too, but we're so much larger than the granularity that we don't notice. Even if we consider space to be continuous, the membrane's position is quantized anyway because it is converted into an electrical potential, composed of electrons, which are themselves discrete. But we don't measure single electrons, we measure the cumulative effects of billions of electrons. A 16-bit audio sample contains 65536 possible positions for the microphone membrane, and even though many more are possible, that's enough for our ears to be satisfied.

Our eyes aren't different; they receive discrete numbers of photons, but their reactions are coarse enough to be described in macro terms. Same with silicon photosensors, in fact; you can crank up the sensitivity to the single-photon region, but if you do you lose dynamic range and you end up measuring that the world is very bright.

If you like you can think of digital video pipelines as being discrete all the way through: a quantum physical process counting photons, converted into a series of two dimensional matrices of integer color values, manipulated as discrete values within a computer, displayed on a finite number of LCD crystals, and resampled again by a finite number of nerves on the back of your eye. So then it's never "continuous" anywhere at all! It only appears to be because the things we're sampling are so much larger than the tool we're using to sample and the resolving power of the tools we're using to interpret.

Date: 2010-09-24 04:33 pm (UTC)
From: [identity profile] thedeemon.livejournal.com
Thanks for elaborating, I completely agree with most of what you said about discreteness and continuity.

As of Nyquist: one pixel is perfectly enough to capture an object of the size of one pixel, i.e. sampling rate doesn't have to double here. The theorem says when analog signal can be perfectly restored from sampled one, there are several conditions required:
1) analog signal must be smooth enough (for Fourier analysis to be appliable)
2) sampling must be done as with audio - taking function values at certain points, not integrals on intervals, as photosensor can be represented, and
3) there should be no frequencies in the original analog signal higher than Nyquist frequency (half of sampling rate).

Are these conditions satisfied in cameras? Probably, but it needs explanations: more complex math for describing the process, and physical blurring in lenses/matrix to satisfy the last condition.

I wouldn't mix Nyquist rate and entropy, they are not directly related. I can make a signal with very low entropy but with very high frequency requiring high sampling rate to capture.

Date: 2010-09-24 04:39 pm (UTC)
From: [identity profile] xiphmont.livejournal.com
Pixels are properly not areas; they are best infinitely small points in space. In practice, of course, sensors have areas, so pixels have areas. But at that point, aliasing has already entered the equation unless the signal has already been bandlimited. An image, in reality, is a smooth function in every direction, but the physical area of the sensor pixel introduces a zero-order hold.

Sampling rate still has to be twice the frequency. What happens to an image that consists of 1000 vertical black lines on a white background when sampled with a sensor that has 1000 horizontal pixels? 2000 pixels? 2001 pixels? The results here are intuitive and instructive, and the math is the same as would be used with audio.

Cheers!

Edited Date: 2010-09-24 04:39 pm (UTC)

Date: 2010-09-24 05:40 pm (UTC)
From: [identity profile] thedeemon.livejournal.com
Yes, it's convenient to think about pixels being points, not areas, and image being smooth. And it works fine in practice. The interesting part is why.

Before sampling image is a function f(x,y) where x and y are continuous, but it doesn't make the function itself continuous (where small changes in the input result in small changes in the output). When you look closely at an incandescent light bulb there is filament emitting light and empty space around not emitting it, there's nothing smooth and continuous on the edge, it's a step function. And you can't approximate step function with a limited number of sine frequencies. Optics and bayesian patterns in camera matrix do the blurring, probably this is what makes signal smooth enough.

Why thinking about pixels as points works when they obviously aren't points is another interesting question.

Date: 2010-09-24 05:54 pm (UTC)
From: [identity profile] thedeemon.livejournal.com
About 1000 lines: in this case we want to see both black lines and white background between them, so there are 2000 different visual objects, black and white, and we need 2000 pixels.

But if we shoot a night sky with a bright little star (planet) there, we may end up with one bright pixel in the image. Does it mean the "frequency" for that object is twice lower? Not necessarily.

Date: 2010-09-24 09:40 pm (UTC)
From: [identity profile] danielhendrycks.myopenid.com (from livejournal.com)
Hey, thanks a lot for this! Looks very professional 8-)

(Ptalarbvorm has had many commits over the months, could you please have an update of the improvements be shown in a post by the end of year?)

Wow! This rocks...

Date: 2010-09-27 08:07 am (UTC)
From: (Anonymous)
That was the most awesome tutorial on digital media I've ever seen! It blows my mind how extremely well done this video is! I'm essentially speechless...

Date: 2010-09-27 08:58 pm (UTC)
From: [identity profile] 0x1392.livejournal.com
Really looking forward to new episodes!

Fantastic! Thank You!

Date: 2010-09-28 02:46 am (UTC)
From: [identity profile] michael ressler (from livejournal.com)
Monty, this is fantastic! I've been a consumer of digital video for a while and have recently been working with HTML5 video professionally. This is just what I need to start sticking my nerd teeth into this digital video world!

I would like to say that I hope the HTML5 spec does something about full-screening the video... my screensaver kicked in 3 times during the video, requiring me to login and miss priceless moments of the video! ;)

Re: Fantastic! Thank You!

Date: 2010-09-28 11:22 pm (UTC)
From: [identity profile] daniel hendrycks (from livejournal.com)
Fullscreen will most likely be made available with DOM actions, there has been no talk about fullscreen recently on the mailing lists, though...

Re: Fantastic! Thank You!

Date: 2010-10-15 12:54 am (UTC)
From: (Anonymous)
theroa broswer plugin see page
http://forum.videolan.org/viewtopic.php?f=16&t=82368&p=275821#p275821

Re: "A Digital Media Primer for Geeks"

Date: 2010-09-29 12:44 am (UTC)
From: [identity profile] wolfram riedel (from livejournal.com)
Great Work!

We want more!

Date: 2011-03-18 02:37 pm (UTC)
From: [identity profile] tuomo könönen (from livejournal.com)
Thanks for this video, it really helped understanding various things about video compression. Do you have plans to release episode 2 in the near future?

Profile

xiphmont: (Default)
xiphmont

Most Popular Tags