Flash Video

Flash Video is a used to deliver  content (e.g., s, s, etc.) over the  using Macromedia Flash Player 6 and newer. Flash Video content may also be embedded within SWF files. There are two different Flash Video file formats: FLV and F4V. The audio and video data within FLV files are encoded in the same way as SWF files. The F4V file format is based on the, starting with Flash Player 9, update 3. Both formats are supported in Adobe Flash Player and developed by Adobe Systems. FLV was originally developed by Macromedia. In the early 2000s, Flash Video was the de facto standard for web-based streaming video (over RTMP). Users include, , , , , and many other news providers.

Flash Video FLV files usually contain material encoded with s following the or  s. As of 2010, public releases of Flash Player (collaboration between Adobe Systems and ) also support  video and  audio. All of these compression formats are restricted by patents. Flash Video is viewable on most operating systems via the Flash Player plug-in or one of several third-party programs. Apple's devices, along with almost all other mobile devices, do not support the Flash Player plugin and so require other delivery methods such as provided by the Adobe Media Server (formerly Macromedia Flash Media Server).

History
The 2002 release of Macromedia Flash Player 6 added support for video in the SWF file format. The 2003 release of Flash Player 7 added direct support for the FLV file format. Because of restrictions in the FLV file format, Adobe Systems created new file formats in 2007, based on the (MPEG-4 Part 12). In this way, the F4V format shares a common base with the format, which is why F4V is sometimes informally called "Flash MP4". Flash Player does not check the filename extension but instead examines the file to determine the format.

The new file formats are very different from the older FLV file format. For example, F4V does not support Screen video, Sorenson Spark, VP6 video compression formats and ADPCM, or Nellymoser audio compression formats. Authors of Flash Player strongly encourage use of the new standard file format F4V (ISO base media file format) because it overcomes functional limits with the FLV structure when streaming H.264 or AAC, which is one reason Adobe Systems is moving away from the older FLV file structure. Since 2002, the initial format is Flash Video and the file suffix is .flv with a MIME derived of video/x-flv.

The Adobe-branded file suffix .f4v was extended from 2007 to support the using the same MIME derived  of video/mp4 as the Apple file suffix of .m4v and the general file suffix of .mp4. Adobe-branded file suffixes exist for .f4p which relates to media encrypted with their Adobe Access DRM scheme; .f4a and .f4b relate respectively to .m4a and .m4b with the same MIME derived  of audio/mp4.

SWF files published for Flash Player 6 and later versions are able to exchange audio, video, and data over RTMP connections with the Flash Media Server. One way to feed data to server is from files in the FLV file format. Flash Player can play SWF files created for Flash Player 7 and later versions in FLV format directly (MIME type video/x-flv). Flash Player can also play the new F4V file format, beginning with SWF files created for Flash Player 9 Update 3.


 * Use of the H.264 compression format in the FLV file format has some limitations so the authors of Flash Player strongly encourage use of the new standard F4V file format.

Encoding
Commonly, Flash Video FLV files contain video s which are a proprietary variant of the video standard, under the name of  ( FLV1). Sorenson Spark is an older codec for FLV files but it is also a widely available and compatible one, because it was the first video codec supported in Flash Player. It is the required video compression format for Flash Player 6 and 7. Flash Player 8 and newer revisions also support the playback of  video bit streams (FourCC VP6F or FLV4). On2 VP6 is the preferred video compression format for use with Flash Player 8 and higher. On2 VP6 can provide a higher visual quality than Sorenson Spark, especially when using lower bit rates. On the other hand, it is computationally more complex and therefore will not run as well on certain older system configurations.

The Flash Video FLV file format supports two versions of a so-called 'screenshare' (Screen video) codec which is an encoding format designed for s. Both these formats are bitmap tile based, can be by reducing color depths and are compressed using. The second version is only playable in Flash Player 8 and newer. Audio in Flash Video files is usually encoded as MP3. However, audio in Flash Video FLV files recorded from the user's microphone use the proprietary. (Flash Player 10 released in 2008 also supports the  codec.) FLV files also support uncompressed audio or  format audio. Recent versions of Flash Player 9 support (/, AAC Main Profile, and AAC-LC). Support for encoding Flash Video files is provided by an encoding tool included with Adobe's Flash Professional and Creative Suite products, 's Flix encoding tools,, and other third party tools.

Media type support
Supported media types in both the Flash Video and ISO base media file formats:


 * Video
 * (added to MP4 and FLV)
 * unofficial Google GPL FLV implementations for Android
 * (native to MP4)
 * ITU (native to  MP4)
 * Audio
 * (native to Flash Video)
 * (added to Flash Video)

Supported media types in just the Flash Video file format:


 * General video
 * RGB (supported by same type code SWF uses)
 * (supported by same type code SWF uses)
 * (native to Flash Video)
 * On2 TrueMotion with and without alpha channel (added to Flash Video)
 * Animated video are the based Screen 1 and 2 (native to SWF).
 * General audio are PCM and (native to SWF).
 * Vocal audio
 * Nellymoser's @ 16 or 8 or 5 kHz (native to SWF)
 * and (native to SWF)
 * (added to FLV)
 * requires ActionScript specific commands for loading captioning, which is only supported by external text files in either or   formats.

Supported media types in just the ISO base media file format:


 * Animated video are QuickTime types for GIF, PNG and JPEG, which replace the Screen 1 and 2 encodings.
 * requires ActionScript specific commands for loading captions embedded as either or QuickTime mac based styled text with the  derived version that supports.

FLV converters
An FLV converter is a type of software that is used for turning videos from different formats into FLV. Below is a list of popular free video converters which support conversion to FLV.


 * (freeware)
 * (freeware)
 * (freeware)
 * (freeware)
 * Video Converter (-licensed free software)
 * Video Player (-licensed free software)
 * (freeware and commercial)
 * (-licensed free software)
 * (7z)-Via Extraction of Audios (MP3) and Videos (no audio)

These programs run under Microsoft Windows. HandBrake, FFmpeg and VLC also run under Mac OS X and.

Header
FLV files start with a standard header which is shown below:

Packets
After the header, the file is split into packets called "FLV tags", which have 15-byte packet headers. The first four bytes denote the size of the previous packet/tag (including the header without the first field), and aid in seeking backward.

The Packet Type byte of a packet/tag header is based on the RTMP message ID byte with the AMF metadata value of 18 (0x12), video payload value of 9 (0x09) and audio payload value of 8 (0x08) being the only valid types used. The third bit indicates the payload is encrypted using the same mechanism as RTMP uses, however this is rarely used due to encrypted transports such as RTMP being used instead. The FLV packet encryption is generally inherited from a MP4 file that is stored on a Flash Media Server.


 * Packet types enumerated as 1 is a RTMP set packet size.
 * Packet types enumerated from 3 are RTMP bytes read report, RTMP ping, RTMP server bandwidth, RTMP client bandwidth.
 * Packet types enumerated from 8 are Audio payload, Video payload.
 * Packet types enumerated from 15 are RTMP flex stream send, RTMP flex shared object, RTMP flex message, AMF metadata, shared object, RTMP invoke.
 * Packet type enumerated as 24 is an encapsulated flash video.

Following that, there are three bytes for the Payload Size denoting length of the Payload Data, then four bytes for the Timestamp in milliseconds (with the last byte used to extend the first three bytes), the next 3 bytes for the Stream ID (incremented for multiple streams of the same type), and finally followed by the actual payload data. There is a direct relation between the fields encountered in an FLV Tag and those found in a, as for example the FLV Packet Type field uses the same numeric values as the RTMP Chunk Type field (ex. 0x08 for audio and 0x09 for video). FLV tags are thus converted into RTMP packets when the file is streamed through a Flash Media Server or equivalent RTMP Server.

The first packet encountered is usually a metadata packet which contains information such as:


 * "duration" - 64-bit IEEE floating point value in seconds
 * "width" and "height" – 64-bit IEEE floating point value in pixels
 * "framerate" – 64-bit IEEE floating point value in frames per second
 * "keyframes" – an array with the positions of, needed when random access is sought.
 * "|AdditionalHeader" - an array of required stream decoding informational pairs
 * "Encryption" - an array of required encryption informational pairs
 * "Metadata" - encoded string of a signed  certificate containing the Adobe Access AES decryption key required

When streamed using an ActionScript built player, the values above are passed as arguments on the onMetaData callback function. Audio packets have the first byte of the payload defining the decoding details with the first four bits for the encoding used and the last four bits for the parameters required to process the encoding. Video packets have this order reversed.

Video encodings enumerated from 0 are:

Video processing parameters enumerated from 1 are:

MPEG-4 encodings such as H.264, MPEG-4 ASP and AAC add a one byte value with a NULL value indicating that the payload contains MPEG-4 configuration details. MPEG-4 video encodings also add three bytes for composition timestamp offset which is required for encodings that use B-frames.

Audio encodings enumerated from 0 are:

Audio encodings enumerated from 10 are:

Audio encodings enumerated from 14 are 8 kHz, Device specific such as MIDI.

Audio processing parameters with the first two bits for the sampling rate, next bit flags 16-bit sample size on with off indicating 8-bit sample size, and the final bit flags stereophonic channels on with off indicating monaural only. Sampling rates enumerated from 0 are 5.5 kHz, 11.025 kHz quarter, 22.05 kHz half, 44.1 kHz full.

Encrypted packets have an additional 31 or 24 byte header before the -CBC encrypted payload as follows:

FLV players
An FLV player is a type of media player that is used for playing Flash video from PC as well as from Internet websites. An FLV player can be used standalone, without the need of the Adobe Flash authoring or developmental tools. It can also be embedded in the website using Flash component or embeddable version of FLV player.

Flash Player is a multimedia and application player originally developed by Macromedia and acquired by Adobe Systems. It plays SWF files, which can be created by Flash Professional, Flex, or a number of other tools from Adobe Systems and third party developers. It has support for a scripting language called ActionScript, which can be used to display Flash Video from an SWF file. Because Flash Player runs as a plug-in, it is possible to embed Flash Video in web pages and view the video within a web browser. Flash Player supported display of Flash Video files since version 6, with the and On  video codecs. Support was recently added for video content as well.

H.264
Flash Player 9 Update 3, released on 3 December 2007, also includes support for the new Flash Video file format F4V and video standard (also known as MPEG-4 part 10, or AVC) which is even more computationally demanding, but offers significantly better quality/bitrate ratio. Specifically, Flash Player now supports video compressed in H.264 (MPEG-4 Part 10), audio compressed using (MPEG-4 Part 3), the F4V, MP4 (MPEG-4 Part 14), M4V, M4A,  and MOV multimedia,  specification (MPEG-4 Part 17) which is a standardized subtitle format and partial parsing support for the 'ilst' atom which is the  equivalent  uses to store. video (e.g. created with DivX or Xvid) is not supported. In an interview with, the main programmer of Flash Jonathan Gay said that the company had wanted to use H.264 when video support was originally added to Flash, but had been deterred by the patent licensing fees of around $5 million (£3.5 million) per year.

Playback
Flash Player supports two distinct modes of video playback:


 * Software Rendered Video : Flash Player supports software rendered video since version 6. Such video supports vector animations displayed above the video content. Such content is typically rendered using software decoding.


 * Hardware Accelerated Video : Flash Player supports hardware accelerated video playback since version 10.2, for, F4V, and FLV}} video formats. Such video is displayed above all Flash content, and takes advantage of chipsets installed on the user's device. Developers must specifically use the "StageVideo" technology within Flash Player in order for hardware decoding to be enabled. Flash Player internally uses technologies such as  and  to do so.

Desktop-based
(Microsoft Windows, Mac OS X, -based)
 * Adobe Media Player (freeware) (no longer published or supported by Adobe)
 * (free software)
 * (free software)
 * (freeware)
 * (free software)
 * (freeware)

Mac OS devices can play flash videos in QuickTime with the help of additional software (such as the open source component.)

PDA-based and smartphone-based
(Windows Mobile, Palm OS–based)
 * (open source software)

The and  devices can play flash videos with the help of additional software (such as the  web browser application.) Apple iOS has never supported Flash. Android versions above 2.1 through 4.0 supported Flash; Adobe has discontinued Flash Player for Android. On 29 June 2012, Adobe announced that, as they were discontinuing development of the mobile version of Flash, they would prevent the Flash player from installing from the Google Play Store on any Android devices that do not already have the Flash player installed, and that they would not be releasing a version of Flash certified for use with Android version 4.1, codenamed.

Delivery options
Flash Video files can be delivered in several different ways:


 * As a standalone .FLV file. Although Flash Video files are normally delivered using a Flash player for control, the .FLV file itself is only playable with an FLV player. There are several third party players available.
 * Embedded in an SWF file using the Flash authoring tool (supported in Flash Player 6 and later). The entire file must be transferred before playback can begin. Changing the video requires rebuilding the SWF file.
 * via (supported in Flash Player 7 and later). This method uses ActionScript to include an externally hosted Flash Video file client-side for playback.  has several advantages, including buffering, use of generic HTTP servers, and the ability to reuse a single SWF player for multiple Flash Video sources. Flash Player 8 includes support for random access within video files using the partial download functionality of HTTP, sometimes this is referred to as streaming. However, unlike streaming using RTMP, HTTP "streaming" does not support real-time broadcasting. Streaming via HTTP requires a custom player and the injection of specific Flash Video metadata containing the exact starting position in bytes and timecode of each keyframe. Using this specific information, a custom Flash Video player can request any part of the Flash Video file starting at a specified keyframe. For example,, , and  support progressive downloading and can seek to any part of the video before buffering is complete.
 * Streamed via RTMP to the Flash Player using the Flash Media Server (formerly called Flash Communication Server), free C++ RTMP Server, VCS, ElectroServer,, , Unified Streaming Platform WebORB for .NET, WebORB for Java, erlyvideo (in erlang), or the open source server. As of April 2008, there are stream recorders available for this protocol, re-encoding screencast software excluded.
 * Adobe Flash Media Server 4.5 and Media Server 5 allow Flash video streaming to s and s. It achieves this by delivering the content in an stream using the  format.

Flash video recording
It is possible to record online flash videos using s and. The former gives lossless results, while the latter allows recording any video even when anti- measures are used.