Issue with "ffplay" on SWF Output File

This section provides a tutorial example showing an issue with 'ffprobe' and 'ffplay' commands from FFmpeg on the SWF file generated by the 'ffmpeg' conversion command.

After converting the example movie file from MPEG 4 format to SWF format, let's verify the resulting output file, Tony_reelshow_2009_512kb.swf.

Check the output with "swfdump" command from SWFTools first:

C:\herong>\local\SWFTools\swfdump Tony_reelshow_2009_512kb.swf

[HEADER]   File version: 6
[HEADER]   File size: 8383705
[HEADER]   Frame rate: 25.000000
[HEADER]   Frame count: 4795
[HEADER]   Movie width: 416.00
[HEADER]   Movie height: 240.00
[02d]    6 SOUNDSTREAMHEAD2
[03c]   10 DEFINEVIDEOSTREAM defines id 0000 (4795 frames, 
           416x240 sorenson h.263)
[01a]   21 PLACEOBJECT2 places id 0000 at depth 0001 name "video"
[03d] 6485 VIDEOFRAME adds information to id 0000 (frame 0) 416x240 
           I-frame deblock 1  quant: 3
[013]  421 SOUNDSTREAMBLOCK
[001]    0 SHOWFRAME 1 (00:00:00,000)
[01a]    5 PLACEOBJECT2 moves object at depth 0001
[03d] 1069 VIDEOFRAME adds information to id 0000 (frame 1) 416x240 
           P-frame deblock 1  quant: 2
[013]  422 SOUNDSTREAMBLOCK
[001]    0 SHOWFRAME 2 (00:00:00,040)
...

It looks good. 4795 frames and 25 frames per second gives 00:03:11.400 play time matching the original MPEG4 file. Resolution 416x240 pixels is also maintained.

Check the output with "ffprove" command from FFmpeg:

C:\herong>\local\ffmpeg\bin\ffprobe Tony_reelshow_2009_512kb.swf

...
[swf@03ee28c0] Estimating duration from bitrate, this may be inaccurate
Input #0, swf, from 'Tony_reelshow_2009_512kb.swf':
 Duration: 00:08:44.00, start: 0.000000, bitrate: 127 kb/s
  Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
  Stream #0:1: Video: flv1, yuv420p, 416x240, 25 fps, 25 tbr, 25 tbn

The output looks ok except "Duration: 00:08:44.00". "ffprobe" command failed to calculate the correct play time. It should be "00:03:11.400". This seems to be a code bug in "ffprobe".

Play the output with "ffplay" command from FFmpeg:

C:\herong>\local\ffmpeg\bin\ffplay Tony_reelshow_2009_512kb.swf

...
 208.83 A-V: -0.016 fd=  16 aq=    0KB vq=    0KB sq=    0B f=0/0
 ...
 696.10 A-V: -0.010 fd=  12 aq=    0KB vq=    0KB sq=    0B f=0/0
 ...

The "ffplay" command also has an issue after it reaches the last SWF frame at 191.40 seconds (or 00:03:11.400 in timestamp). "ffplay" failed to stop the play and continued to play forever with some junk data.

Play the output with "flashplayer_13_sa" command from Flash Player Projector:

C:\herong>\local\bin\flashplayer_13_sa Tony_reelshow_2009_512kb.swf

"flashplayer_13_sa" had no problem to play the SWF file.

Last update: 2014.

Table of Contents

 About This Book

 Introduction of Adobe Flash

 Adobe Flash Player Plugin for Firefox

 Adobe Flash Player Plugin for Chrome

 Adobe Flash Player Plugin for Safari

 Adobe Flash Player ActiveX for IE

 Using "object" Elements for Flash Files

 Using "embed" Elements for Flash Files

 "mp3player" - MP3 Music Player

 SWFObject - Hidding "object" behind JavaScript

 Flash Player Projector

 SWFTools - SWF File Manipulation Tools

 SWFC Script to Generate Flash SWF Files

 ActionScript Embedded in SWFC Script

 AS3Compile - ActionScript 3 Compiler

 Adobe Flex SDK 4

 SWF File Structure and Tags

 SWF File Processing Rules

SWF Files for Video and Audio Streams

 Video and Audio Stream SWF File Structure

 Installing FFmpeg to Manipulate Video SWF Files

 Playing Movie with FFmpeg "ffplay" Command

 See File Properties with FFmpeg "ffprobe" Command

 Convert File Format with "ffmpeg" Command

Issue with "ffplay" on SWF Output File

 "ffplay" Interactive Commands

 Break Long Video into Parts with "ffmpeg"

 Concatenate Video Files with "ffmpeg"

 Video/Audio Stream Concatenation Order

 Split Audio Stream Out of SWF File

 Split Video Stream Out of SWF File

 Merge Video and Audio Streams to SWF File

 Reduce Video Stream Resolution

 Reduce Video Frame Rate

 Outdated Tutorials

 References

 PDF Printing Version