This help forum topic addresses the requirements of video to be uploaded and converted to Flash on the site for playback. It does not address questions on how to create or compress video (i.e. to meet the 100MB file size requirement). If you need help in these areas, we suggest posting a new forum topic to the community, as the solutions for creating and compressing video are complex and depend on the hardware and software tools being used.
Requirements
In order to upload and make a video available for playback on the Stories for Change site, the video will need to meet some requirements:
- The file must be 100 MB or smaller
- The file must be supported by ffmpeg for conversion to Flash video. Information on ffmpeg and the supported video formats is below.
ffmpeg
As stated above, the Stories for Change site uses an application called ffmpeg (http://ffmpeg.mplayerhq.hu) to convert uploaded videos to Flash. This application supports most video file formats and codecs.
A video file format is a standard for encoding digital video, audio and some auxiliary information (metadata) into a file. In contrast to audio and image formats, most video file formats are containers, allowing for a variety of audio and video codecs to be used. See http://en.wikipedia.org/wiki/Video_file_format for more information.
A video codec is a software module that enables the use of compression for digital video, and an audio codec is used to convert audio to a particular file format. See http://en.wikipedia.org/wiki/Video_codec and http://en.wikipedia.org/wiki/Audio_codec for more information. A video file is created using specific video and audio codecs. What codecs are used depends on the tools that are used to create the video.
Examples:
- file format (.mov, .avi, .mpeg)
- video codec (mpeg-4, mmpeg-2, aac)
- audio codec (mp3, flac, mpeg4)
If an unsupported file format is used or unsupported codec is used to create the video, the ffmpeg conversion to flash will fail.
The most common video file formats are supported:
- avi
- dv
- flv
- gif
- mov
- mp4
- m4a
- 3gp
- 3g2
- mpeg
- wav
- rm
The complete list of supported formats and codecs are provided when running the ffmpeg -format command on the server and are as follows:
File formats:
3g2 - 3gp2 format
3gp - 3gp format
4xm - 4X Technologies format
RoQ - Id RoQ format
ac3 - raw ac3
alaw - pcm A law format
asf - asf format
asf_stream - asf format
au - SUN AU Format
audio_dice - audio grab and output
avi - avi format
crc - crc testing format
daud - D-Cinema audio format
dc1394 - dc1394 A/V grab
s - raw s
dv - DV video format
dv1394 - dv1394 A/V grab
dvd - MPEG2 PS format (DVD VOB)
ea - Electronic Arts Multimedia Format
ffm - ffm format
film_cpk - Sega FILM/CPK format
flic - FLI/FLC animation format
flv - flv format
gif - GIF Animation
h261 - raw h261
h263 - raw h263
h264 - raw H264 video format
idcin - Id CIN format
image - image sequence
image2 - image2 sequence
image2pipe - piped image2 sequence
imagepipe - piped image sequence
ipmovie - Interplay MVE format
m4v - raw MPEG4 video format
matroska - Matroska file format
mjpeg - MJPEG video
mmf - mmf format
mov - mov format
mov,mp4,m4a,3gp,3g2 QuickTime/MPEG4 format
mp2 - MPEG audio layer 2
mp3 - MPEG audio layer 3
mp4 - mp4 format
mpeg - MPEG1 System format
mpeg1video - MPEG video
mpeg2video - MPEG2 video
mpegts - PEG2 transport stream format
mpegvideo - MPEG video
mpjpeg - Mime multipart JPEG format
mulaw - pcm mu law format
nsv - NullSoft Video format
null - null video format
nut - nut format
ogg - Ogg Vorbis
psp - psp mp4 format
psxstr - Sony Playstation STR format
rawvideo - raw video format
redir - Redirector format
rm - rm format
rtp - RTP output format
rtsp - RTSP input format
s16be - pcm signed 16 bit big endian format
s16le - pcm signed 16 bit little endian format
s8 - pcm signed 8 bit format
sdp - SDP
shn - raw shn
sol - Sierra SOL Format
svcd - MPEG2 PS format (VOB)
swf - Flash format
u16be - pcm unsigned 16 bit big endian format
u16le - pcm unsigned 16 bit little endian format
u8 - pcm unsigned 8 bit format
vcd - MPEG1 System format (VCD)
video4linux - video grab
vmd - Sierra VMD format
vob - MPEG2 PS format (VOB)
wav - wav format
wc3movie - Wing Commander III movie format
wsaud - Westwood Studios audio format
wsvqa - Westwood Studios VQA format
yuv4mpegpipe - YUV4MPEG pipe format
Codecs:
4xm
8bps
aac
aasc
ac3
adpcm_4xm
adpcm_adx
adpcm_ct
adpcm_ea
adpcm_ima_dk3
adpcm_ima_dk4
adpcm_ima_qt
adpcm_ima_smjpeg
adpcm_ima_wav
adpcm_ima_ws
adpcm_ms
adpcm_swf
adpcm_xa
adpcm_yamaha
alac
asv1
asv2
camtasia
cinepak
cljr
cyuv
s
dvbsub
dvdsub
dvvideo
ffv1
ffvhuff
flac
flic
flv
fraps
g726
gsm
h261
h263
h263i
h263p
h264
huffyuv
idcinvideo
indeo2
indeo3
interplay_dpcm
interplayvideo
ljpeg
loco
mace3
mace6
mdec
mjpeg
mjpegb
mp2
mp3
mp3adu
mp3on4
mpeg1video
mpeg2video
mpeg4
mpeg4aac
mpegvideo
msmpeg4
msmpeg4v1
msmpeg4v2
msrle
msvideo1
mszh
pam
pbm
pcm_alaw
pcm_mulaw
pcm_s16be
pcm_s16le
pcm_s24be
pcm_s24daud
pcm_s24le
pcm_s32be
pcm_s32le
pcm_s8
pcm_u16be
pcm_u16le
pcm_u24be
pcm_u24le
pcm_u32be
pcm_u32le
pcm_u8
pgm
pgmyuv
png
ppm
qdraw
qpeg
qtrle
rawvideo
real_144
real_288
roq_dpcm
roqvideo
rpza
rv10
rv20
shorten
smc
snow
sol_dpcm
sonic
EAsonicls
sp5x
svq1
svq3
theora
truemotion1
ultimotion
vc9
vcr1
vmdaudio
vmdvideo
vorbis
vp3
vqavideo
wmav1
wmav2
wmv1
wmv2
wmv3
wnv1
ws_snd1
xan_dpcm
xan_wc3
xl
xvid
zlib
Supported file protocols:
file: pipe: udp: rtp: tcp: http:
Frame size, frame rate abbreviations:
ntsc pal qntsc qpal sntsc spal film ntsc-film sqcif qcif cif 4cif
Motion estimation methods:
zero(fastest) full(slowest) log phods epzs(default) x1
As you can see, the list is fairly comprehensive. Bascially, the file format and codec used to create the video needs to be supported for decode by ffmpeg. We're endoding to Flash/FLV, using MP3 audio.
The ffmpeg command that the site executes on the video is:
-i @input -f flv -acodec mp3 -ar 22050 -ab 64 -ac 1 @output
Where @input is the file you have updated, and @output is the flash file that is created.
The converted Flash video is created with a size of 320x240
Thumbnails are created from a single frame 30 seconds into the video
Some helpful links with additional information:
http://ffmpeg.mplayerhq.hu
http://ffmpeg.mplayerhq.hu/general.html#SEC3 (supported file formats and codecs)
http://en.wikipedia.org/wiki/Deinterlacing
http://en.wikipedia.org/wiki/Interlaced
http://en.wikipedia.org/wiki/List_of_codecs


