Log in

View Full Version : Cutting AC3 by AVS?


osgZach
25th January 2010, 00:50
Wandering into the audio forums for a quick bit..

I was just wondering if there is a utility out there that can make accurate cuts to an AC3 file, based on cuts made to a video, inside an Avisynth script?

I am working with Yatta in particular, as a lot of Anime is VFR as I'm sure some know.. And I have lots of Anime :p

I did come across a resource for a utility that was a PERL script apparently.. However I believe it only works with AAC files, and I prefer to keep my AC3 intact, as if I'm not mistaken its a lossy format (so why go from lossy to lossy).

But basically the script would get fed an AVS with cut entries made by a Yatta tool called "cutter" (I forget what the AVS code looks like, probably just Trims or something) and it would cut the audio based on whatever was in the AVS for cuts.

I think I saw a thread for a similar tool before, but it was a long time ago and I'm not sure if it ever took off/ is still worth using, nor do I remember its name.

Any suggestions would be great, if a tool exists. Or if anyone skilled in PERL might be interested in studying the script to modify it for broader support, I could try and find out of its open source / try to get in touch with the author.

Inspector.Gadget
25th January 2010, 00:59
Have you tried the Audio Cutter built into MeGUI, which can take cuts files from the built in AVS Cutter as input?

osgZach
25th January 2010, 01:11
I thought about it, yes. The problem is, I'm using Yatta, which makes its own AVS script. I don't think they use the same type of methods to cut.. or if they do, it's beyond my understanding to integrate all the code from both into a single AVS and have any idea what I'm doing.. (Yatta outputs tons of trim statements as it is)

If I try to cut the video after I've used Yatta, it will probably come out screwed up, because its for making VFR files that use timecodes files. I'd have to manually try to calculate which frame need to be removed/adjusted to account for the missing frames..

I have a rough idea, that it may be possible to use MeGUI before using Yatta, but I'm not sure if it would come out the same even after I've done a project either. And for a process that takes hours to complete, I just can't see myself trying it on a hunch.

osgZach
25th January 2010, 16:12
Wow Steven to the rescue again :eek:

Yes, I was talking about split_aud.pl - I happened across Koda's guide via a google search, and maybe I misunderstood it. But it sounded like you could load YMC, make your cuts, set your other stuff, do your work in Yatta, save your script and then run it through split_aud.pl

Although VFR decimation was not specifically mentioned so it could just me being whack, and having impossible dreams :confused:



As for cutting before yatta, I had the idea similar to what you suggested. However I want to keep the AC3 so don't wish to re-encode or anything like that. So this was what I was thinking.

Prepare a dummy session w/MeGUI and note the frame #'s of my ranges. Save the cuts file, then use that to do the audio only (or if necesarry just do a dummy encode to a huge file w/fast settings, to get the cut audio that way).

Then when I import into YMC, setup cutter, and cut the same frame ranges. This should load the project in Yatta with those frames missing, if I recall correctly, so in theory I would expect it to work. Then any VFR decimation will still match the new audio I have, as it will have the same length just missing the sections that were "never" there.

Does this sound correct?

stax76
25th January 2010, 16:44
Can't help with VRF, StaxRip cuts video using AviSynth when reencoding, audio is cut depending on situation, AC3 using VirtualDubMod, works reliable for DVD sources, DVB source might cause issues.

osgZach
25th January 2010, 21:06
Oh yeah, I had forgot VD Mod had AC3 support.. I've generally ignored it as its so old.. Its a shame there aren't more general input plugins for Vdub though. It would be great if it had a better plugin system that made writing plugins for codecs, or even tools like DGindex, more easy to do (and I'm simply guessing its not as it hasn't been done)

I will keep Staxrip in mind if none of my other ideas pan out. Thanks

stax76
25th January 2010, 21:40
It's old but now still works as good as before, StaxRip uses it since the beginning to encode, XviD and DivX, to demux AVI files, to cut AC3/MPA/MP2/MP3 and WAV files, never caused any issues.

sneaker_ger
25th January 2010, 21:49
A AC3-plugin (http://fcchandler.home.comcast.net/~fcchandler/Plugins/AC3/) for VirtualDub does exist.