Blog
Got my Flash-based video to play, hurray!
My last post detailed the frustration I experienced in trying to add a simple movie clip to the web site. Most of that frustration was due to the time I spent trying to get Macromedia’s new flash-based movie technology working well enough that other people could see the video, and not just me. Well, I finally got it working, but I’m not sure how.
As I was writing that last post, I tried again to generate a Flash movie that would play on computers that did not have Macromedia Studio 8 installed. At the end of the day it still didn’t work, and I was noticing weird behavior, in that the final SWF file would play on my laptop when it was in the folder where it was “published” to from Flash 8, but not after I copied it to another folder on the same drive!
There was another clue, however, that I did not pay much attention to at first: the file size of the Flash FLA document was considerably smaller than the previous versions of the document I had created a few days ago, even though they all had only the one movie FLV file in them. It seemed like the FLA document no longer included the actual movie, so it must be referencing it externally, which would explain why the movie would not play when it was in a different folder. Ok, the file sizes don’t bear that out: 376 Kb vs 208 Kb for the FLAs does not equal a 2.3 Mb FLV file.
Whatever the case, to test this theory I copied the FLV file to the same folder I where I was putting the SWF file. Lo and behold, it now played! Was is even more puzzling is that both versions of the SWF file, with an internal and external movie reference, are the same size at 35 Kb.
I uploaded all the files to the web site, created a new test page, and verified that it played over the internet on the other computers in the house. I tried it at work, and it played there too. It was fixed.
I suppose it’s possible the FVL movie file was always externally referenced by the SWF, so that the 35 Kb size is only for the player. But remember, this movie played on my laptop from the web site over the internet, before I had uploaded the FLV file. It also played on my local (laptop) version of the web site, again without the FLV file in the folder that had the SWF file. So, how did that work, and why did it stop working, forcing me to upload the FLV? Undoubtedly I changed a setting somewhere when I was tinkering with it trying to make it work. I wish I knew which one it was.
One difference is that for the first attempts, I used Windows Explorer to drag the FLV file from where it was created to the Flash 8 application window. For the last version, I used the File/Import menu to import the video. However, both of these methods activated the same Video Import Wizard, so I don’t think that made a difference.
Ah! I just figured it out! In the non-working flash document, the “contentPath” for the imported video was a full path and file name pointing to another directory, while in the working version, the same parameter just listed the file name! So, the FLV movie was externally referenced, and it needs to be a relative path from the SWF file, preferably in the same folder, otherwise it won’t find it when you upload it to a server. Man, I wish Macromedia would have been a little clearer on that. I suppose in the end this was a bonehead rookie mistake on my part, since I didn’t even find anyone else with this problem in the forums. This also explains why the movie played over the internet on my laptop, because it was looking for and finding the content on my hard drive! Live and learn, I guess.
Anyway, the low-footprint, Flash-based version of the video is now available and should work for everyone who has Flash Player 8 or higher. I just hope I haven’t overhyped this short clip by talking about it so much. It’s really just a small sample of the goings-on at Eeyore’s Birthday this year, just something I wanted to share. Enjoy!
Why is video so frustrating?
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
, 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.
Annual Eeyore’s Birthday Bash Keep s Austin Weird - and how
Weirdness, weirdoes, everywhere – and not a dudley in sight! YES! Feast your eyes on color and movement, on sights strange that stimulate, on sounds and smells and feelings that move and penetrate – look around, walk around, and immerse yourself in the wondrous creativity of your fellow hipster – YES! This is what I’m talking about! This is Austin, exposed in broad daylight, its inner flower child arms up to the sun, spinning, laughing, and stopping to pierce you in the eyes and flash you the wickedest, sexiest smile imaginable – YES!
Who wouldn’t be seduced into returning time and again to celebrate another year of life? Thus it was such again this year, only this was the first time I experienced Eeyore’s Birthday as a civilian. Actually, I missed it last year and the one before that, but until then, I was a volunteer at the event for, oh, maybe 10-12 years?
When I was first asked to participate, I had never heard of it before – What? You mean you are having a birthday party out in a park - for a fictional character - out of a kid’s book - and not even for the title guy? What’s up with that? How weird… (duh!) But it was Scott Sexton himself who turned me on to it over a game of pool at the Crown and Anchor, by putting it this way: “Dude, you volunteer for two hours, and you get free beer the rest of the day!” Well, who can pass that up? It was only later that I learned the annual bash was a fund raising event for Austin non-profit groups – all of a sudden I realized I was signed up to do charity work – but what the hell, it might be fun anyway. Little did I imagine…
So, for much of my formative years (my 30’s), once a year I got to sell beer tickets for a couple of hours, got free beer the rest of the day, and hung out and grooved and learned first-hand why Austin is one happenin’ town. Selling beer tickets was wicked fun, as you got to mess with people on a continuous basis, and they still kept coming and lining up to get messed with – whoohoo! It’s different, walking around and seeing the madness, and then dealing directly with individual weirdness, one on one, up close and personal, while money changed hands and IDs were checked. Yep, the situation was ripe with opportunity for merriment. Oh, you want 20 tickets? I’m waaayyyy too drunk to count that high – but hey, I can count to 4 five times – how’s that? What? No way this is you in this picture – and how do I know this is what Hawaiian drivers licenses look like? The best was when they asked for a large number of tickets, and I’d do some obscure folded-ticket math and hand them their change in one big flurry, and they’d start to leave with a little should-I-trust-this-guy puzzled look on their faces (until they realized I got it right). NEXT! Those were the days..
And these are these days, and they aren’t too shabby either. Going as a civilian had the obvious drawback of no free beer, but it did allow me to more fully enjoy everything going on. I hung out at the drum circles longer, I listened to the band for a while, I visited more parts of the park – or hmmmm, maybe I just remember visiting more parts of the park?
Anyway, the drum circles were different this year, in that they had actual drums – there was even a full drum kit in one of the circles. Before, everyone used plastic buckets and lids and pieces of metal and anything else that made noise when hit with a stick, plus maybe just a few bongos, and it was incredible how well they worked together. It was pretty good now with the drums, too, maybe just louder and more melodic.
If you’ve never experienced a free-form drum circle, it’ll be hard to imagine its impact on you. You can watch the short video I made, but what’s missing from that is how, after hours of continuous, persistent, ever-changing rhythmical variations-on-a-theme, with passages that ebb and flow and break down and rebuild and merge and synergize and escalate into a frantic crescendo, the pervasive percussion gets inside you, becomes part of your metabolism, and carries you the rest of the day. You fall asleep still tapping your toe and nodding your head to the beat that was – especially if you’ve had free beer all day!
There were at least three established drum circles throughout the park that day. I really enjoyed the one up on the hill, in the woods behind the port-a-potties. These guys were rockin! Watch the video. Other events included a face painting booth (in case you showed up too “normal”), kiddie sword fighting, a maypole weaving attempt, egg toss and other organized games, hula circles, Eeyore petting, and splashing puddles (courtesy of the storm the night before).
It’s been said Eeyore’s Birthday is one of the last remaining events that are still true to its origins, and has not been corrupted or “toned down” to appease the up-tights. One reason it has endured, no doubt, has to be the attitude of the organizers. They’re a great bunch of people, who just want to put on a great party and have fun doing it. As a many-time volunteer, I can attest to the laid-back and open nature of the organization, that still manages to get the key work done.
Then of course, there are the party-goers themselves. Eeyore’s Birthday is a different event for different people. Those that sit in the woods by the drum circle get a different event than those whose small children play with Eeyore, which is also different from the experience of all the teens and 20-somethings running around – full of energy and creativity and expressionism. Yet these events all occupy the same space and time, their experiences interwoven, each adding richness and harmonious diversity to the others. Everyone has a good time, regardless of their perspective. Does it get any better than that?
New Era, new focus
I haven’t mentioned my job search for a while, mostly because it didn’t seem very relevant to the world of AustinMash!, but also because it wasn’t the biggest thing in my life. What was bigger than finding a job? Well, working on this site, and everything related to it!. In fact, there were some points over the past couple of months where responding to recruiters and going to interviews was a tolerated distraction away from the much more entertaining and interesting stuff going on here. Now, don’t tell my wife, but I must admit I was secretly a little relieved a couple of times when I got word I was not chosen for a job. Not every time, though, as there were a few very interesting and compelling company stories I would have loved to be a part of. The good news is that one of them was a match, and I was offered a position at a software company a couple of weeks ago, and my first day was today.
This does not mean I’m abandoning this project - this fun, educational, enlightening, and empowering journey I’ve started. No way, it just means I’ll have to go about my business in a much more focused manner, and at the same time rely less on activities that require my physical presence.
Actually, when I look at the timing of everything, I can hardly believe my luck. I decided to proceed with this project when I still had a job, and I managed to build the bulk of the functionality in my free time and on weekends. Then, I got laid off, but with plenty of notice, so I knew it was coming. This removed all time constraints, and I was able to devote as much time as I wanted on AustinMash!, technically, and on the various marketing and networking activities I engaged in. Then, I finally did get a job offer, but with a start date two weeks out – so again I had plenty of time to plan – and take a little vacation to boot! (yes, I was out of cell phone range for 5 days. One word of advice: when the resort lists high-speed internet access, ask if it means wireless in the room, or if it means they have three PCs in a little “business center”, one of which is broken, and on which they limit your time to 15 minutes a day. I still haven’t decided if this was a good thing or not). So, now my week days are once again someone else’s, but that’s ok, since lately I’ve been thinking it was time to move on to the next phase of marketing, and start advertising the site. The real challenge, really, will be in continuing to develop AustinMania! while at the same time have some kind of a life.
Another change is that I am going to focus less on selling ads, and more on building a site that I and others will hopefully enjoy. I’ll work on my original goal of making an entertaining site, and I’ll let the traffic take care of itself (ok, I will be boosting it from time to time through advertising). Then the ad sales should take care of themselves too, once the traffic is there. The good part is that this is fun, so I can just keep working on it and see what happens. Do you want to see what happens? Stay tuned – same Mash-Channel, same Mash-time!










