Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd December 2013, 20:29   #1  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
AudSub Splitter - Audio & text subtitles cutter by .avs trim and more

this program is a GUI for vfr.py and trimsubs

Can split and cut audio, subtitle files and timecodes files

create QPFile and chapters file, as vfr.py and trimsubs do


With some other features like:-

* you can use the trims line in trims field directly without .avs script

that mean you can choose what suits you of inputting avs script, or put the trims line

* original audio container instead mka is default audio file output, However, you can modify it to mka and abbreviated internal mkvextract step to gain some time in large files if you do not mind .mka

* ("-v"‎ only‎) option will use (vfr.py 0.8.7), nothing except .mka supported in this case, you may not need this option in first place

* delay in output audio file name will change to 0 automatically

* no Python needed


download link http://sourceforge.net/projects/aud-subsplitter/

source code

Enjoy
__________________
See My Avisynth Stuff

Last edited by real.finder; 8th July 2023 at 17:40.
real.finder is offline   Reply With Quote
Old 25th December 2013, 21:37   #2  |  Link
DarAR92
Registered User
 
Join Date: Feb 2011
Posts: 1
Thanks for the program.
DarAR92 is offline   Reply With Quote
Old 11th January 2014, 11:49   #3  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
AudSub Splitter 2.5.7 was released with bugs fix

note: make sure you have Microsoft Visual C++ 2008 SP1 Redistributable Package (x86) installed, or you can put the contents of this in AudSub_Splitter folder

Last edited by real.finder; 8th July 2023 at 17:40.
real.finder is offline   Reply With Quote
Old 11th January 2014, 12:04   #4  |  Link
mastrboy
Registered User
 
Join Date: Sep 2008
Posts: 365
Thanks for the update

Very handy program since I never can remember all the command line options for vfr.py.
__________________
(i have a tendency to drunk post)
mastrboy is offline   Reply With Quote
Old 9th October 2016, 01:48   #5  |  Link
~ VEGETA ~
The cult of personality
 
~ VEGETA ~'s Avatar
 
Join Date: May 2013
Location: Planet Vegeta
Posts: 155
one question: my audio file from dgindex has -131 delay in its name... should i specify a delay manually or leave it?

i remember it deals with it automatically but i wanted to make sure.

thanks
~ VEGETA ~ is offline   Reply With Quote
Old 9th October 2016, 02:16   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
You should be able to use something like below as a DGIndex template (Read the docs)

Example.avs DGIndex Template file
Code:
### Filled in by DGIndex when using as DGIndex Template
VideoFileName   ="__vid__"
AudioFileName   ="__aud__"
AudioDelay      =Value("__del__")
################################################################################
MPEG2Source(VideoFileName)

AudioExt=RT_GetFileExtension(AudioFileName)

Audio=      (AudioExt==".ac3") ? NICAC3Source(AudioFileName,channels=2,DRC=0)
        \ : (AudioExt==".mpa"||AudioExt==".mp1"||AudioExt==".mp2"||AudioExt==".mp3") ? NicMPG123Source(AudioFileName,Normalize=False)
        \ : (AudioExt==".wav") ? RaWavSource(AudioFileName)
        \ : (AudioExt==".dts") ? NicDTSSource(AudioFileName)
        \ : 0

(Audio.IsClip ) ? AudioDub(Audio).DelayAudio(AudioDelay).Trim(0,0) : NOP    # Trim, chop/add audio to length
EDIT: I used RT_stats above for RT_GetFileExtension(), Need RT_stats. (Otherwise, loads of extra stuff needed)
EDIT: Yes of course you can do it manually, would recommend not doing so.
EDIT: Above, untested.
EDIT: Above uses NicAudio for guess what, audio.
EDIT:
Rough guide for DGIndex, copy template file (as above) into DGIndex Templates directory, and assign DGIndex:Menu:/Options/AVS Template/ to that file.
EDIT: In blue added
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 9th October 2016 at 14:50.
StainlessS is offline   Reply With Quote
Old 9th October 2016, 10:48   #7  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by ~ VEGETA ~ View Post
one question: my audio file from dgindex has -131 delay in its name... should i specify a delay manually or leave it?

i remember it deals with it automatically but i wanted to make sure.

thanks
you don't have to do it if it in the name
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 9th October 2016, 14:14   #8  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Originally Posted by real.finder View Post
you don't have to do it if it in the name
You sure about that ?
You dont if converted to WAV, but I would say you do if not (Thats the whole point of the __del__ template option).
If WAV then __del__ will be 0.0 (irrespective of original delay, compensated for when WAV produced).

EDIT: DGIndex User Manual, Audio Menu/ Output Method
Quote:
An important number is contained in the filename of the demultiplexed audio file: the delay correction for the audio relative to the video. In the example above, the audio delay correction is reported as -248 milliseconds. That means that the audio should be advanced by 248 milliseconds. The number -248 could thus be entered directly into VirtualDub's "Audio Skew Correction" edit box to achieve audio/video synchronization. Note that when AC3 tracks are decoded to WAV, their filenames do not contain a delay correction value because the correction is applied during decoding.
And from AVS Template
Quote:
You may also use the __del__ specifier to generate the delay value for use in DelayAudio(__del__).
EDIT: Ooops, I guess that I should have read the opening post, (thought the question by ~ VEGETA ~ related to DGIndex, and not your
AudSub Splitter), sorry
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 9th October 2016 at 15:02.
StainlessS is offline   Reply With Quote
Old 9th October 2016, 18:35   #9  |  Link
~ VEGETA ~
The cult of personality
 
~ VEGETA ~'s Avatar
 
Join Date: May 2013
Location: Planet Vegeta
Posts: 155
Quote:
Originally Posted by real.finder View Post
you don't have to do it if it in the name
Yes that is what I thought, I slept without testing it. Now I will.

I remember they added this feature but I wanted to make sure, I suggest you put it in the main features of the tool itself.
~ VEGETA ~ is offline   Reply With Quote
Old 9th October 2016, 19:20   #10  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by ~ VEGETA ~ View Post
Yes that is what I thought, I slept without testing it. Now I will.

I remember they added this feature but I wanted to make sure, I suggest you put it in the main features of the tool itself.
it's in mkvmerge and vfr.py, this gui just rename the output delay to 0 automatically

but if delay not minus and first frame is 0 or something not big enough to override the delay then you need to do calculations yourself and specify the new delay that you will get from calculations manually in the muxing (or rename the 0 to it if you use something support that) or in avs
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 9th October 2016, 20:25   #11  |  Link
~ VEGETA ~
The cult of personality
 
~ VEGETA ~'s Avatar
 
Join Date: May 2013
Location: Planet Vegeta
Posts: 155
I will pick the input fps 30000/1001 but what about output one? the video should be 23.976 fps as you know. I forgot this


it still gives me errors! no sync at all
~ VEGETA ~ is offline   Reply With Quote
Old 9th October 2016, 21:08   #12  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by ~ VEGETA ~ View Post
I will pick the input fps 30000/1001 but what about output one? the video should be 23.976 fps as you know. I forgot this


it still gives me errors! no sync at all
didn't face this before, make sure you write the trim line in official way

somthing like...
Code:
Trim(2114, 31753) ++ Trim(35351, 49226)
and make sure it's before IVTC (especially decimate)

the output fps has most effect in qpfile, and none effect in audio cutting
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 9th October 2016, 22:19   #13  |  Link
~ VEGETA ~
The cult of personality
 
~ VEGETA ~'s Avatar
 
Join Date: May 2013
Location: Planet Vegeta
Posts: 155
Quote:
Originally Posted by real.finder View Post
didn't face this before, make sure you write the trim line in official way

somthing like...
Code:
Trim(2114, 31753) ++ Trim(35351, 49226)
and make sure it's before IVTC (especially decimate)

the output fps has most effect in qpfile, and none effect in audio cutting
Wait! I think I knew the problem. AudSub didn't do anything wrong. I guess the reason is the original TS is corrupt! especially first and last seconds (3~ seconds) which is usual in these files.

Now, I cut the thing using dgindex then did the usual... waiting for the result now. I will keep you posted.
~ VEGETA ~ is offline   Reply With Quote
Old 10th October 2016, 00:03   #14  |  Link
~ VEGETA ~
The cult of personality
 
~ VEGETA ~'s Avatar
 
Join Date: May 2013
Location: Planet Vegeta
Posts: 155
nothing worked!

the video is 23:55 min while the audio is 24:02 (with out fps = 30000/1001) and also wrong when choosing out fps 24000/1001

what is the problem
~ VEGETA ~ is offline   Reply With Quote
Old 10th October 2016, 00:11   #15  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by ~ VEGETA ~ View Post
nothing worked!

the video is 23:55 min while the audio is 24:02 (with out fps = 30000/1001) and also wrong when choosing out fps 24000/1001

what is the problem
try replace DGIndex.exe with the one in Attachments (I compile it by vs2012, it's dgindex158src_fix_mod_20160416 in https://onedrive.live.com/?id=8658EC...58EC275D9699D5), or better this https://www.solidfiles.com/v/2wnB7gv35LnK5 more up to date

or extract audio by other method (tsmuxer for example)

or use another source
Attached Files
File Type: rar DGIndex.rar (181.0 KB, 197 views)
__________________
See My Avisynth Stuff

Last edited by real.finder; 25th July 2020 at 04:25.
real.finder is offline   Reply With Quote
Old 10th October 2016, 04:54   #16  |  Link
~ VEGETA ~
The cult of personality
 
~ VEGETA ~'s Avatar
 
Join Date: May 2013
Location: Planet Vegeta
Posts: 155
well, I reverted back to using split_aud.pl and it gave the correct output file in 10 seconds. However, sync is still not correct for some strange reason!!!

I will try more tomorrow and give the final result here so that all people benefit from it. If needed, I will share the ts file with vs or avs file (tried both but nothing good). video and audio had the same trims but still no sync.
~ VEGETA ~ is offline   Reply With Quote
Old 10th October 2016, 05:22   #17  |  Link
~ VEGETA ~
The cult of personality
 
~ VEGETA ~'s Avatar
 
Join Date: May 2013
Location: Planet Vegeta
Posts: 155
I tried TSmuxer but it refused to even open the thing! it says the following:

http://i.imgur.com/MCURIXo.jpg

this is the raw TS: http://www.nyaa.se/?page=view&tid=857807

I cut it by dgindex so that there are no ads in the start and end, only in middle. And here is the trims that cuts them late: trim(0,20940)+trim(24538,46589)

so if you use that along with tfm.tdecimate (cfr cuz i use vs ones) you will get 23:54 clip. I just saw that the extracted audio by dgindex itself is wrong.

tell me if you got any results.

I guess i will use HorribleSubs 1080p video as the source for this week's episode.
~ VEGETA ~ is offline   Reply With Quote
Old 10th October 2016, 13:19   #18  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by ~ VEGETA ~ View Post
I tried TSmuxer but it refused to even open the thing! it says the following:

http://i.imgur.com/MCURIXo.jpg

this is the raw TS: http://www.nyaa.se/?page=view&tid=857807

I cut it by dgindex so that there are no ads in the start and end, only in middle. And here is the trims that cuts them late: trim(0,20940)+trim(24538,46589)

so if you use that along with tfm.tdecimate (cfr cuz i use vs ones) you will get 23:54 clip. I just saw that the extracted audio by dgindex itself is wrong.

tell me if you got any results.

I guess i will use HorribleSubs 1080p video as the source for this week's episode.
Be careful of rules 6

to get same split_aud.pl behavior you can use "-v"‎ only‎ and join the output files

you can wait for the dgindex mod (Attachments Pending Approval), or fix your .ts with ProjectX or other method

or you can use another trick like mux it in mkv then use mkvextract or by using ffmpeg.exe to extract audio
__________________
See My Avisynth Stuff

Last edited by real.finder; 10th October 2016 at 13:25.
real.finder is offline   Reply With Quote
Old 10th October 2016, 19:19   #19  |  Link
~ VEGETA ~
The cult of personality
 
~ VEGETA ~'s Avatar
 
Join Date: May 2013
Location: Planet Vegeta
Posts: 155
well, forget everything we just said. I remuxed it to mkv then used mkvextract to get the audio file out. then cut it using perl, after that did the delay manually via mkvmerge.

i could put the delay in the name to save the last step. I hope no one gets this issue because it was from the source file itself, as eac3to expected.... but i trusted dgindex more.


we should put more effort to make solutions for these issues
~ VEGETA ~ is offline   Reply With Quote
Old 8th July 2023, 17:49   #20  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
small update, "AudSub_Splitter 2.5.7.2" re-branded as "AudSub_Splitter 2.5.7.2 new"

both vfr.py and trimsubs updated to last git change, also mkvtoolnix updated to 10.0 (last ver. that work with xp from what I read in reddit)
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Reply

Tags
chapters, helper tool, splitter, text subtitles, vfr

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:02.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.