Running the Pixlr Editor (or other Adobe Flash-based apps) in a modern browser

Many people will be familiar with the Pixlr browser-based image editing tool, Pixlr Editor. Unfortunately, it’s developed in Adobe Flash, a technology that’s rapidly falling out of favour with developers (about time too!) and losing browser support.

A few weeks ago, I tried to run Pixlr Editor in Chrome and found it wouldn’t work. Same for Safari. Edge gave a similar experience – in fact only Internet Explorer would play nicely!

Then I found Paulo Amaroso’s Google+ post about the issue (yes, Google+!). It seems that what I needed to do was click on the “omnibar” (the secure padlock or info button to the left of the URL in the browser) to open up Chrome settings and select Flash then Always allow on this site.

Interestingly, I’m now seeing browsers prompting me to enable Flash for the website… I suspect Pixlr have updated their website to improve the user experience.

Allow Flash for pixlr editor website in Chrome

No sound from Google Chrome: Adobe Flash issue and workaround

Adobe Flash has no place in the modern web.  Unfortunately there are many sites that still use it, so it can’t be ignored entirely. This weekend I found I had no sound in my browser and it turned out to be Flash-related.  This is what I found…

No sound in Google Chrome

Over the week, I tend to accumulate open browser tabs of things that look interesting but which I haven’t got time to read/watch in the working day. Written content is simple enough (it gets saved to Pocket, and then not read from there instead), videos are less straightforward.

Anyway, I’d finally got round to watching a video link I’d been sent and found that I had no sound. Strange. Windows sound was working – I could test from Control Panel and in other apps – it seemed to be a problem for YouTube in my browser (Google Chrome).

A bit of digging turned up a Google Groups post that sounded similar.  Whilst the issue was reported to affect Flash 11.3 and I’m running, I did follow a link to Adobe’s Flash Player 11.3 Audio Update, which suggested I knock my sound quality down to 16 bit 44,100Hz (CD Quality). That did the trick – and is perfectly fine for playing MP3s and YoutTube videos…

What are all of these Flash versions anyway?

As Michael Horowitz explains in a defensive computing post, Flash versioning is, to put it mildly, a mess. Added to that chrome://flash tells me that I’m using something called Pepper Flash, which I’ve never installed but it turns out is part of Google Chrome 21 and later (I’m on 23.0.1271.95) to provide better sandboxing, among other things.  You can find details of the version of Flash installed (and the latest version) on Adobe’s Flash Tester and Michael also has information at his Flash Tester site.

Multimedia file format conversions, ripping DVDs, playback and more

Recently, I’ve had cause to convert various multimedia items between formats and it’s not always been straightforward. I’m still learning as DRM, codecs and platform-related issues often complicate the process but this post summarises what I learned along the way with:

  • Grabbing audio content from another application.
  • Trimming audio files down to a particular section.
  • Converting Flash video (.FLV) files to video (as well as converting between a variety of other video formats).
  • Ripping DVD content for playback on the computer.
  • Playing Windows Media content on a Mac.
  • Playing QuickTime content in full-screen mode without buying QuickTime Pro.

I carry out most of my multimedia work on a Mac but some of these solutions will be equally applicable to Windows and possibly even to Linux users.

Grabbing audio content from another application

I’ve just three words to say that will describe how I did this – Audio Hijack Pro – a great application from Rogue Amoeba which takes the audio from any running application and allows it to be recorded.

Trimming audio files down to a particular section

In this scenario, I had about half an hour’s worth of audio, but only wanted to publish a section which was about 3 minutes in length. Apple QuickTime Pro will let me trim tracks, but didn’t seem to let me set the start and end points as accurately as I needed. There is another Rogue Amoeba application that I could use for this (Fission) but tasks like this are pretty rare for me and I didn’t want to pay $32 for what could potentially be a single use (the demo version inserts fades into the track to encourage purchase of the full software which seems fair enough as at least it lets me try before I buy). Instead, I used MP3 Trimmer from Deep Niner – the interface may not be as good as Fission’s, but it’s a fully-functional demo with no time limits and registration is just $10.95 should I find myself needing to trim MP3s more often.

Converting Flash video (.FLV) files to video (as well as converting between a variety of other video formats)

I spent all afternoon yesterday trying to work this one out – I had a bunch of Flash videos which I had downloaded from a website and although I could play them using Eltima Software’s SWF and FLV Player, I wanted to play them in iTunes. After searching the net for hours all roads seemed to lead to a Windows application that would convert the files to MPEG4 format for me (Moyea FLV to Video Converter). The demo version of this application inserts a watermark in the centre of the video (again, that’s fair enough – this is try before you buy) but as I really wanted something for my Mac I decided not to part with the $39.95.

Later that evening, my friend Alex recommended Perian to help me out with problems ripping a DVD (see below) and I found out that the Perian component for QuickTime had already been installed (probably when I had a quick look at the Democracy Player a few weeks back) so QuickTime could already play back my .FLV files! Because I have QuickTime Pro, it can also save the files as .MOVs although I’ve since found Vixy – an online service that will also carry out the conversion from Flash video to a variety of MPEG4 video formats including .AVI/.MOV/.MP4 and .3GP or to .MP3 (audio only).

After I’d done all this, Alex (who really should blog more often about the huge volumes of Mac and Internet-related stuff that he knows and I don’t) told me that he uses iSquint for converting Flash Video for iTunes playback. I had been under the impression that iSquint would reduce the picture size for iPod playback but it seems it can also retain TV size (whatever that is). iSquint also has a grown-up brother – Visual Hub – and, although I haven’t used it yet, it looks to be a pretty useful program which “bridges the gap between numerous complicated video formatting standards”.

Another toolset which may be useful is ffmpegX, which provides a Mac OS X interface to a number of open-source video and audio processing tools. There’s also the Apple QuickTime MPEG-2 Playback component, which enables QuickTime to play Video CD (MPEG1) and DVD (MPEG2) content and even convert them to MPEG4.

Ripping DVD content for playback on the computer

Ripping DVDs. Surely that’s illegal? Only if I then pass copies on to others, which of course I won’t, will I? Let’s be clear from the start that I’m only talking about backing up legally purchased content for personal use.

One application commonly used to make backup copies of DVDs is Mac the Ripper. There is a Windows application called DVDShrink (which allows the DVD content to be reauthored and if necessary “shrunk” to fit on a standard DVD) but to simply rip a copy for local playback the most commonly used application is HandBrake (also available for a while as MediaFork but the two development streams have now merged and future versions will be known as HandBrake). I was having problems using this last night but once I stopped trying to rip at a constant quality of 100% quality (and stuck with the default setting of an average bitrate of 1000kbps – perfectly acceptable for computer playback) everything was fine.

Others have written better guides on this than me… you can find some here:

Playing Windows Media content on a Mac

Although I have a copy of Windows Media Player 9 for Mac OS X (which I think came with Office 2004 for Mac), Microsoft discontinued development of this product a while back and now distributes the free Flip4Mac Player as the Windows Media Components for QuickTime. Unfortunately there is no support for content that is protected with Windows Media digital rights management (DRM) but I’m sure there are cracks and workarounds for those who are motivated to do so… if the BBC distributes content in Windows Media format (therefore cutting out Mac and Linux users) then I might even have a look myself… the Wikipedia article on DRM is a good place to start.

Playing QuickTime content in full-screen mode without buying QuickTime Pro

Apple QuickTime Pro it is a handy application for $29.99 (although, yet again Apple rips us off in the UK with a dodgy exchange rate so it’s £20 here) as it can be extended to play other media formats (as discussed above); however one of the Pro benefits is playing content in full-screen mode. It seems that Mac users can trick the standard QuickTime application into playing content in full-screen mode using a little AppleScript. For QuickTime users on Windows, I wrote about some methods for full-screen MPEG4 playback last year – including simply playing the content through iTunes!

I hope this pile of multimedia tips has been useful. Comments are welcome from those who have other free or low-cost solutions to contribute to the mix.

Obtaining version information for Flash (.SWF) files

In my post about embedding video content in (X)HTML this morning, I mentioned that I didn’t know the correct codebase attribute to use when embedding Flash video clips from online resources in my web pages… well, now I do!

It seems that every Flash (.SWF) file includes a header which includes the Flash version number in the 4th byte.

OK… great… but how do I view the header?

First, I found a forum thread discussing a method for testing the minimum version of Flash player is required to display a .SWF. however, trying to write some ActionScript in MX Studio 2004 blew my mind (I don’t know anything about Flash development). A bit more googling led to another thread on .SWF header-only parsing, including some Java code (unfortunately I don’t know how to use a Java class either!).

Now what? Realising that I’m an operating-system-and-infrastructure-kind-of-guy and not a programmer, I started to think about the command line… what if I get hold of a .SWF file and type head filename.swf? Lots of beeps and unintelligible ASCII characters, that’s what! Hang on… that started with CWS? Flash file headers always begin with CWS or FWS… getting warmer… how can I read that 4th byte… think back to hacking school computers with the MS-DOS debugger 20 years ago… think hexadecimal… a hex editor – that’s the answer!

As I was working on Mac (i.e. no debug.exe available), I needed to download a free hex editor. HexEdit looked like it should do the trick but there is not a universal binary version available yet (only 68000 and PowerPC). Then I found a link to 0xED (nice name for a hex editor guys!) on the Apple development tools download site. I opened a .SWF file and… 43 (C)… 57 (W) … 53 (S)… 07… Flash Player 7 required. Sorted. Repeating for a few more files, I found FWS4 and FWS5… this was looking good, now what about the iFilm and YouTube links in my post this morning? As they don’t expose the content directly (even when you dig about in the HTML), I thought of using something like TubeSock to rip the content but realised that wouldn’t help in this case as it also performs a file format conversion. Then I noticed that the websites use their own Flash players to access the video content – 0xED can also open by path – and after entering the required URL ( or, I found the information I needed – YouTube content needs Flash Player 7 or later and iFilm content needs Flash Player 8 or later.

.SWF file viewed in 0xED

Now I can go back and edit those codebase attributes to the correct minimum player version!

Embedding video content in (X)HTML

Yesterday’s Mac vs. PC post should have been straightforward, except that it contained three video clips, each of which I wanted to embed in a standards-compliant way whilst maintaining maximum browser compatibility (i.e. ignoring the official advice from Adobe on embedding Flash content and Apple’s advice for embedding QuickTime content by avoiding the non-standard <embed> element and just using the <object> and <param> elements)… what a task that turned out to be.

To be honest, a lot of the problems probably came down to me not thinking my code was working because the preview function in my content management system (Blogger) failed to display the videos in one browser or another so, after another late night, I decided to publish and be damned. The resulting code seems to work for the Flash content on most the the browser/operating system combinations I have tried (Mozilla 1.7.13 and Firefox 1.5.06 on Linux; Internet Explorer 7.0.5730.11 on Windows XP, Safari 2.0.4 and Firefox on Mac OS X – Intel), although I was using Adobe Flash Player 9 (I’m not sure which version is needed for the clips I used so I didn’t update the codebase attribute to reflect it – older player versions will not automatically update until I fix this) and I’m aware that there may still be some issues with the QuickTime clip (it does seem to be working on Firefox and IE though).

So, how should this be done?

Firstly, the valid Flash, video, and audio embed (object) markup post at the Web Standards Project links to some great articles which should be read, namely:

These give the background to why the <embed> element shouldn’t be used, as well as demonstrating the use of conditional comments to force certain browsers into compliance. I actually used another variation on this theme – David Grudl’s how to correctly insert Flash into XHTML – ironically this uses a negated version of Internet Explorer-specific conditional comments to force IE into ignoring code intended for other browsers!

Then, there is the issue of the changes made to the behaviour of ActiveX content in Internet Explorer, following the Eolas patent suit, as described by Robert Nyman. In my case, it doesn’t really matter if you need to activate a control to view a video clip on my blog; however there are some workarounds. Most use JavaScript (indeed Adobe recommends a JavaScript-based workaround to the changes made in Internet Explorer) and one popular alternative is to use document.write in an external JavaScript function to dynamically re-write the object embedding code. Alternatives include Geoff Stearns’ SWFObject (formerly known as FlashObject) and Bobby van der Sluis’ unobtrusive flash objects (UFO). I plumped for a version I found in a comment by Karl Rudd the Robert Nyman post that I linked earlier (Fix It uses a similar concept, also advocated by David Grudl in his post on how to avoid activation of ActiveX in IE).

After spending most of yesterday working on the object embedding, and a good part of this morning writing about it here, I think I’ll leave that one alone now, unless anyone has any better ideas to fix my code (note that the <br /> tags scattered through it were added by Blogger – not by me).

Flash Earth

Many people are familiar with Google Earth and others may use Microsoft Virtual Earth but Paul Neave (who describes himself as a “serial flash fettler and interactive designer”) has produced a great mash-up of zoomable images from all the major aerial and satellite photograph providers called Flash Earth (alongside some other cool stuff on his website).

Flash Earth

One of Flash Earth’s strengths is the ability to switch between services on the fly as I’ve found that some services have better images than others (e.g. Microsoft gets closer to my home, but Google has higher resolution images of some neighbouring towns). Best of all, although Google Earth and competing products have additional functionality (for example, 3D viewpoints), Flash Earth doesn’t require any client software (aside from the Adobe Flash Player, which is a common browser plug-in) – of course, Windows Live Local offers a similar service, without using Flash and including additional functionality, but it is limited to the Microsoft mapping and imaging data.

It’s also worth noting that the images served by these services are not completely up-to-date. Based on new developments where I live and work, I’m guessing that the aerial data which Ask, Google, Microsoft and Yahoo! serve is approximately 4-7 years old (which service is more recent does vary though, according to the area being viewed) but Microsoft’s mapping data is more current than their images, which results in some interesting roads shown across fields in the hybrid view!

I should add that this blog post comes with a warning – browsing the planet looking at aerial photographs can lead to many wasted hours (and much lost sleep)… as I found to my own detriment last night!

Installing the Macromedia Flash plug-in on a Linux client

If, like me, you’ve been struggling to install the Macromedia Flash plug-in for Firefox on a Linux machine (in my case it was Fedora Core 5), then you may find item 12 on the Macromedia Flash Player 7 for x86 Linux frequently asked questions useful.

For weeks now, every time I’ve accessed a page containing Flash content (like this blog, for example) Firefox has seemingly downloaded and installed the missing plug-ins but the changes haven’t been accepted. After starting a terminal session and elevating my permissions to root (su -), creating a file called /etc/yum.repos.d/macromedia-i386.repo with the following contents:

name=Macromedia for i386 Linux

and executing the command:

yum install flash-plugin

the Flash plug-in was installed, although it also needed a browser reset before the changes took effect.

(Now all I need to do is get the Java runtime environment to load…)