bond
19th February 2005, 23:23
the avi2raw tool from mpeg4ip now offers the possibility to unpack packed bitstreams when extracting MPEG-4 ASP and AVC streams from avi to raw
When extracting the video stream from .avi to raw avi2raw will automatically unpack the packed bitstreams by default, but leaving still the so called "placeholder frames" (and also delays frames) in the stream. These can be removed with the new "-e=x" (x being bytes) option (stands for "eliminate short frames") available since version 1.2.6, removing all frames up to the defined framesizes (in bytes)
As described here (http://forum.doom9.org/showthread.php?s=&threadid=80430) DivX5 and XviD place N-Vops as placeholders in the stream. According to my findings these have the following sizes:
- XviD N-Vops are 6 bytes big
- DivX5 N-Vops are 8 bytes big
Also VSS' AVC encoder uses packed bitstream for placing B-Vops in AVI but doesnt use N-Vops as placeholders (as they afaik are not allowed in AVC) but empty frames with Byte Stream Format markers (NAL)
- VSS placeholders are 4 bytes big
additionally also the so called 1 byte delay frames caused when encoding without virtualdub(mod) and b-frames can be removed that way
sample commandline:
avi2raw -e=8 -v divx5.avi output.m4vas a result you get a correct and 100% spec compliant raw mpeg-4 asp or avc stream which you than can mux into your favourite container again with a tool that handles raw streams as input (eg into .mp4 with mp4creator...)
When extracting the video stream from .avi to raw avi2raw will automatically unpack the packed bitstreams by default, but leaving still the so called "placeholder frames" (and also delays frames) in the stream. These can be removed with the new "-e=x" (x being bytes) option (stands for "eliminate short frames") available since version 1.2.6, removing all frames up to the defined framesizes (in bytes)
As described here (http://forum.doom9.org/showthread.php?s=&threadid=80430) DivX5 and XviD place N-Vops as placeholders in the stream. According to my findings these have the following sizes:
- XviD N-Vops are 6 bytes big
- DivX5 N-Vops are 8 bytes big
Also VSS' AVC encoder uses packed bitstream for placing B-Vops in AVI but doesnt use N-Vops as placeholders (as they afaik are not allowed in AVC) but empty frames with Byte Stream Format markers (NAL)
- VSS placeholders are 4 bytes big
additionally also the so called 1 byte delay frames caused when encoding without virtualdub(mod) and b-frames can be removed that way
sample commandline:
avi2raw -e=8 -v divx5.avi output.m4vas a result you get a correct and 100% spec compliant raw mpeg-4 asp or avc stream which you than can mux into your favourite container again with a tool that handles raw streams as input (eg into .mp4 with mp4creator...)