View Full Version : UPDATED: Compressing Audio before Shrinking a DVD (LPCM/ac3 5.1ch -> mp2/ac3 2ch)
Malcolm
4th November 2004, 11:23
This guide describes how to compress DVD audio tracks. This is useful if you want to save space for the video part when shrinking from DVD-9 to DVD-5.
You need the following tools:
- a DVD Ripper (e.g. DVD Decrypter)
- PgcDemux
- an audio encoder (e.g. BeSweetGUI or BeLight)
- MuxMan
- VobBlanker
There are a few other guides out there. But these methods are fairly complicated, work only for DVDs with exactly one audio-track and also can't keep subtitles, chapters and menues.
This guide works for multiple audio tracks, preserves subtitles, chapters and the menue structure. It's also fairly easy. (with a certain basic-complexity) :) and it should work for most DVDs.
According to jsoto, VobBlanker cannot process multiangle DVDs! I can not say if my method works in other exotic cases. (e.g. multiple PGCs per TitleSet)
Here's the guide (in case you want to compress the audio tracks of the main movie from a DVD):
1. Rip the DVD to your harddisk.
2. Open PgcDemux, choose the .ifo file for the main movie on the DVD. Demux all audio, video + substreams. Also create the Celltimes.txt + the logfile.
3. Use BeSweetGUI or BeLight to convert the demuxed audio tracks to any format you like (2ch AC3 or MP2) (*1).
4. Open MuxMan. Select the demuxed video track from step 2. Select all audio tracks you have created with BeSweet (take care for the right order: 0x80, 0x81,..) (*2). Select all demuxed substreams. Select the Celltimes.txt that PgcDemux has created. Create the VOBs + IFOs.
5. Open VobBlanker. Open the original, ripped DVD (NOT the one you have just created with MuxMan)! Select the main movie TitleSet + PGC (the one you have demuxed with PgcDemux). Select 'Replace' and choose the first VOB you have created with Muxman. Hit 'PROCESS!!' VobBlanker will correct the Coding Mode for all audio tracks that you have converted to their new format (Dolby AC3, MPEG-1).
That's it!
Now you have a DVD on your harddisk with compressed audio tracks. And you can transcode it with DVD-Shrink or any other program you like.
(*1) IMHO 160 kbit is a good choice for MP2 and 2ch AC3 compression. In PAL-land you can use MP2 if you want. In NTSC-land, AC3 is mandatory for DVDs (MP2 is optional). I recommend MP2 since BeSweet is not good in creating AC3 (bad sound quality). MP2 and AC3 should have a comparable sound quality at a bitrate of 160 kbit. Edit: If you really want to save space, you can go down to 64 kbit AC3s when encoding in mono(!). HeadAC3e produces much better AC3 than BeSweet. The quality of 64 kbit mono AC3s from HeadAC3e is also much better than 64 kbit mono MP2s.
(*2) It might be that you have to enter a delay for the audio tracks in MuxMan. According to jsoto the delays in the logfile of PgcDemux have the right values and can directly be entered in MuxMan.
The whole method is pretty mechanical and could easily be automated. PgcDemux has commandline-support. BeSweet too. If MuxMan + VobBlanker would also have commandline-support, then you could do everything with a batch-script or a few clicks (if you had a GUI-tool for this).
What i would REALLY like to see is the integration of PgcDemux into VobBlanker. Both tools are from jsoto. VobBlanker could then call BeSweet + MuxMan! And you would save a lot of manual interaction, selecting things, clicking around, copying VOBs, ... :)
I would like to thank especially jsoto for his tools VobBlanker + PgcDemux! Without them this all wouldn't be possible!
Feedback is welcome! :)
Greetings,
Malcolm
2COOL
4th November 2004, 11:33
CC
Originally posted by Malcolm
4. Open ifoEdit. Choose Menue -> Author new DVD. select the demuxed video-track. select all audio-tracks you have created with BeSweet (take care for the right order: 0x80, 0x81,..). select all demuxed substreams. select the Celltimes.txt that PgcDemux has created. Create the DVD.You may want to point this out.
NTSC: Use ReJig
PAL: Use IfoEdit/ReJig
Re-author with NTSC files have been reported to be buggy. :( Also, ReJig is still free! :D
Shalimar
4th November 2004, 17:33
Kickass :)
I'll test this as soon as I've got a chance.. I've got a DVD here just waiting for a solution like this.. all of the audio on the entire thing is LPCM *_*
Many thanks to both you and 2cool for the note (since it's NTSC for my area).
Shalimar
jsoto
4th November 2004, 23:20
Ah!
@Malcolm
I never forgot your request. PgcDemux is the first step to do it and more... Can you imagine why does it support CLI?
@all
No, multiangle is not supported by VobBlanker (and it is not in my mind, too complex...), so although PgcDemux supports multiangle, you cannot apply this guide in this case.
jsoto
jsoto
4th November 2004, 23:24
But since i never had the need to do this, i'm not sure if these are the right values.
Please let me know if they are not. I've checked this in VobBlanker many times, and seems to me it is ok. So, I've used the same code for PgcDemux.
jsoto
Malcolm
5th November 2004, 00:00
Ah!
@Malcolm
I never forgot your request. PgcDemux is the first step to do it and more... Can you imagine why does it support CLI?
Hola Jesus! Qué tal? :)
(Last week, i had my first spanish course! You know, i was on holidays in Spain 3 weeks ago!)
Nice to hear that you didn't forget my request!
Actually i WAS clever enough to realise myself that it might have been me that motivated you to write PgcDemux and add commandline support..! I just didn't had the time to send you a message yet. (i discovered PgcDemux just yesterday!) Thank you very much for that! I'm sure you will get a lot of reward from other users for writing this piece of software! :)
Keep up the good work!!
bye,
Malcolm
Shalimar
5th November 2004, 00:23
Hmm I'm having Pgcdemux kick out an error on every single vob I try to work with here.. very strange *_*
start it up as directed and it is almost finished then error popsup: "Unrecognized pack" followed by a warning about finishing with an error.
logfile dosn;t seem to tell me a damned thing about the error either :(
Logfile:
~~~~~~~~
[General]
Number of Video Packs=104717
Number of Audio Packs=40587
Number of Subpicture Packs=0
Number of Nav Packs=849
Number of Cells=1
[Audio Streams]
Audio_1=0xA0
Audio_2=None
Audio_3=None
Audio_4=None
Audio_5=None
Audio_6=None
Audio_7=None
Audio_8=None
[Audio Delays]
Audio_1=0
[Subs Streams]
Subs_01=None
Subs_02=None
Subs_03=None
Subs_04=None
Subs_05=None
Subs_06=None
Subs_07=None
Subs_08=None
Subs_09=None
Subs_10=None
Subs_11=None
Subs_12=None
Subs_13=None
Subs_14=None
Subs_15=None
Subs_16=None
Subs_17=None
Subs_18=None
Subs_19=None
Subs_20=None
Subs_21=None
Subs_22=None
Subs_23=None
Subs_24=None
Subs_25=None
Subs_26=None
Subs_27=None
Subs_28=None
Subs_29=None
Subs_30=None
Subs_31=None
Subs_32=None
Any ideas would be appreciated! :)
Shal
icq# 7790581
jsoto
5th November 2004, 00:52
Hmmm. I've to add more info in the log. I was thinking in the delay audio/video and not in bug tracking when I did it.
Well, PgcDemux has been able to process a total of 146153 packs (299321344 bytes). so the offending one should be the number 146153. Please check with VobEdit what kind of pack is it.
Or, may be you can cut the file with Cutfile (see my sig) just around it, i.e. from pack (Initial block ) 146150 to (Final Block) 146160 and send the output file (22 KB) to me. (Use the default 2048 bytes block size)
EDIT:
Sorry, I forgot to mention you have to look for the offending pack 146153 blocks after the starting cell sector. Do you need help on this?
jsoto
Shalimar
5th November 2004, 01:02
Accoring to vobedit pack # 146153 is: [Padding Stream] , 07ec
However this is happening with all vobs for this DVD.. very strange *_*
I'll check the others as well shortly to see if they are labeled as the same type of pack
I'll c&p in the pack if u like or cut the file to send as soon as i finish feedin my face :)
Shal
jsoto
5th November 2004, 01:12
Sorry if it sounds too simple... Did you decript (rip) your VOB?
jsoto
Shalimar
5th November 2004, 02:42
Quote:
EDIT:
Sorry, I forgot to mention you have to look for the offending pack 146153 blocks after the starting cell sector. Do you need help on this?
jsoto
Unquote
Umm yeah a lil help might come in handy :)
I'm more than familiar w/ripping/editing but replacing audio is a new trick for me as is your program :)
And of course it's ripped using dvd decrypter :)
Shal
Shalimar
5th November 2004, 05:20
Well I ran more tests and every single vob for this DVD caused the same error other than Video_TS.vob which refused to process at all. It appears that it has no cells and therefore is refused for processing. There is however 7 menu entries 5 of which have cells allocated (1 each). Interesting bugs I've found perhaps or maybe a fubar dvd mastering job? *_*
Shalimar
5th November 2004, 07:45
Yet a few more thoughts while i work instead of sleep as I should be doing :)
Output for thr audio (here at least) is done with the extension lpc which isn't recognized by besweet of course. Fix of course is a simple rename. Besweet wizard still refuses to actually transcode the file for some reason I havn't found yet. However the gui does transcode it to AC3 w/o complaint (once it's renamed of course). I havn't set it to drop the bitrate at all so in my case at least it produces an AC3 file using 383Kbs. Even so it's averaging easily 4:1 ratio :)
As for the menu vob mentioned in an earlier post I can demux it but each of the menu items have to be done seperately instead of as a single stream. O.o; (tedious that way)
Now given I don't have an answer for errors that occured earlier I can't even say the files produced are actually "flawless" but the m2v's all play (in MPC). Also all of the celltimes.txt files are blank (0 byte) other than those produced from Video_TS.vob's menu items which also produced subpic (sup) files.
Now once Jsoto has a chance to pop back in here and perhaps clairify this:
Sorry, I forgot to mention you have to look for the offending pack 146153 blocks after the starting cell sector. Do you need help on this?
I can do some more tests and send materials to him if needed.
One way or another we'll get the bugs worked out.
And of course a HUGE thanks to both Jsoto and Malcolm without both none of this would be possible! >:)
Shal
jsoto
5th November 2004, 20:45
Open your VTS_XX_0.IFO in IFOEdit.
In the upper window, select your PGC: VTS_PGCITI-->VTS_PGC_X
Now, in the lower window, scroll until Cell playback table and look for the Cell 1 : entry point sector. ÇThis is the initial sector (block) where your cell starts. Add 146153 and go to the resulting pack in Vobedit.
http://www.iespana.es/jsoto/images/ifoedit000.jpg
jsoto
Shalimar
5th November 2004, 21:00
Ok done.. (for some reason i thought u meant in vobedit.. a sign i needed sleep perhaps?)
Entry point sector is 0 (Vob 4 same as the log file posted)
I'll check all of the others now and see if it is the same.
Also the LPCM file saved might be bad. Nothing I've tried here for playtback gets me anything but static sound.
Shal
Shalimar
5th November 2004, 21:32
All of the other vobs have been checked (same method) and all of them show as: [Padding Stream] , 07ec
I didn't check the main movie however since it's a multi-vob set. (Is it safe to assume adding up the pack totals would be appropriate to find the pack# needed in the last vob of the set?)
I didn't check the menu for this yet (Video_TS.vob)
jsoto
5th November 2004, 22:23
These are the offending packs: [Padding Stream] I really didn't code them... (sorry...)
Thanks for your report. I'll be off line during the weekend, but I hope I'll fix this soon.
jsoto
Shalimar
8th November 2004, 23:32
Well I've found a second dvd using LPCM here. I can send u info from it as well if needed. :)
Shal
Shalimar
9th November 2004, 08:07
Ok tests done and results sent.
Now here's a dumb one for u.. BeSweet w/gui wizard refuses to actually process anything for me *_*
If I use the GUI it will process but it I don't see a setting (maybe I'm goin blind demmit) for output bitrate (would like to drop it to 160 from 320 since it's mostly voices only for this dvd). GUI will process and make a valid AC3 file.. Wizard only pops up the logfile immediately w/o adding anything to it. O.o;
Ahh one step at a time eh? :)
Shal
Shalimar
9th November 2004, 08:30
well i am going blind *L*
found the downsample setup for besweet gui though the damned wizard still acts the same for me.
Conversion underway! :)
Shalimar
9th November 2004, 11:07
Conversion to AC3 complete.
AC3 files all valid and play fine in winamp.
however when remuxed w/rejig or ifoedit the resulting vob seems to have a small problem with playback (before or after replacement via vobblanker) when tested in powerdvd (v5).
If tested in IFOedit's playback the audio is present however.
It's an interesting bug which I'll investigate more tomorrow
but since it's now 5am it's way past time for me to sleep *L*
Ltrz
Shal
Shalimar
9th November 2004, 20:38
Ok after sleep and some further investigation it appears the new vob is created with the audio as 0x80 while the original vobs have it as 0xA0.
I've tested reauthoring it in both IFOedit and ReJig both with the same results. Original IFO was used (and tested w/o it as well) via rejig along with celltimes.txt (and w/o) with no effect. (Tested just in case).
Now the "remade" vob plays fine via IFOedit but has no audio via powerdvd. However PDVD does register there audio being there and displays the correct stats for it.. but appear to simply not play it.
Therefore I think the question of choice would be how to edit only the stream label in the vob and see if that fixes this minor bug. :)
Shal
jsoto
9th November 2004, 21:19
No, you are converting from a (L)PCM (stream IDs from 0xa0 to 0xa7) to ac3 (stream IDs from 0x80 to 0x87). In both cases, the "audio track number" is done with the three low significative bits, that means, 0xa0 and 0x80 are the same "track number" but different code.
So the new VOB is correctly muxed.
But BeSweet has known issues when encoding ac3, mainly in 2.0 (which is your case). Please post your BeSweet log file, may be I (or someone else) can give you a tip.
jsoto
EDIT: BTW, PowerDVD is able to play the ac3 file. Try (drag & drop) to play directly the audio.ac3 file in PDVD.
Shalimar
9th November 2004, 21:38
Hmm ok then. Besweet log clipped for the last conversion only (one per vob/menu item)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Logging start : 11/09/04 , 03:48:49.
c:\Program Files\Bsweet\BeSweet.exe -core( -input j:\DIC\02\AudioFile_A0.wav -output j:\DIC\02\AudioFile_A0.ac3 -logfilea C:\Program Files\Bsweet\BeSweet.log ) -ac3enc( -b 160 ) -profile( ~~~~~ Default Profile ~~~~~ )
[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : j:\DIC\02\AudioFile_A0.wav
[00:00:00:000] | Output: j:\DIC\02\AudioFile_A0.ac3
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] +------- AC3ENC ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | AC3 bitrate : 160
[00:00:00:000] | Channels Mode : 2.0
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[01:51:10:103] Conversion Completed !
[01:51:10:103] Actual Avg. Bitrate : 159kbps
[00:04:33:000] <-- Transcoding Duration
Logging ends : 11/09/04 , 03:53:22.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tried playin the AC3 file via PDVD and drag & drop.. plays but still nada for audio output. It does register the right bitrate/info but dosn't have any actual sound output. *_*
Shal
jsoto
9th November 2004, 22:45
Which version of BeSweet?
I'm using BeSweet v1.5b26 and it works to me (with your sample ;) )
My command line (same than yours)
C:\Archivos de programa\DVD2SVCD\besweet\besweet.exe -core( -input vts_04_1_a0.wav -output Encoded_audio.ac3 -logfile Encoded_audio.log ) -ac3enc( -b 256 )
jsoto
Shalimar
10th November 2004, 04:55
v1.4 is what I was using. Just grabbed BeSweet v1.5b26 now to test and see if it works the same as the beta you have.
And the cmd line I also am testing includes "-normalize 100%" since the audio level of this DVD is rather low.
Shal
Shalimar
10th November 2004, 07:38
Well beta I grabbed solved that problem :)
Normalize cmd dosn't seem to work for AC3 in besweet btw
used cooledit pro instead :)
DVD recompiled.. and to add to the instructions at the beginning be sure to get VTS sectors afterwards!
The menu is a little flaky but that could simply be this particular dvd as well.. and next thing planned is chopping it all up to make it still instead anyhow. :)
Many thanks Jsoto for all of your help.
The 2nd dvd I have w/LPCM should be a breeze now!
Shal
jsoto
10th November 2004, 14:04
To normalize, try
"-ota( -g max )"
jsoto
Shalimar
12th November 2004, 07:30
Hmm interestin.. tried that and it actually dropped the levels on the 2nd dvd.. very strange *L*
Ahh well all is good here.. both have been remastered and the savings on audio for one of the 2 discs was enough it fit on a dvd-5 barely w/o more editing! :)
Shal
Malcolm
10th February 2005, 21:47
I have updated the guide (see the first post of this thread). It's shorter now, since VobBlanker now does the last step that you had to do manually before (correcting the Coding Mode of the changes audio streams). Also i have exchanged ifoedit/rejig with muxman.
Thanks to jsoto and mpucoder.
Malcolm
Sir Didymus
11th February 2005, 15:36
Thanks a lot Malcom. Excellent guide. And very cool updates...
All the best
SD
fewtch
12th February 2005, 13:37
Isn't Headac3he better than BeSweet for AC3 encoding? Maybe change that in the guide (?).
Malcolm
12th February 2005, 14:11
I don't know. I have used Headac3he in the past, but did just a few tests with ac3 encoding (with pretty bad results!).
I think if Headac3he would be a better alternative to BeSweet, it would be known here in the forum.. (you can correct me)
But since my guide is all about going from LPCM(2ch) / ac3(5.1ch) to anything with 2 channels i would really recommend using mp2. there are more tools for this and quality is very good. regarding size, ac3 doesn't sound better than mp2 at equal bitrates.
And to be honest, i don't care much about NTSC.. :) afaik, most DVD players (even in NTSC land) should accept mp2-only DVDs. so although it's out of standard, i would use mp2 as long as my dvd player accepts it.
greetings,
Malcolm
rpboy
16th February 2005, 09:27
Originally posted by Malcolm
I recommend MP2 since BeSweet is not good in creating AC3 (bad sound quality).
I like using ffmpeg for creating AC3 files. I have had problems with BeSweet in the past, but ffmpeg has always created flawless AC3 files for me for the projects I worked on.
ffreese
7th June 2005, 21:43
5. Open VobBlanker. Open the original, ripped DVD (NOT the one you have just created with MuxMan)! Select the main movie TitleSet + PGC (the one you have demuxed with PgcDemux). Select 'Replace' and choose the first VOB you have created with Muxman. Hit 'PROCESS!!' VobBlanker will correct the Coding Mode for all audio tracks that you have converted to their new format (Dolby AC3, MPEG-1).
On my voyager serial DVD there are ususally 4 episodes of about 42 mins.
They all work fine - except for the one with only 2 eipisodes with 42 mins an one double-episode of about 80mins.
Vobblanker blanks out the last 8 of totally 16 chapters.
Any idea?
Frank
PS: Thank you for your guide. Helped me a lot to save extra audio language without getting too bad quality for the picture :)
Malcolm
8th June 2005, 09:10
Hi ffreese,
sorry, but i guess i can't help you with this problem. Since this is specific to Vobblanker i think it would be a good idea to ask jsoto (The author). Just post a message. I'm sure he will help you.
Malcolm
AgNa
25th July 2005, 06:07
I have a music DVD with mixed audio, and I want to back it up in one DVDr, original is pretty big (7.3GB) so I want to convert LPCM audio to AC3 to reduce size. I read this guide but when I try to remux the video with the new audio I get this error from MUXMAN "Reference to non-existant scene "Segment_1_scn2" from PGC "VTS01_TTL01_PGC1".
VOB set Im working is VTS_02. What means this error? any solution?
Ps: sorry if I uped this thread wich is kinda old but didnt want to make a new thread just for this, becouse I sense it has a pretty simple solution (wich I can't figure out becouse I'm idiot :eek:
EDIT: and VOB blanker complains when I try to replace the VOB saying "theres something wrong with cell times"
Malcolm
25th July 2005, 09:00
Muxman is very picky with the dvd standard.
Unfortunately i can't help you with this specific muxman error message.
But You can simply try ifoedit to mux your streams!
greetings,
Malcolm
blutach
25th July 2005, 11:23
On my voyager serial DVD there are ususally 4 episodes of about 42 mins.
They all work fine - except for the one with only 2 eipisodes with 42 mins an one double-episode of about 80mins.
Vobblanker blanks out the last 8 of totally 16 chapters.
Any idea?
FrankVobBlanker blanks out cells when the replacing title has fewer cells than the original title. So if you started with 16 cells and created a DVD with just 8, the last 8 cells will be blanked. You can safely delete them, but it sounds like you may need to edit your menus to ensure the chapters point to the right areas.
It sound here like your mux didn't include all chapter points.
Good luck.
Regards
mpucoder
25th July 2005, 15:24
@AgNa - both MuxMan and VobBlanker are complaining about the same thing, your celltimes file. It probably has an extra entry in it pointing to the end of the video. And from what you quoted, there is only 1 entry, which means you don't need the file at all.
AgNa
28th July 2005, 19:52
Thanx for the replys, I finished backing my DVD but when I play it on my DVD it skips all the time only on the parts I replaced the audio. Not sure what was my mistake. Maybe I will just mux the files without celltimes.
mnfesq
31st August 2005, 18:36
To Malcom: Thank your for your guide on compressing DVD audio on page 1 of this thread. It worked great for me. Well, actually, muxman didn't work for me, but I was able to remux using ifoedit, and that worked fine. It's that replace function in VobBlanker that really makes this work, and I am very grateful. I encounter a lot of short vids that beef up their size on a DVD by using LPCM audio. The method you described allowed me to compress a 1 gig LPCM stream down to a 125 mb ac3 stream. That allowed a much higher bitrate for the video.
Audio encoding is a feature I hope to see one day in DVD-RB.
Thanks all for sharing your knowledge and work with me.
derekz
30th October 2005, 11:35
hi. can i use this procedure for add or replace an audio track with a DTS audio track ?
raquete
30th October 2005, 15:25
*nevermind,found Rejig: http://forum.doom9.org/showthread.php?t=66777
CC
You may want to point this out.
NTSC: Use ReJig
PAL: Use IfoEdit/ReJig
Re-author with NTSC files have been reported to be buggy. :( Also, ReJig is still free! :D
2COOL,
as you reported re-author problems with NTSC files,i have chapters problems.
i can't find rejig in nic's page http://www.ReJig.org (old url?) and the search in forum,take to posts about rejib but not to download's link and (in Doom9's download pages too)
can you tell me where i find rejig? thank you.
T3NAX
27th December 2006, 13:17
:( when I try to replace the first VOB with VobBlanker I got this error:" Unrecognized stream in Audio ID 1 "
what is it?:(
jsoto
28th December 2006, 22:33
:( when I try to replace the first VOB with VobBlanker I got this error:" Unrecognized stream in Audio ID 1 "
what is it?:(Seems there is something corrupt in your replacing VOB.
How did you create it?
In any case, it is a strange error, I never saw it.
Cut (use Cutfile) a few packs (500 packs produces a file of 1 MB) from the beginning, zip it and send it to me:
jesus_soto_viso ( at ) terra ( dot ) es
jsoto
EDIT: Forgot to mention:
Open the VOB in Vobedit and take a look to the audio packs of stream #1 (0x81 if ac3)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.