AnimeSuki Forums

Register Forum Rules FAQ Members List Social Groups Search Today's Posts Mark Forums Read

Go Back   AnimeSuki Forum > Anime Related Topics > Fansub Groups

Notices

Reply
 
Thread Tools
Old 2010-10-21, 06:09   Link #1
Kuro07
Junior Member
 
Join Date: Oct 2010
How to cut transport streams

Hi,
I'm new here and am a fansubber and I'm having trouble cutting TS files...when i set them to cut to a certain clip...it doesn't cut that part and the audio get's out of sync a bit...is there any way to cut ts files accurately?Help is appreciated
Kuro07 is offline   Reply With Quote
Old 2010-10-21, 07:41   Link #2
TheFluff
Excessively jovial fellow
 
 
Join Date: Dec 2005
Location: ISDB-T
Age: 28
I suggest you cut with Avisynth when encoding the TS, not before encoding. Cutting the raw TS is usually rather suboptimal and may result in video artifacts, audio desync and inability to cut on the exact frame you want. If you absolutely have to do it, try one of Murdoc Cutter, TSPE, mpg2cut2 or HDTVtoMPEG2.
__________________
| ffmpegsource
17:43:13 <~deculture> Also, TheFluff, you are so fucking slowpoke.jpg that people think we dropped the DVD's.
17:43:16 <~deculture> nice job, fag!

01:04:41 < Plorkyeran> it was annoying to typeset so it should be annoying to read
TheFluff is offline   Reply With Quote
Old 2010-10-21, 09:13   Link #3
Mentar
Sore wa himitsu desu!
 
 
Join Date: Nov 2003
Location: Hamburg
Age: 44
Alternatively, if you're using Yatta, you can use the "Cutter" feature in ymb. There, you can place cut marks frame-exact, and eventually, you can have yatta write you the required avisynth-trim-script for the audio automatically, including offset correction.

If you don't use Yatta, however, you'll have to make do with what Fluffy listed.
Mentar is offline   Reply With Quote
Old 2010-10-21, 09:24   Link #4
Kuro07
Junior Member
 
Join Date: Oct 2010
Could you two please elaborate?
Kuro07 is offline   Reply With Quote
Old 2010-10-21, 10:55   Link #5
TheFluff
Excessively jovial fellow
 
 
Join Date: Dec 2005
Location: ISDB-T
Age: 28
Code:
mpeg2source("dongs.ts")
trim(300,5000)+trim(10000,...
etc etc (you can use AvsP or YMC or something to generate the trims), then you cut the audio with vfr.py or split_aud.pl.

If you can't figure this out by yourself given the hints you have gotten already, then you probably shouldn't be dealing with TS sources; you're going get much bigger problems than just cutting it if you proceed. There are enough bad encodes out there already, go download a pre-encoded raw from some p2p network or other and just remux that instead.
__________________
| ffmpegsource
17:43:13 <~deculture> Also, TheFluff, you are so fucking slowpoke.jpg that people think we dropped the DVD's.
17:43:16 <~deculture> nice job, fag!

01:04:41 < Plorkyeran> it was annoying to typeset so it should be annoying to read
TheFluff is offline   Reply With Quote
Old 2010-10-21, 15:08   Link #6
TGEN
Far out, man!
*Fansubber
 
Join Date: Jul 2008
Age: 30
You could just encode a lossless out of the TS, and cut that fully frame-accurate. The additional time (and space) wasted on stuff you want to cut is a trade-off.
TGEN is offline   Reply With Quote
Old 2010-10-21, 15:21   Link #7
jfs
Aegisub dev
 
 
Join Date: Sep 2004
Location: Stockholm, Sweden
Age: 30
Quote:
Originally Posted by TGEN View Post
You could just encode a lossless out of the TS, and cut that fully frame-accurate. The additional time (and space) wasted on stuff you want to cut is a trade-off.
And if you don't have space for that, stop being an encoder until you get yourself more space.
__________________

Aegisub developer [ Forum | Manual | Feature requests | Bug reports | IRC ]
Don't ask for: More VSFilter changes (I won't), karaoke effects, help in PM's
jfs is offline   Reply With Quote
Old 2010-10-21, 16:03   Link #8
PositronCannon
Senior Member
*Fansubber
 
 
Join Date: May 2010
Location: Spain
Age: 23
4 months ago I started trying to learn how to cut TSs properly without screwing anything up. I'm stupid so it took me up until last week to succesfully do it even though I had all the tools I needed to begin with.

I've never really learned Avisynth nor feel like it (yes I know cutting for one is extremely simple, but I like my GUIs), so if you're like me and just want to use a GUI for it, MeGUI is the software I use. Tools -> AVS Cutter and loading the cuts file it generates on the audio side of things as well is all you need... well, other than indexing and audio demuxing, creating AVS script properly, and setting up encoder, all of which are way more complicated than cutting anyway. Feel free to ask me in a message if you can't figure it out, I'm all self-taught so I know how frustrating this stuff can be.

I've never used Yatta but seeing how some actually experienced encoders (read: not me) recommend it, you might want to check it out instead. Treat my way as a back-up if anything.

The lossless option mentioned above is also a way if you have the space, and you can use whatever software you want with that. I disagree with the "if you don't have space for lossless encoding, stop being an encoder" thing as you shouldn't really need lossless compression for any kind of general use. You do need a decent computer to encode H264 at decent settings without an episode taking half a day, though.
PositronCannon is offline   Reply With Quote
Old 2010-10-21, 16:37   Link #9
TheRyuu
warpsharpened
 
Join Date: Sep 2008
Quote:
Originally Posted by Mentar View Post
Alternatively, if you're using Yatta, you can use the "Cutter" feature in ymc. There, you can place cut marks frame-exact, and eventually, you can have yatta write you the required avisynth-trim-script for the audio automatically, including offset correction.
:Easymode:

Possibly even easymode.jpg

Last edited by TheRyuu; 2010-10-21 at 16:39. Reason: mentar typos
TheRyuu is offline   Reply With Quote
Old 2010-10-22, 12:59   Link #10
Kristen
Senior Member
*Author
 
 
Join Date: Jul 2007
Location: Virginia Tech
There's 2 main ways I know how to do it. You need avisynth and a tool called AVSP to do it, as well as proper IVTC tools.

I usually first make a .d2v index file in DGIndex. If you open that up with AVSP, it'll have the first line as MPEG2Source("a.d2v"). If it says that MPEG2Source couldn't open the file, make it DGDecode_MPEG2Source("a.d2v")

In the next line, put your IVTC. Some people like to do just the field matching, others like to do decimation as well.

Now, here's where the two methods diverge. You should really choose whichever is easier for you, as well as whether you are planning to re-encode the audio or not.

AVSP method (Warning: If you are not re-encoding audio, do not use this method):
1. Click on the scrollbar at the bottom. Navigate to the last frame prior to your desired trim point.
2. Click on video->Trim selection editor -> Set selection endpoint.
3. Select "Keep unselected regions", and apply.
4. The stream will now shorten. Navigate to the first frame after the OP (Or whatever the first section is). Video->trim selection editor->Set selection startpoint
5. Leaving the box open, navigate to the last frame before your next desired section. Video->trim selection editor->Set selection endpoint
6. Apply
7. Repeat 4-5 for as many junk sections as there are. After the last one, just hit apply after selecting the start point.

#Trim method:
1. Write #Trim( on the line after IVTC.
2. Click on the scroll bar at the bottom. Use arrow keys to navigate through frames until you find the exact start of the prologue. Write that number down after the ( in #Trim(
3. Continue scrolling until you find the last frame of the section you want. Add that frame in with a , frame) ++
Your script should now look something like:
DGDecode("a.d2v")
TFM(PP=9001)
#Trim(391, 2000)++
4. After ++ write Trim(
5. Repeat 2-4 until you have every section listed.
6. After the last section, don't add ++. Remove the # before the first Trim. You have a fully trimmed model
__________________
Kristen is offline   Reply With Quote
Old 2010-10-23, 04:13   Link #11
Kuro07
Junior Member
 
Join Date: Oct 2010
Quote:
Originally Posted by Kristen View Post
There's 2 main ways I know how to do it. You need avisynth and a tool called AVSP to do it, as well as proper IVTC tools.

I usually first make a .d2v index file in DGIndex. If you open that up with AVSP, it'll have the first line as MPEG2Source("a.d2v"). If it says that MPEG2Source couldn't open the file, make it DGDecode_MPEG2Source("a.d2v")

In the next line, put your IVTC. Some people like to do just the field matching, others like to do decimation as well.

Now, here's where the two methods diverge. You should really choose whichever is easier for you, as well as whether you are planning to re-encode the audio or not.

AVSP method (Warning: If you are not re-encoding audio, do not use this method):
1. Click on the scrollbar at the bottom. Navigate to the last frame prior to your desired trim point.
2. Click on video->Trim selection editor -> Set selection endpoint.
3. Select "Keep unselected regions", and apply.
4. The stream will now shorten. Navigate to the first frame after the OP (Or whatever the first section is). Video->trim selection editor->Set selection startpoint
5. Leaving the box open, navigate to the last frame before your next desired section. Video->trim selection editor->Set selection endpoint
6. Apply
7. Repeat 4-5 for as many junk sections as there are. After the last one, just hit apply after selecting the start point.

#Trim method:
1. Write #Trim( on the line after IVTC.
2. Click on the scroll bar at the bottom. Use arrow keys to navigate through frames until you find the exact start of the prologue. Write that number down after the ( in #Trim(
3. Continue scrolling until you find the last frame of the section you want. Add that frame in with a , frame) ++
Your script should now look something like:
DGDecode("a.d2v")
TFM(PP=9001)
#Trim(391, 2000)++
4. After ++ write Trim(
5. Repeat 2-4 until you have every section listed.
6. After the last section, don't add ++. Remove the # before the first Trim. You have a fully trimmed model
tnx kristen...you method seems like the easiest i'll try it
Kuro07 is offline   Reply With Quote
Reply

Thread Tools

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 -5. The time now is 16:55.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
We use Silk.