Which audio codec to chose in FlaskMpeg?
The most safe way is to select no audio compression at
all and select raw PCM sound. That has always produced 100% synch files
for me.
However if for some reason you want or have to - maybe
you're using Microsoft's pocket calculator OS called Windows9x which has
among other very annoying bugs a file system that is unable to deal with
files larger than 4GB - go another way here's some things to take into
consideration:
- Selecting DivX audio in FlaskMpeg will most likely
result in "popping" noises during playback. Therefore DON'T
use it in FlaskMpeg. If it works for you - who knows about those Microsoft
codecs.. - make sure you change the sampling rate in the FlaskMpeg Output
options in the Audio tab to 44.1Khz.
- Selecting Mp3 compression - no matter whether you use
the Fraunhofer codec or the Radium codec - could result in asynch movies
since these mp3 codecs are buggy - they don't report the right bitrate
to the player. Therefore you will have to manually synchronize the movie.
Try loading the movie in VirtualDub, set both audio and video to Direct
Stream Copy and Change the Interleave settings as follows: Preload 500ms,
Interleave every 100ms. I got these values from another website and
I can't confirm them... read below why. If this fails you can still
read my manual synching
guide which will eventually get you a synch movie.
- If you're interested in an AVI/AC3 combination you
have to select Direct Stream Copy in Flask.
- The same applies if compressing the audio in FlaskMpeg
won't work for you - I get choppy movies anytime I use the mp3 codec..
- and then use ac3dec
or Graphedit to decode
the ac3 track to a wave file before loading it into VirtualDub
to multiplex and compress.
- Another major source for asynchronousness is changing
the sampling rate in FlaskMpeg. Use this feature only when really in
need.
[UPDATE] I just successfully encoded 3 movies using MP3
compression in FlaskMpeg. All were 48Khz at different bitrates (96kbit/s,
128kbit/s and 160kbit/s). I didn't have to change anything, it just worked
fine at the beginning.
Furthermore a reader reported that manual resynching/changing
the framerate is only necessary for certain combinations of sampling rate
and bitrate. For instance for 25fps movies, 44.1Khz @ 128kbit/s you have
to change fps to 25.057, whereas the same movie will be completely synch
when choosing 48Khz @ 160kbit/s. I'd be grateful if any of you who has
made similar experiences could report their
settings to me.
Here's Lupos fps calculation hints in case you use MP3
compression and get an asynch movie:
FRn = FR * (1 + dt/t0)
dt = Time lag between audio and video after playing
time t0, dt > 0 if sound is running faster than picture stream
FR = Frame rate in AVI file (set with Flask menu; e.g.
25.000 fps for PAL)
FRn = New frame rate (to set with AVI Frame Rate Changer)
>> BACK
|