JW Player for Flash
JW Player: Supported Formats
This page lists all mediafile, streaming and playlist types the JW Player supports.
Single files
Note that the player always tries to recognize a file format by its extension. If no suitable extension is found, the player will presume you want to load a playlist! Get around this issue by setting the type flashvar, e.g. type=video.
- Video in FLV and MP4 format.
- Audio in MP3 and AAC format.
- Images in JPG, GIF and PNG format.
- Youtube video through their API.
Here's a list with commonly encountered issued:
- Though SWF files also load in the player, it is discouraged to use them. The player cannot read the duration and dimensions of SWF files and cannot control its volume or playback.
- If you cannot seek within an MP4 file be before it is completely downloaded, the cause of this problem is that the so-called MOOV atom (which contains the seeking information) is located at the end of your video. Check out this little application to parse your videos and fix it.
- If you encounter too fast or too slow playback of MP3 files, it contains variable bitrate encoding or unsupported sample frequencies (eg 48Khz). Please stick to constant bitrate encoding and 44 kHz. The free iTunes software has a decent MP3 encoder. Note that the 4.x player actually supports fewer formats than the 3.x player (it seems due to bugs in the AVM2).
- If the progress bar isn't running with your FLV file, or if your video dimensions are wrong, this means that your FLV file doesn't have metadata. Fix this by using the small tool from www.buraks.com/flvmdi/.
- If FLV playback doesn't work on your site which runs off an IIS server, the FLV mimetype isn't added to the server. Please contact your webserver administrator on this (if you're an admin, here's how to fix it).
- If your web server uses gzip compression when serving video or audio content, this can cause erratic player behavior. For more information on configuring gzip compression, consult the Apache mod_deflate documentation.
More technical info on the file formats supported by Flash can be found in this blogpost from Tinic Uro, one of the developers of the Flash plugin.
Streaming servers
Video and audio can also be played with RTMP, both on-demand and live (through the streamer variable). The following servers can be used:
FLV and MP4 can also be played back as HTTP streaming (again through the streamer variable). The following servers and scripts can be used:
- The H264 streaming module for Apache, Lighttpd and NginX.
- PHP scripts such as XmooV PHP.
- ASP scripts such as the one at the Flowplayer forum.
Additionally, there's out of the box support for streaming features of some big CDN's:
- FLV and MP4 streaming through the Bitgravity CDN by setting the flashvar type=bitgravity.
- Live and progressive streaming through the Highwinds CDN by setting the flashvar type=highwinds.
- FLV and MP4 streaming with the Lighttpd webserver by setting the flashvar type=lighttpd.
- FLV and MP4 streaming through VDO-X based CDN's by setting the flashvar type=vdox.
- MP4 streaming through the EdgeCast CDN by setting the flashvar type=edgecast.
- Live streaming through the Limelight CDN by setting the flashvar type=fcsubscribe and the flashvar streamer=YOUR_RTMP_SERVER.
- FLV seeking through the Limelight CDN by setting the flashvar type=flvseek.
XML Playlists
The following playlist formats are supported:
- ASX feeds (example)
- ATOM feeds with Media extensions (example)
- RSS feeds with iTunes (example) extensions and Media extensions (example).
- Basic SMIL feeds (example)
- XSPF feeds (example)
Here is an overview of all the tags of each format the player processes, and the flashvars they correspond to:
| Flashvars | XSPF | RSS | itunes: | media: | SMIL | ASX | ATOM |
| author | creator | - | author | credit | - | author | - |
| date | - | pubDate | - | - | - | - | published |
| description | annotation | description | summary | description | #.alt | abstract | summary |
| duration | duration | - | duration | content | #.dur | duration | - |
| file | location | enclosure | - | content | #.src | ref | - |
| link | info | link | - | - | anchor | moreinfo | link |
| image | image | - | - | thumbnail | img | - | - |
| start | - | - | - | - | #.begin | starttime | - |
| streamer | - | - | - | - | - | - | - |
| tags | - | category | keywords | keywords | - | - | - |
| title | title | title | - | title | #.title | title | title |
| type | - | - | - | - | - | - | - |
All media: tags can be embedded in a media:group element. A media:content element can also act as a container. Additionally, iTunes and MediaRSS tags can be mixed in one RSS feed. The player will pick the last matching element for each property.
The XSPF format has a meta tag that can be used to insert content not supported by the format (for example <meta rel="start>20</start>). The ASX format has a similar tag called param (for example <param name="start>20</start>)
Note that playlist XML files are subject to the Crossdomain security restrictions of Flash. This means that a videoplayer on one domain cannot load a playlist from another domain. It can be fixed by placing a crossdomain.xml file at the server the captions are loaded from.
JWPlayer namespace
In order to enable all JW Player file properties for all feed formats, the 4.4 player introduced a jwplayer namespace. By inserting this into your feed, file properties that are not supported by the feed format itself (such as the type or duration in an RSS feed) can be amended without breaking validation. Any of the flashvars listed in the above table can be inserted. Here's an example:
<rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/trac/wiki/FlashFormats">
<channel>
<title>Example RSS feed with jwplayer extensions</title>
<item>
<title>FLV Video</title>
<link>http://www.bigbuckbunny.org/</link>
<description>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation.</description>
<enclosure url="../../testing/files/bunny.flv" type="video/x-flv" length="1192846" />
<jwplayer:author>the Peach Open Movie Project</jwplayer:author>
<jwplayer:type>lighttpd</jwplayer:type>
<jwplayer:duration>34</jwplayer:duration>
</item>
</channel>
</rss>
Pay attention to the top level tag, which describes the JW Player namespace with the xmlns attribute. This must be available in order to not break validity.
You can mix jwplayer elements with both the regular elements of a feed and elements from other extensions (mrss/itunes). If multiple elements match the same property, the elements will be prioritized:
- Elements that are defined by the feed format (e.g. the enclosure in RSS) get the lowest priority.
- Elements defined by the itunes namespace rank third.
- Element defined by the media namespace (e.g. media:content) rank second.
- Elements defined by the jwplayer extension always gets the highest priority.
This feature allows you to set, for example, a specific video version or streaming type for the JW Player, while other feed aggregators will pick the default content.
