View Full Version : Can packed bitstream be stripped losslessly?
oddball
17th March 2004, 10:32
As per subject. My Elta player b0rks at XviD RC3 encodes with packed bitstream (Also GMC and QPEL but that's another matter).
sysKin
17th March 2004, 11:06
Yes it can, you just need to write software that will do that.
Radek
KpeX
17th March 2004, 16:46
The 3ivx muxer can do this, but it only outputs to MP4. Not sure if there's any way of remuxing the MP4 to non-packed AVI.
gotaserena
17th March 2004, 17:08
you can use graphedit to get the video stream from the mp4 file and then mux it to an .avi container. If the muxer strips the packet bitstream then this should work, although it is not exactly a nice way of doing things.
oddball
18th March 2004, 09:20
I can't get it to convert back to AVI. If I connect the 3ivx splitter to the AVI muxer it puts the 3iva decoder in between which I don't want. I want it to mux not decode. If I connect 3ivx splitter to 3ivx mux to AVI mux or split it won't accept the pin.
oddball
18th March 2004, 09:26
Nevermind I think I found a tool to do it (MP4UI)
bond
18th March 2004, 09:30
Originally posted by KpeX
the 3ivx muxer can do this, but it only outputs to MP4. Not sure if there's any way of remuxing the MP4 to non-packed AVI.yep its possible to unpack packed bitstreams with the 3ivx muxer
to extract the video stream from a .mp4 file to .avi you can use a lot of tools, maybe mp4ui is the easiest atm
edit: ah oddball found it himself
dont forget to set the 4cc to what you prefer, cause mp4ui sets it to mp4v afaik :)
Stux
18th March 2004, 11:06
Originally posted by oddball
I can't get it to convert back to AVI. If I connect the 3ivx splitter to the AVI muxer it puts the 3iva decoder in between which I don't want. I want it to mux not decode. If I connect 3ivx splitter to 3ivx mux to AVI mux or split it won't accept the pin.
You have to enable unsupported decoders first
maciek_m
18th March 2004, 11:45
Sorry for interrupting you guys,
I'm a new member who said hello to everybody 2 days ago in the XviD FAQ thread and asked a question about packed bitstream there (as I thought it was quite a general question with interest to all new apprentices of xvid). I haven't received any reply whatsoever.
I would like to know whether I've done something wrong or It's just a coincidence?
Thanks
Koepi
18th March 2004, 11:57
The FAQ is not the place to ask questions if you don't put the answer right within the same post.
Koepi
bond
18th March 2004, 12:01
oddball,
as stux wrote its possible to remux from packed bitstream avi to not packed bitstream avi in graphedit (without the need for other tools):
1) open the .avi (including audio stream) in graphedit
2) remove everything but the input file and the avi splitter in the graph
3) add the 3ivx muxer (with unsupported decoders ticked) between avi splitter and avi mux in the graph
4) direct connect the audio output from the avi splitter to the avi mux filter
5) connect the avi mux filter to the .avi file writer and push play
Originally posted by maciek_m
I would like to know whether I've done something wrong or It's just a coincidence?i think that most people, who are already deep into this stuff, dont look at the faq, its more meant for quick info for newbies, not for discussion imo
SeeMoreDigital
18th March 2004, 14:25
Originally posted by oddball
Nevermind I think I found a tool to do it (MP4UI) This tool works to a point. But does not generate perfect results.
I've been experimenting using MP4UI (beta2) to mux an 'known' 12bit XviD Mpeg4 .AVI stream into an .MP4 container. And then again to demux the stream out of the .MP4 container (ie back to .AVI). And then again to remux back into an .MP4 container.
However, during the demuxing and remuxing process the Mpeg4 stream becomes corrupted - if that's the correct word/expression.
What's weird is the remuxed streams appear to play fine in an software player (such as MPC) but appear borked in an hardware player. Also the colour depth changes from the original 12bit to 24bit.
Changing the 4cc does not appear to cure the problem either!
Just thought I would let you know!
EDIT: Forgot to add the remux to .MP4 bit... Corrected now!
sysKin
18th March 2004, 14:40
Changing packed/unpacked also requires to change internal codec's identification string, which tells decoder if bitstream is packed or not.
Packed bitstreams have the following string in mpeg-4 "userdata" field: DivX<version>b<build>p . XviD sets the version to 999 and build to 000.
Once the string is there, you can use hex editor to change "p" into "n". If the string is not there, I have no idea what you can do. The proggy has to add it, I guess.
Radek
SeeMoreDigital
18th March 2004, 14:52
Originally posted by sysKin
Changing packed/unpacked also requires to change internal codec's identification string, which tells decoder if bitstream is packed or not.
Packed bitstreams have the following string in mpeg-4 "userdata" field: DivX<version>b<build>p . XviD sets the version to 999 and build to 000.
Once the string is there, you can use hex editor to change "p" into "n". If the string is not there, I have no idea what you can do. The proggy has to add it, I guess.
Radek Interesting. I wonder what would happen if you just changed the codec's internal identification hex code string but did'nt bother stripping out the packed stream using 3viX?
Cheers
oddball
18th March 2004, 16:25
Well MP4UI is the only way I have found to mux an MP4 back to AVI.
oddball
18th March 2004, 16:46
Bong: Nevermind I figured out what you meant. Yes you can mux back to AVI from MP4 if you select that option in the 3ivx splitter. Thanks. Have updated my guide in the hardware player forum for those who have similar issues with packed bitstream playback.
SeeMoreDigital
18th March 2004, 17:08
Originally posted by oddball
Well MP4UI is the only way I have found to mux an MP4 back to AVI. Yes, it's a great little tool.
Thanks to bond, I use it all the time now to create Mpeg4/AAC encodes... :D
With some of the older versions you could import AVI Mpeg4 video streams that also included Mp3 audio streams So you could, in theory, have used MP4UI as an Mp3 demuxer!
The latest version does not let you do this. Nor is it able to demux AAC audio into an usable stream!
As I confess to not understand anything about programming and the 'file' headers, 'hex' code etc, etc, I'm unable to understand why MP4UI does what it does (...or does'nt) I'll leave that up to the clever people on the forum.
I know how to break things though!
SeeMoreDigital
18th March 2004, 17:25
oddball,
I notice you have created a 'How to...' guide in the hardware section of the forum.
With a few changes, your 'How to...' guide should work for Xcard users who are having trouble with XviD B-frames/packed bitstreams!
What do you think?
Cheers
oddball
20th March 2004, 00:13
Please feel free to share your thoughts. I will add to the guide if required.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.