2 * Flash Compatible Streaming Format
3 * Copyright (c) 2000 Fabrice Bellard.
4 * Copyright (c) 2003 Tinic Uro.
6 * This file is part of FFmpeg.
8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 #include "bitstream.h"
24 #include "riff.h" /* for CodecTag */
26 /* should have a generic way to indicate probable size */
27 #define DUMMY_FILE_SIZE (100 * 1024 * 1024)
28 #define DUMMY_DURATION 600 /* in seconds */
31 #define TAG_SHOWFRAME 1
32 #define TAG_DEFINESHAPE 2
33 #define TAG_FREECHARACTER 3
34 #define TAG_PLACEOBJECT 4
35 #define TAG_REMOVEOBJECT 5
36 #define TAG_STREAMHEAD 18
37 #define TAG_STREAMBLOCK 19
39 #define TAG_PLACEOBJECT2 26
40 #define TAG_STREAMHEAD2 45
41 #define TAG_VIDEOSTREAM 60
42 #define TAG_VIDEOFRAME 61
44 #define TAG_LONG 0x100
46 /* flags for shape definition */
47 #define FLAG_MOVETO 0x01
48 #define FLAG_SETFILL0 0x02
49 #define FLAG_SETFILL1 0x04
51 #define AUDIO_FIFO_SIZE 65536
53 /* character id used */
63 offset_t duration_pos;
66 int samples_per_frame;
70 int video_frame_number;
84 static const CodecTag swf_codec_tags[] = {
85 {CODEC_ID_FLV1, 0x02},
86 {CODEC_ID_VP6F, 0x04},
90 static const int sSampleRates[3][4] = {
91 {44100, 48000, 32000, 0},
92 {22050, 24000, 16000, 0},
93 {11025, 12000, 8000, 0},
96 static const int sBitRates[2][3][15] = {
97 { { 0, 32, 64, 96,128,160,192,224,256,288,320,352,384,416,448},
98 { 0, 32, 48, 56, 64, 80, 96,112,128,160,192,224,256,320,384},
99 { 0, 32, 40, 48, 56, 64, 80, 96,112,128,160,192,224,256,320}
101 { { 0, 32, 48, 56, 64, 80, 96,112,128,144,160,176,192,224,256},
102 { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96,112,128,144,160},
103 { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96,112,128,144,160}
107 static const int sSamplesPerFrame[3][3] =
114 static const int sBitsPerSlot[3] = {
120 static int swf_mp3_info(void *data, int *byteSize, int *samplesPerFrame, int *sampleRate, int *isMono )
122 uint8_t *dataTmp = (uint8_t *)data;
123 uint32_t header = ( (uint32_t)dataTmp[0] << 24 ) | ( (uint32_t)dataTmp[1] << 16 ) | ( (uint32_t)dataTmp[2] << 8 ) | (uint32_t)dataTmp[3];
124 int layerID = 3 - ((header >> 17) & 0x03);
125 int bitRateID = ((header >> 12) & 0x0f);
126 int sampleRateID = ((header >> 10) & 0x03);
128 int bitsPerSlot = sBitsPerSlot[layerID];
129 int isPadded = ((header >> 9) & 0x01);
131 if ( (( header >> 21 ) & 0x7ff) != 0x7ff ) {
135 *isMono = ((header >> 6) & 0x03) == 0x03;
137 if ( (header >> 19 ) & 0x01 ) {
138 *sampleRate = sSampleRates[0][sampleRateID];
139 bitRate = sBitRates[0][layerID][bitRateID] * 1000;
140 *samplesPerFrame = sSamplesPerFrame[0][layerID];
142 if ( (header >> 20) & 0x01 ) {
143 *sampleRate = sSampleRates[1][sampleRateID];
144 bitRate = sBitRates[1][layerID][bitRateID] * 1000;
145 *samplesPerFrame = sSamplesPerFrame[1][layerID];
147 *sampleRate = sSampleRates[2][sampleRateID];
148 bitRate = sBitRates[1][layerID][bitRateID] * 1000;
149 *samplesPerFrame = sSamplesPerFrame[2][layerID];
153 *byteSize = ( ( ( ( *samplesPerFrame * (bitRate / bitsPerSlot) ) / *sampleRate ) + isPadded ) );
159 static void put_swf_tag(AVFormatContext *s, int tag)
161 SWFContext *swf = s->priv_data;
162 ByteIOContext *pb = &s->pb;
164 swf->tag_pos = url_ftell(pb);
166 /* reserve some room for the tag */
167 if (tag & TAG_LONG) {
175 static void put_swf_end_tag(AVFormatContext *s)
177 SWFContext *swf = s->priv_data;
178 ByteIOContext *pb = &s->pb;
183 tag_len = pos - swf->tag_pos - 2;
185 url_fseek(pb, swf->tag_pos, SEEK_SET);
186 if (tag & TAG_LONG) {
188 put_le16(pb, (tag << 6) | 0x3f);
189 put_le32(pb, tag_len - 4);
191 assert(tag_len < 0x3f);
192 put_le16(pb, (tag << 6) | tag_len);
194 url_fseek(pb, pos, SEEK_SET);
197 static inline void max_nbits(int *nbits_ptr, int val)
213 static void put_swf_rect(ByteIOContext *pb,
214 int xmin, int xmax, int ymin, int ymax)
220 init_put_bits(&p, buf, sizeof(buf));
223 max_nbits(&nbits, xmin);
224 max_nbits(&nbits, xmax);
225 max_nbits(&nbits, ymin);
226 max_nbits(&nbits, ymax);
227 mask = (1 << nbits) - 1;
230 put_bits(&p, 5, nbits);
231 put_bits(&p, nbits, xmin & mask);
232 put_bits(&p, nbits, xmax & mask);
233 put_bits(&p, nbits, ymin & mask);
234 put_bits(&p, nbits, ymax & mask);
237 put_buffer(pb, buf, pbBufPtr(&p) - p.buf);
240 static void put_swf_line_edge(PutBitContext *pb, int dx, int dy)
244 put_bits(pb, 1, 1); /* edge */
245 put_bits(pb, 1, 1); /* line select */
247 max_nbits(&nbits, dx);
248 max_nbits(&nbits, dy);
250 mask = (1 << nbits) - 1;
251 put_bits(pb, 4, nbits - 2); /* 16 bits precision */
255 put_bits(pb, nbits, dy & mask);
256 } else if (dy == 0) {
259 put_bits(pb, nbits, dx & mask);
262 put_bits(pb, nbits, dx & mask);
263 put_bits(pb, nbits, dy & mask);
270 static void put_swf_matrix(ByteIOContext *pb,
271 int a, int b, int c, int d, int tx, int ty)
277 init_put_bits(&p, buf, sizeof(buf));
279 put_bits(&p, 1, 1); /* a, d present */
281 max_nbits(&nbits, a);
282 max_nbits(&nbits, d);
283 put_bits(&p, 5, nbits); /* nb bits */
284 put_bits(&p, nbits, a);
285 put_bits(&p, nbits, d);
287 put_bits(&p, 1, 1); /* b, c present */
289 max_nbits(&nbits, c);
290 max_nbits(&nbits, b);
291 put_bits(&p, 5, nbits); /* nb bits */
292 put_bits(&p, nbits, c);
293 put_bits(&p, nbits, b);
296 max_nbits(&nbits, tx);
297 max_nbits(&nbits, ty);
298 put_bits(&p, 5, nbits); /* nb bits */
299 put_bits(&p, nbits, tx);
300 put_bits(&p, nbits, ty);
303 put_buffer(pb, buf, pbBufPtr(&p) - p.buf);
307 static int swf_write_header(AVFormatContext *s)
309 SWFContext *swf = s->priv_data;
310 ByteIOContext *pb = &s->pb;
311 AVCodecContext *enc, *audio_enc, *video_enc;
314 int i, width, height, rate, rate_base;
317 swf->audio_in_pos = 0;
318 swf->audio_out_pos = 0;
320 swf->audio_fifo = av_malloc(AUDIO_FIFO_SIZE);
321 swf->sound_samples = 0;
322 swf->video_samples = 0;
323 swf->swf_frame_number = 0;
324 swf->video_frame_number = 0;
328 for(i=0;i<s->nb_streams;i++) {
329 enc = s->streams[i]->codec;
330 if (enc->codec_type == CODEC_TYPE_AUDIO)
333 if ( enc->codec_id == CODEC_ID_VP6F ||
334 enc->codec_id == CODEC_ID_FLV1 ||
335 enc->codec_id == CODEC_ID_MJPEG ) {
338 av_log(enc, AV_LOG_ERROR, "SWF only supports VP6, FLV1 and MJPEG\n");
345 /* currenty, cannot work correctly if audio only */
352 swf->video_type = video_enc->codec_id;
353 width = video_enc->width;
354 height = video_enc->height;
355 rate = video_enc->time_base.den;
356 rate_base = video_enc->time_base.num;
361 swf->samples_per_frame = ( 44100. * rate_base ) / rate;
363 swf->audio_type = audio_enc->codec_id;
364 swf->samples_per_frame = ( ( audio_enc->sample_rate ) * rate_base ) / rate;
368 if ( video_enc && video_enc->codec_id == CODEC_ID_VP6F ) {
369 put_byte(pb, 8); /* version (version 8 and above support VP6 codec) */
370 } else if ( video_enc && video_enc->codec_id == CODEC_ID_FLV1 ) {
371 put_byte(pb, 6); /* version (version 6 and above support FLV1 codec) */
373 put_byte(pb, 4); /* version (should use 4 for mpeg audio support) */
375 put_le32(pb, DUMMY_FILE_SIZE); /* dummy size
376 (will be patched if not streamed) */
378 put_swf_rect(pb, 0, width * 20, 0, height * 20);
379 put_le16(pb, (rate * 256) / rate_base); /* frame rate */
380 swf->duration_pos = url_ftell(pb);
381 put_le16(pb, (uint16_t)(DUMMY_DURATION * (int64_t)rate / rate_base)); /* frame count */
383 /* define a shape with the jpeg inside */
384 if ( video_enc && (video_enc->codec_id == CODEC_ID_VP6F ||
385 video_enc->codec_id == CODEC_ID_FLV1 )) {
386 } else if ( video_enc && video_enc->codec_id == CODEC_ID_MJPEG ) {
387 put_swf_tag(s, TAG_DEFINESHAPE);
389 put_le16(pb, SHAPE_ID); /* ID of shape */
390 /* bounding rectangle */
391 put_swf_rect(pb, 0, width, 0, height);
393 put_byte(pb, 1); /* one fill style */
394 put_byte(pb, 0x41); /* clipped bitmap fill */
395 put_le16(pb, BITMAP_ID); /* bitmap ID */
396 /* position of the bitmap */
397 put_swf_matrix(pb, (int)(1.0 * (1 << FRAC_BITS)), 0,
398 0, (int)(1.0 * (1 << FRAC_BITS)), 0, 0);
399 put_byte(pb, 0); /* no line style */
402 init_put_bits(&p, buf1, sizeof(buf1));
403 put_bits(&p, 4, 1); /* one fill bit */
404 put_bits(&p, 4, 0); /* zero line bit */
406 put_bits(&p, 1, 0); /* not an edge */
407 put_bits(&p, 5, FLAG_MOVETO | FLAG_SETFILL0);
408 put_bits(&p, 5, 1); /* nbits */
409 put_bits(&p, 1, 0); /* X */
410 put_bits(&p, 1, 0); /* Y */
411 put_bits(&p, 1, 1); /* set fill style 1 */
413 /* draw the rectangle ! */
414 put_swf_line_edge(&p, width, 0);
415 put_swf_line_edge(&p, 0, height);
416 put_swf_line_edge(&p, -width, 0);
417 put_swf_line_edge(&p, 0, -height);
420 put_bits(&p, 1, 0); /* not an edge */
424 put_buffer(pb, buf1, pbBufPtr(&p) - p.buf);
429 if (audio_enc && audio_enc->codec_id == CODEC_ID_MP3 ) {
433 put_swf_tag(s, TAG_STREAMHEAD2);
436 switch(audio_enc->sample_rate) {
448 av_log(s, AV_LOG_ERROR, "swf doesnt support that sample rate, choose from (44100, 22050, 11025)\n");
449 av_free(swf->audio_fifo);
452 v |= 0x02; /* 16 bit playback */
453 if (audio_enc->channels == 2)
454 v |= 0x01; /* stereo playback */
456 v |= 0x20; /* mp3 compressed */
458 put_le16(&s->pb, swf->samples_per_frame); /* avg samples per frame */
464 put_flush_packet(&s->pb);
468 static int swf_write_video(AVFormatContext *s,
469 AVCodecContext *enc, const uint8_t *buf, int size)
471 SWFContext *swf = s->priv_data;
472 ByteIOContext *pb = &s->pb;
477 /* Flash Player limit */
478 if ( swf->swf_frame_number == 16000 ) {
479 av_log(enc, AV_LOG_INFO, "warning: Flash Player limit of 16000 frames reached\n");
482 if ( swf->audio_type ) {
483 /* Prescan audio data for this swf frame */
484 retry_swf_audio_packet:
485 if ( ( swf->audio_size-outSize ) >= 4 ) {
486 int mp3FrameSize = 0;
487 int mp3SampleRate = 0;
489 int mp3SamplesPerFrame = 0;
491 /* copy out mp3 header from ring buffer */
493 for (c=0; c<4; c++) {
494 header[c] = swf->audio_fifo[(swf->audio_in_pos+outSize+c) % AUDIO_FIFO_SIZE];
497 if ( swf_mp3_info(header,&mp3FrameSize,&mp3SamplesPerFrame,&mp3SampleRate,&mp3IsMono) ) {
498 if ( ( swf->audio_size-outSize ) >= mp3FrameSize ) {
499 outSize += mp3FrameSize;
500 outSamples += mp3SamplesPerFrame;
501 if ( ( swf->sound_samples + outSamples + swf->samples_per_frame ) < swf->video_samples ) {
502 goto retry_swf_audio_packet;
506 /* invalid mp3 data, skip forward
507 we need to do this since the Flash Player
508 does not like custom headers */
509 swf->audio_in_pos ++;
511 swf->audio_in_pos %= AUDIO_FIFO_SIZE;
512 goto retry_swf_audio_packet;
516 /* audio stream is behind video stream, bail */
517 if ( ( swf->sound_samples + outSamples + swf->samples_per_frame ) < swf->video_samples ) {
522 if ( swf->video_type == CODEC_ID_VP6F ||
523 swf->video_type == CODEC_ID_FLV1 ) {
524 if ( swf->video_frame_number == 0 ) {
525 /* create a new video object */
526 put_swf_tag(s, TAG_VIDEOSTREAM);
527 put_le16(pb, VIDEO_ID);
528 put_le16(pb, 15000 ); /* hard flash player limit */
529 put_le16(pb, enc->width);
530 put_le16(pb, enc->height);
532 put_byte(pb,codec_get_tag(swf_codec_tags,swf->video_type));
535 /* place the video object for the first time */
536 put_swf_tag(s, TAG_PLACEOBJECT2);
539 put_le16(pb, VIDEO_ID);
540 put_swf_matrix(pb, 1 << FRAC_BITS, 0, 0, 1 << FRAC_BITS, 0, 0);
541 put_le16(pb, swf->video_frame_number );
550 /* mark the character for update */
551 put_swf_tag(s, TAG_PLACEOBJECT2);
554 put_le16(pb, swf->video_frame_number );
558 /* set video frame data */
559 put_swf_tag(s, TAG_VIDEOFRAME | TAG_LONG);
560 put_le16(pb, VIDEO_ID);
561 put_le16(pb, swf->video_frame_number++ );
562 put_buffer(pb, buf, size);
564 } else if ( swf->video_type == CODEC_ID_MJPEG ) {
565 if (swf->swf_frame_number > 0) {
566 /* remove the shape */
567 put_swf_tag(s, TAG_REMOVEOBJECT);
568 put_le16(pb, SHAPE_ID); /* shape ID */
569 put_le16(pb, 1); /* depth */
572 /* free the bitmap */
573 put_swf_tag(s, TAG_FREECHARACTER);
574 put_le16(pb, BITMAP_ID);
578 put_swf_tag(s, TAG_JPEG2 | TAG_LONG);
580 put_le16(pb, BITMAP_ID); /* ID of the image */
582 /* a dummy jpeg header seems to be required */
587 /* write the jpeg image */
588 put_buffer(pb, buf, size);
594 put_swf_tag(s, TAG_PLACEOBJECT);
595 put_le16(pb, SHAPE_ID); /* shape ID */
596 put_le16(pb, 1); /* depth */
597 put_swf_matrix(pb, 20 << FRAC_BITS, 0, 0, 20 << FRAC_BITS, 0, 0);
603 swf->swf_frame_number ++;
605 swf->video_samples += swf->samples_per_frame;
607 /* streaming sound always should be placed just before showframe tags */
609 put_swf_tag(s, TAG_STREAMBLOCK | TAG_LONG);
610 put_le16(pb, outSamples);
612 for (c=0; c<outSize; c++) {
613 put_byte(pb,swf->audio_fifo[(swf->audio_in_pos+c) % AUDIO_FIFO_SIZE]);
618 swf->sound_samples += outSamples;
619 swf->audio_in_pos += outSize;
620 swf->audio_size -= outSize;
621 swf->audio_in_pos %= AUDIO_FIFO_SIZE;
624 /* output the frame */
625 put_swf_tag(s, TAG_SHOWFRAME);
628 put_flush_packet(&s->pb);
633 static int swf_write_audio(AVFormatContext *s,
634 AVCodecContext *enc, const uint8_t *buf, int size)
636 SWFContext *swf = s->priv_data;
639 /* Flash Player limit */
640 if ( swf->swf_frame_number == 16000 ) {
641 av_log(enc, AV_LOG_INFO, "warning: Flash Player limit of 16000 frames reached\n");
644 if (enc->codec_id == CODEC_ID_MP3 ) {
645 for (c=0; c<size; c++) {
646 swf->audio_fifo[(swf->audio_out_pos+c)%AUDIO_FIFO_SIZE] = buf[c];
648 swf->audio_size += size;
649 swf->audio_out_pos += size;
650 swf->audio_out_pos %= AUDIO_FIFO_SIZE;
653 /* if audio only stream make sure we add swf frames */
654 if ( swf->video_type == 0 ) {
655 swf_write_video(s, enc, 0, 0);
661 static int swf_write_packet(AVFormatContext *s, AVPacket *pkt)
663 AVCodecContext *codec = s->streams[pkt->stream_index]->codec;
664 if (codec->codec_type == CODEC_TYPE_AUDIO)
665 return swf_write_audio(s, codec, pkt->data, pkt->size);
667 return swf_write_video(s, codec, pkt->data, pkt->size);
670 static int swf_write_trailer(AVFormatContext *s)
672 SWFContext *swf = s->priv_data;
673 ByteIOContext *pb = &s->pb;
674 AVCodecContext *enc, *video_enc;
678 for(i=0;i<s->nb_streams;i++) {
679 enc = s->streams[i]->codec;
680 if (enc->codec_type == CODEC_TYPE_VIDEO)
684 put_swf_tag(s, TAG_END);
687 put_flush_packet(&s->pb);
689 /* patch file size and number of frames if not streamed */
690 if (!url_is_streamed(&s->pb) && video_enc) {
691 file_size = url_ftell(pb);
692 url_fseek(pb, 4, SEEK_SET);
693 put_le32(pb, file_size);
694 url_fseek(pb, swf->duration_pos, SEEK_SET);
695 put_le16(pb, video_enc->frame_number);
698 av_free(swf->audio_fifo);
702 #endif //CONFIG_MUXERS
704 /*********************************************/
705 /* Extract FLV encoded frame and MP3 from swf
706 Note that the detection of the real frame
707 is inaccurate at this point as it can be
708 quite tricky to determine, you almost certainly
709 will get a bad audio/video sync */
711 static int get_swf_tag(ByteIOContext *pb, int *len_ptr)
724 // av_log(NULL, AV_LOG_DEBUG, "Tag: %d - Len: %d\n", tag, len);
730 static int swf_probe(AVProbeData *p)
732 /* check file header */
733 if (p->buf_size <= 16)
735 if ((p->buf[0] == 'F' || p->buf[0] == 'C') && p->buf[1] == 'W' &&
737 return AVPROBE_SCORE_MAX;
742 static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
745 ByteIOContext *pb = &s->pb;
746 int nbits, len, frame_rate, tag, v;
747 offset_t firstTagOff;
751 swf = av_malloc(sizeof(SWFContext));
756 tag = get_be32(pb) & 0xffffff00;
758 if (tag == MKBETAG('C', 'W', 'S', 0))
760 av_log(s, AV_LOG_ERROR, "Compressed SWF format not supported\n");
763 if (tag != MKBETAG('F', 'W', 'S', 0))
766 /* skip rectangle size */
767 nbits = get_byte(pb) >> 3;
768 len = (4 * nbits - 3 + 7) / 8;
770 frame_rate = get_le16(pb);
771 get_le16(pb); /* frame count */
773 /* The Flash Player converts 8.8 frame rates
774 to milliseconds internally. Do the same to get
775 a correct framerate */
776 swf->ms_per_frame = ( 1000 * 256 ) / frame_rate;
777 swf->samples_per_frame = 0;
780 firstTagOff = url_ftell(pb);
782 tag = get_swf_tag(pb, &len);
786 vst->codec->time_base.den = ast->codec->sample_rate / swf->samples_per_frame;
787 vst->codec->time_base.num = 1;
791 av_log(s, AV_LOG_ERROR, "No media found in SWF\n");
794 if ( tag == TAG_VIDEOSTREAM && !vst) {
795 swf->ch_id = get_le16(pb);
801 vst = av_new_stream(s, 0);
802 av_set_pts_info(vst, 24, 1, 1000); /* 24 bit pts in ms */
803 vst->codec->codec_type = CODEC_TYPE_VIDEO;
804 vst->codec->codec_id = codec_get_id(swf_codec_tags, get_byte(pb));
805 if (swf->samples_per_frame) {
806 vst->codec->time_base.den = 1000. / swf->ms_per_frame;
807 vst->codec->time_base.num = 1;
809 } else if ( ( tag == TAG_STREAMHEAD || tag == TAG_STREAMHEAD2 ) && !ast) {
810 /* streaming found */
813 swf->samples_per_frame = get_le16(pb);
816 /* if mp3 streaming found, OK */
817 if ((v & 0x20) != 0) {
818 ast = av_new_stream(s, 1);
821 av_set_pts_info(ast, 24, 1, 1000); /* 24 bit pts in ms */
823 ast->codec->channels = 1 + (v&1);
825 switch((v>> 2) & 0x03) {
827 ast->codec->sample_rate = 11025;
830 ast->codec->sample_rate = 22050;
833 ast->codec->sample_rate = 44100;
839 ast->codec->codec_type = CODEC_TYPE_AUDIO;
840 ast->codec->codec_id = CODEC_ID_MP3;
841 ast->need_parsing = 1;
847 url_fseek(pb, firstTagOff, SEEK_SET);
852 static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
854 SWFContext *swf = s->priv_data;
855 ByteIOContext *pb = &s->pb;
857 int tag, len, i, frame;
860 tag = get_swf_tag(pb, &len);
863 if (tag == TAG_VIDEOFRAME) {
864 for( i=0; i<s->nb_streams; i++ ) {
867 if ( get_le16(pb) == swf->ch_id ) {
868 frame = get_le16(pb);
869 av_get_packet(pb, pkt, len-4);
870 pkt->pts = frame * swf->ms_per_frame;
871 pkt->stream_index = st->index;
874 url_fskip(pb, len-2);
880 } else if (tag == TAG_STREAMBLOCK) {
881 for( i=0; i<s->nb_streams; i++ ) {
885 av_get_packet(pb, pkt, len-4);
886 pkt->stream_index = st->index;
898 static int swf_read_close(AVFormatContext *s)
903 #ifdef CONFIG_SWF_DEMUXER
904 AVInputFormat swf_demuxer = {
914 #ifdef CONFIG_SWF_MUXER
915 AVOutputFormat swf_muxer = {
918 "application/x-shockwave-flash",