full.ashtray
5th March 2008, 16:30
Since this question has come up in several threads before (here (http://forum.doom9.org/showthread.php?t=116934), here (http://forum.doom9.org/showthread.php?t=110269) or here (http://forum.doom9.org/showthread.php?t=121248)), but has never really been answered, I think it's best to start a new one.
I planned to join several episodes of a tv show (recorded as xvid/mp3 into an .avi container) into a single .divx file, making them selectable through a menu.
Of course I wondered if it's possible to strip down the .divx again into its single components (for example to add new episodes, audio or subtitle tracks, to update the menu etc.). Because if not, there would have been no other solution than to keep the source files separately - which would (for me) have made the .divx container much less attractive.
It's true, there is no real solution for this problem, but at least a workaround:
1. Load the .divx into a hex editor.
2. Search for the "RIFF" signature every .avi/.divx movie file starts with.
3. Search for the subsequent "RIFF" occurrence.
4. Copy the block between the two "RIFF"s into a new .avi/.divx file.
(Caution! The second "RIFF block" in the .divx file contains the menu, no movie.)
Now the problem is: Only the 1st one of these files is readable by Vdub, VDubMod and "normal" media players. (Same problem occurs when you load the .divx as a whole into an editor/player). The reason seems to be that DivXMux somehow messes up the AVI headers and/or index tables of the 2nd and all subsequent clips, when it imports them into a multi-clip file.
The solution for this is:
5. Use DivXMux (DivXMuxGUI respectively).
6. Load the unreadable files into it: video track and every audio/subtitle track separately.
7. Mux the whole thing into a new .divx container file.
Looks like DivXMux repairs the headers/indexes it has messed up before. Finally, you get a .divx file whose video and (all) audio tracks are perfectly readable by every AVI editor/player.
Of course, this doesn't work for the (proprietary) embedded .xsub subtitles (VDubMod complains about a wrong frame rate or so when it tries to load the subtitle streams). Nor does it work for the menu created within the .divx container. So, if you want to re-use these, you have to keep the source files. At least, they are by far the smallest ones.
Some days ago I posted these findings in the DivX forum (http://forums.divx.com/forum/viewTopic.php?id=5520) and asked if we could expect a more convenient way to extract clips out of a .divx container sometime. No answer so far - so I thought it could be a good idea to post them here, too.
See you -
full.ashtray
I planned to join several episodes of a tv show (recorded as xvid/mp3 into an .avi container) into a single .divx file, making them selectable through a menu.
Of course I wondered if it's possible to strip down the .divx again into its single components (for example to add new episodes, audio or subtitle tracks, to update the menu etc.). Because if not, there would have been no other solution than to keep the source files separately - which would (for me) have made the .divx container much less attractive.
It's true, there is no real solution for this problem, but at least a workaround:
1. Load the .divx into a hex editor.
2. Search for the "RIFF" signature every .avi/.divx movie file starts with.
3. Search for the subsequent "RIFF" occurrence.
4. Copy the block between the two "RIFF"s into a new .avi/.divx file.
(Caution! The second "RIFF block" in the .divx file contains the menu, no movie.)
Now the problem is: Only the 1st one of these files is readable by Vdub, VDubMod and "normal" media players. (Same problem occurs when you load the .divx as a whole into an editor/player). The reason seems to be that DivXMux somehow messes up the AVI headers and/or index tables of the 2nd and all subsequent clips, when it imports them into a multi-clip file.
The solution for this is:
5. Use DivXMux (DivXMuxGUI respectively).
6. Load the unreadable files into it: video track and every audio/subtitle track separately.
7. Mux the whole thing into a new .divx container file.
Looks like DivXMux repairs the headers/indexes it has messed up before. Finally, you get a .divx file whose video and (all) audio tracks are perfectly readable by every AVI editor/player.
Of course, this doesn't work for the (proprietary) embedded .xsub subtitles (VDubMod complains about a wrong frame rate or so when it tries to load the subtitle streams). Nor does it work for the menu created within the .divx container. So, if you want to re-use these, you have to keep the source files. At least, they are by far the smallest ones.
Some days ago I posted these findings in the DivX forum (http://forums.divx.com/forum/viewTopic.php?id=5520) and asked if we could expect a more convenient way to extract clips out of a .divx container sometime. No answer so far - so I thought it could be a good idea to post them here, too.
See you -
full.ashtray