bond
25th November 2003, 10:54
the mpeg-4 standard (ie Simple- or Advanced-Simple-Profile) already supports tools which let you recover broken mpeg-4 bitstreams (audio and video) for example from scratched xcds
these tools are known under the headline error resilience. error resilience means that special types of bitstream writing are used, so that errors can be completely corrected or can be made as unannoying as possible:
for video there are three options available:
- Resync Markers/Slices, which split a frame into several independent video packets/slices. when a packet is lost, you can partially decode the frame based on the other video packets, the video packet size defines the size between two resync markers (it has to be activated to use the following options too)
- Reversible VLC permits to read the bitstream from 2 sides (fowards/backwards) to spot the error
- Data Partitioning separates the macroblock info into 2 parts: texture and motion vectors. it gathers data from several MB together (ie N x MB headers, then motion vectors of N macroblocks, and finally texture for these MBs)
for aac audio there are also three options available:
- Reversible VLC permits to read the bitstream from 2 sides (fowards/backwards) to spot the error
- Huffman Codeword Reordering reorders the codewords so that always a big part of the spectrum can be decoded if there is an error
- Virtual CodeBook
note that these tools will require more bits (make the files bigger), i dont know how much space each tool will require (the used intensity can also be individually adjustable). we will need to test that
also important is that you need encoders and (!) decoders which can handle these tools (recovery data is written by the encoder, the error correction is done by the decoder), decoders which dont understand error resilience cant decode such streams:
- resync markers:
encoding: ffmpeg/libavcodec (ffvfw?), nero (not in the consumer version), divx5 (until 5.0.2)
decoding: 3ivx, nero, divx5, enviviotv, ffmpeg/libavcodec (ffdshow), perhaps xvid
- reversible vlc:
encoding: nero (not in the consumer version)
decoding: nero, divx5, ffmpeg/libavcodec (ffdshow)
- data partitioning:
encoding: ffmpeg/libavcodec (ffvfw), nero (not in the consumer version), divx5 (until 5.0.2)
decoding: nero, divx5, ffmpeg/libavcodec (ffdshow)
for aac currently there doesnt exist any freely available encoder which supports error resilience (Digital Radio Mondial compliant encoders should handle this for example) maybe someone will implement it in faac too if people ask for it? :(
faad2 (CoreAAC) already supports decoding these
as you can see this mainly is a codec, not a container issue, but as it is mainly usefull for situations in which the risk of loss of data is high, like with xcds, and these issues were discussed mainly in this forum i posted it here
lets see how the discussion evolves, were to finally place it
these tools are known under the headline error resilience. error resilience means that special types of bitstream writing are used, so that errors can be completely corrected or can be made as unannoying as possible:
for video there are three options available:
- Resync Markers/Slices, which split a frame into several independent video packets/slices. when a packet is lost, you can partially decode the frame based on the other video packets, the video packet size defines the size between two resync markers (it has to be activated to use the following options too)
- Reversible VLC permits to read the bitstream from 2 sides (fowards/backwards) to spot the error
- Data Partitioning separates the macroblock info into 2 parts: texture and motion vectors. it gathers data from several MB together (ie N x MB headers, then motion vectors of N macroblocks, and finally texture for these MBs)
for aac audio there are also three options available:
- Reversible VLC permits to read the bitstream from 2 sides (fowards/backwards) to spot the error
- Huffman Codeword Reordering reorders the codewords so that always a big part of the spectrum can be decoded if there is an error
- Virtual CodeBook
note that these tools will require more bits (make the files bigger), i dont know how much space each tool will require (the used intensity can also be individually adjustable). we will need to test that
also important is that you need encoders and (!) decoders which can handle these tools (recovery data is written by the encoder, the error correction is done by the decoder), decoders which dont understand error resilience cant decode such streams:
- resync markers:
encoding: ffmpeg/libavcodec (ffvfw?), nero (not in the consumer version), divx5 (until 5.0.2)
decoding: 3ivx, nero, divx5, enviviotv, ffmpeg/libavcodec (ffdshow), perhaps xvid
- reversible vlc:
encoding: nero (not in the consumer version)
decoding: nero, divx5, ffmpeg/libavcodec (ffdshow)
- data partitioning:
encoding: ffmpeg/libavcodec (ffvfw), nero (not in the consumer version), divx5 (until 5.0.2)
decoding: nero, divx5, ffmpeg/libavcodec (ffdshow)
for aac currently there doesnt exist any freely available encoder which supports error resilience (Digital Radio Mondial compliant encoders should handle this for example) maybe someone will implement it in faac too if people ask for it? :(
faad2 (CoreAAC) already supports decoding these
as you can see this mainly is a codec, not a container issue, but as it is mainly usefull for situations in which the risk of loss of data is high, like with xcds, and these issues were discussed mainly in this forum i posted it here
lets see how the discussion evolves, were to finally place it