Blog

Why is video so frustrating?

May 21, 2006 at 8:12 pm | In tech |

All I wanted to do was share with the world a small segment of my life, one I had captured on video. The idea seemed simple: upload the movie file to the web site, add a link to it, and let people enjoy. The video was a short recording of the music and dancing at a drum circle at Eeyore’s birthday a few weeks ago (see this blog entry). Unfortunately, even though the idea seemed simple, the execution was anything but.

In fact, it was confusingly complicated and surprisingly difficult. At this stage in the digital evolution of media, I had expected a seamless experience. Why does video have to be such a pain?

Particularly frustrating was that the process at first seemed to go very smoothly and painlessly. The video was up on the site (I decided to make a dedicated page for it so I could track viewing counts) and I moved on to other things, only to find out later at least some people couldn’t see it.

Recording the scene was very simple. My digital camera, an HP Photosmart R817, has a button next to the main shutter button. You press once to start recording, and again to stop. This was my first time using this feature, and I didn’t know how much memory was going to get chewed up with the video, and since I wanted to leave room for more pictures I didn’t let it record for too long. I should not have worried. When I started recording, the counter said 175 shots left, and when I stopped after about 20 seconds, it said 165 shots left. No problemo, and now I wish I had captured a longer clip.

Once I got home and transfered the mpg file from the camera to my laptop and opened it in Media Player, I was shocked that it had recorded audio as well, and it sounded fairly good! This was great, because at the same time, I had used my cell phone’s note recorder feature to capture the audio just in case. As it turned out, the quality of that recording was considerably crappy. Hmmm, a visual tool recorded better audio than a voice-centric device - go figure. The only problem with the video was that the file was 15 Mb huge - kinda fat for downloading.

Quite coincidentally, I then happened to come across a review of Macromedia’s Studio 8, which includes Flash 8, and it said the new version could now convert movie files into Flash-based movies at high quality. Hey that’s cool, I have Studio 8! I looked in my programs menu, and sure enough, there was the “Macromedia Flash 8 Video Encoder”.

As a first pass to try out the technology, I used the default settings all the way to creating an HTML output page with Flash 8. The process involved encoding the original MPG file into a Flash Video File (FLV), which resulted in a 6.2 Mb file. Then, that file is imported into a new Flash Document, a player skin is chosen from the templates, and the document is “published” to an HTML output, which includes the movie SWF file, the skin SWF, and the HTML container page.

The resulting SWF Flash-based movie was only 35 Kb, and it looked just as good as the original footage - pretty neat stuff. The only problem was that the bottom of the scene was cut off, so I had to go back into the publish settings and set the Dimensions to “Match Movie”. It’s odd that this was not the default setting.

The last step (or so I thought) was to copy and paste the Macromedia-generated HTML code into a new blank page that integrated into the web site, upload everything, and make the links to it in my blog post. It all worked great on my laptop, and I was happy with the result. Until, of course, I got reports that the movie was not viewable over the internet.

Since I was at work at the time I first heard about it, I tried it from there, and sure enough, the video did not show in the browser, all I got was a large blank space on the page - what the heck? This was several days after I had posted the links, and my hit counter showed the movie page was being viewed. So, did this mean people wanted to see the video, but the page was blank for them? That was pretty bad. On top of that, one of the drags about having a day job is that I can’t just fix things on the web site when they crop up, I have to wait until I get home that evening. The thought of people getting a page that did not work gnawed at me the rest of the day. Bummer.

When I got home, I noticed that the video didn’t work on my laptop when clicking on the link in the blog post, whereas before it had. After trying a number of different things, I discovered that if the domain of the HTML page and the domain of the SWF page do not match, the movie does not show. I assume this is some kind of security feature in Flash Player. What was frustrating, though, is that only the sub-domains were different, and the security was apparently not smart enough to handle that. The links in the blog post pointed to http://austinmash.com/drums.php. Within that file, the path to the movie clip was http://www.austinmash.com/Images/drums2.swf. Normally, whether you include the “www.” in the address or not, you get to the same place. But no, Flash didn’t see it that way, no sirreee, no how no way!

So I added the “www.” to the blog links, added a note on the movie page itself so the user makes sure the address is correct, and made a comment on the blog posting apologizing for the snafu. Then I went to bed. The next day at work, I tried it again, and the movie was still blank! What the heck? Again, I had to wait until I got home before I could do anything about it.

This time there were no easy answers. I tried a number of different settings for both the mpg-to-flv and flv-to-swf processes, and while they all played on my laptop, they did not on the other computers in the house that did not have Studio 8 installed (of course, they did have Flash Player 8. Otherwise, the page shows a link to upgrade the player, and not a large blank area). Online research was not any help, I did not find anyone else complaining of this problem, much less a solution to it. So, after spending way too much time trying to get the flash-based movie to work, I gave up and decided to just show “regular” video and not worry about the bandwidth it might eat up.

I was still unwilling to post a 15 Mb clip, though, so I looked into ways to compress that, and I wanted to give users the option of using either Quicktime or Windows Media player. Theoretically, both players can show mpg files, but the reality was that they both did a poor job with that format, so I had to find ways to convert the movie to their respective native formats, WMV for Windows and MOV for Quicktime. That’s when things got really hairy. First, I had to find an app that can do the conversion, then figure out the best settings for the video and audio codecs, and then write appropriate HTML code for the players. Oh what fun.

I spent several hours downloading and trying a few video conversion apps. Most were hard to use and assumed a level of codec familiarity I did not have. Why does video have to be so complicated? I finally ended up using a program called ImTOO MGEG Encoder external link, which not only handled all the relevant formats, it is configured with default profiles for each, taking a lot of the guesswork out of the process. It produced 4.1 and 4.8 Mb files for the WMV and MOV formats, respectively, with little or no loss of quality. Cool.

Then instead of making two pages, each with one of the two players, I made one page with Javascript to write the appropriate code for the player the user clicked as their preference. This dynamically adds the players to the page, which gets around IE’s new behavior that forces users to click on a control to use it, which was implemented as a response to Microsoft getting sued for seamlessly integrating controls in web pages, because someone else thought of it first and patented the idea. I also removed the blog comment about the “www.” in the address for the movie page, as that was obsolete now.

Anyway, what should have been a straightforward video clip posting turned out to be a mutli-day effort, with a less than optimal solution. I’ll continue to play with Flash to see if I can make it work, but this technology seems to be rather flaky still. While I was writing this post, I went back and tried again. I found a player parameter called “allowScriptAccess”, which was set to “sameDomain” by the HTML generator. I changed it to “always”, as per the documentation, but that didn’t help. Also, I published to a new SWF file, which played on it’s own while in the directory it was created in, but not after I copied it to my local web site directory! It’s the same file, just it won’t play from a different directory like the previous versions did - that’s flaky behavior, folks. Why is video so frustrating?

The final result is here.

1 Comment »

RSS feed for comments on this post.
Trackback URI for this post:
http://austinmash.com/blog/why-is-video-so-frustrating/trackback/

  1. Update: I managed to get the Flash-based video to work, finally. So, while the link above still points to the page with the Windows Media and Quicktime players, that page is now obsolete. I’m only keeping it as an example for others.

    The page with the working Flash video is here.

    My next post has all the details of how I fixed it.

    Comment by erwin — May 23, 2006 #

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>