FLV (.flv)

Background & Context

    • Registered MIME type: video/x-flv
    • Adobe/Macromedia Flash video file.
    • Used for compositing Flash animations with Flash authoring software or for playback through a Flash-based video player.
    • FLV is an acronym derived from Flash Video.
    • Adobe announced the end-of-life for Adobe Flash Player at the end of 2020.

Import & Export

  • Import["file.flv"] imports a video file and returns a Video object.
  • Import["file.flv",elem] imports the specified element from a video file.
  • The import format can be specified with Import["file","FLV"] or Import["file",{"FLV",elem,}].
  • Import of FLV requires a full FFmpeg installation.
  • Export["file.flv",expr] exports expr to FLV.
  • The following expressions are supported:
  • AnimatedImage[]export an AnimatedImage object
    Manipulate[expr,]frames generated by a Manipulate object
    Video[]a Video object
    {expr1,expr2,}a list of Graphics, Image or other arbitrary expressions
  • When exporting arbitrary expressions expri, the animation is composed from frames corresponding to rasterized images of the expri, having the same display size.
  • The duration of the FLV is determined from the number of frames and the specified frame rate.
  • If bookmarks are set in the Manipulate object, Export will create an FLV file by interpolating between the bookmarks while preserving the speed and duration of the Manipulate.
  • Export["file.flv",{elem1->expr1,elem2->expr2,},"Rules"] uses rules to specify the elements to be exported.
  • See the following reference pages for full general information:
  • Exportexport to a file
    CloudExportexport to a cloud object
    ExportStringexport to a string
    ExportByteArrayexport to a byte array

Import Elements

  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Rules"full list of rules for each element and option
    "Options"list of rules for options, properties and settings
  • Video representation elements:
  • "ImageList"frames represented as a list of images
    "Video"video file represented as a Video object
    "VideoData"array of raw bitmap data for each frame
    "VideoStream"a handle to the video file as a VideoStream object
  • Import by default uses the "Video" element.
  • A video file may contain multiple video and audio tracks. Elements that return the number of tracks:
  • "AudioTrackCount"number of audio tracks
    "VideoTrackCount"number of video tracks
  • Video metadata elements:
  • "BitDepth"bits used to represent each color channel in the file
    "ColorSpace"color encoding used in the file
    "FrameCount"number of frames in the file
    "FrameDurations"list of display durations given for each frame
    "FrameRate"number of frames to be displayed per second
    "RasterSize"raster dimensions
    "VideoEncoding"video codec used in the file
  • Audio related elements:
  • "Audio"in-core Audio object
    "AudioChannels"number of audio channels
    "AudioData"array of audio samples
    "AudioEncoding"audio codec used in the file
    "AudioFile"out-of-core Audio object
    "BitRate"number of bits per second
    "SampleRate"number of audio samples per second
  • Additional metadata elements:
  • "Duration"approximate duration of the video given in seconds
    "ExactDurations"an association of exact durations for all video, audio and subtitle tracks
    "ExactTimeBoundaries"an association of exact start and end times for all video, audio and subtitle tracks
    "MetaInformation"metadata interpreted as quantities, locations, dates, numbers, etc.
    "RawMetaInformation"uninterpreted metadata as strings and numbers
    "Summary"summary of the file
    "TrackStartTimes"an association of start times for each track
  • $VideoDecoders and $AudioDecoders give a list of decoders available on your computer system.

Options

  • General Import options:
  • AudioTracks1audio tracks of interest
    "ImageTopOrientation"Automaticorientation of the video as stored in the file
    RasterSizeAutomaticraster dimensions
    SubtitleTracks1subtitle tracks of interest
    VideoTracks1video tracks of interest
  • Import options for the "Audio" element:
  • "AudioChannels"Automaticnumber of audio channels
    SampleRateAutomaticsamples per second for each channel
  • Export options:
  • BackgroundWhitecolor of area padded around the exported animation
    ImageSizeAutomaticpixel dimensions of the animated object
    "CompressionMethod"Nonewhether the FLV data should be compressed
    "HTMLFile"Nonename of the file to which an HTML wrapper should be written
    "ThumbnailFile"Nonename of the file to which a small preview image of the first frame should be exported
  • Allowed settings for "CompressionMethod" are None and "GZ".
  • Export options when exporting Manipulate expressions:
  • "AnimationDuration"Automaticlength of the animation in seconds when exporting a Manipulate object
    "ControlAppearance""Generic"how Manipulate control elements are rendered in the exported file
    "FrameRate"15number of frames shown per second
    "RepeatAnimation"Truewhether the animation loops indefinitely
    "Scalable"Falsewhether the animation scales to fit into the window when played with a browser plugin
  • The following settings can be given for "ControlAppearance":
  • Automaticcaptures user controls exactly as seen in the notebook interface, using the style elements of the local computer system
    "Generic"renders graphical controls in a generic style
    Noneexcludes control elements when exporting an animation

Examples

open allclose all

Basic Examples  (1)

Create an FLV file:

Summary of the FLV file:

Adobe announced the end-of-life for Adobe Flash Player at the end of 2020. Convert the FLV to "MP4":

Scope  (2)

Export  (2)

Adobe has announced the end-of-life for Adobe Flash Player at the end of 2020. Export to modern formats such as "MP4" instead.

Create a Manipulate to be exported to FLV:

Export it to FLV:

You can export a ListAnimate object to FLV: