PDA

View Full Version : Cut MPEG-2 TS recording (SD)


gametiger
28th November 2010, 13:50
Hey.


I have this DVB SD recording that I'd like to cut.

What's the best way to do this? I'd like to just cut it (and get a new TS file) and maybe encode it or whatever later.

Here are some specs of the file:
General
ID : 4
Complete name : E:\recording.ts
Format : MPEG-TS
File size : 1.51 GiB
Duration : 46mn 45s
Overall bit rate : 4 631 Kbps

Video
ID : 48 (0x30)
Menu ID : 137 (0x89)
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings, BVOP : Yes
Format settings, Matrix : Default
Format_Settings_GOP : M=3, N=12
Duration : 46mn 45s
Bit rate mode : Constant
Bit rate : 4 149 Kbps
Nominal bit rate : 4 000 Kbps
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Standard : PAL
Resolution : 8 bits
Colorimetry : 4:2:0
Scan type : Interlaced
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.400
Stream size : 1.36 GiB (90%)

Audio
ID : 64 (0x40)
Menu ID : 137 (0x89)
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 2
Mode : Joint stereo
Format_Settings_ModeExtension : Intensity Stereo + MS Stereo
Duration : 46mn 45s
Bit rate mode : Constant
Bit rate : 160 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Video delay : -214ms
Stream size : 53.5 MiB (3%)
Language : German
Language, more info : Clean effects

Text
ID : 96 (0x60)
Menu ID : 137 (0x89)
Format : Teletext
Language : German


Thanks in advance for any help!

netmask
28th November 2010, 21:38
By "cut" I guess you mean shorten it? Top and tail ? ProjectX or MPEGStreamclip. With ProjectX you can save as TS and you will maintain file integrity re subtitles. Not so sure about MPEGStreamclip in this regard.

Capsbackup
29th November 2010, 02:52
I have used HDTVtoMPEG2, and it works quite well. It is not frame accurate though. Never tried on standard definition video, but it might work.
http://www.videohelp.com/tools/HDTVtoMPEG2

netmask
29th November 2010, 03:49
If you need frame accuracy then you can edit the MPEG2TS file in Womble, but the best way to do it is to demux it into sound and video tracks using ProjectX that will clean up any transmission errors.

gametiger
29th November 2010, 10:36
Thanks for the suggestions, I'll try everything!

In the mean time I used Mpg2Cut2 and it worked quite well. I think it isn't frame accurate. It maintained the file integrity though so that's cool. Any reason why I shouldn't use this tool?


I then tried to encode the TS file (didn't matter whether I tried the original or the cutted TS) with MeGUI to x264 but I always get 20 fps (instead of the original 25 - PAL) and the aspect ratio is wrong too. Can somebody hook me up with a good AviSynth script to use (because I think that's my problem), please? I'd just like to create transparent x264 encodes of my TS recordings and maybe crop out some black borders too.


Thanks!

midnightsun
29th November 2010, 15:34
cuttermaran (which is free) is frame accurate (in addition to womble and videoredo which are not). It only reencodes the few frames where the stream gets cut if needed. It needs demuxed streams so you should use projectx beforehand to clean and demux the TS if you intend to go that way

Ghitulescu
29th November 2010, 15:36
cuttermaran (which is free) is frame accurate (in addition to womble and videoredo which are not).

You're mistaken about Womble, which is frame accurate.

midnightsun
29th November 2010, 21:03
"in addition" meaning "also womble and videoredo are frame accurate", "which are not" meaning "they are not free"

netmask
30th November 2010, 01:39
You can get a 30 day free trial of Womble with no restrictions to functionality. It's worth a look at that price! If the TS file is fairly free of transmission gliches you can import it directly into the time line without demuxing. If there are 2 sound tracks you can select the one you want by going to properties and there will be a drop down menu next to the audio. Downside is it ignores any subtitles if that is important, in which case ProjectX is the best approach.

Taurus
30th November 2010, 13:00
Thanks for the suggestions, I'll try everything!

In the mean time I used Mpg2Cut2 and it worked quite well. I think it isn't frame accurate. It maintained the file integrity though so that's cool. Any reason why I shouldn't use this tool?


I then tried to encode the TS file (didn't matter whether I tried the original or the cutted TS) with MeGUI to x264 but I always get 20 fps (instead of the original 25 - PAL) and the aspect ratio is wrong too. Can somebody hook me up with a good AviSynth script to use (because I think that's my problem), please? I'd just like to create transparent x264 encodes of my TS recordings and maybe crop out some black borders too.


Thanks!

You got something terrible wrong.
Did you index the file with Dgmpgdec first?
Show us the mediainfo of the encoded file.
20fps is veerry unlikely.
And the preview window inside the avs script creator is only showing wrong aspect ratios
when ticking "clever (TM) anamorphic encoding".
If you want a real time preview disable it and use manual settings.
Resize / click Suggest Resolution.
The preview should show correct ratios now.
Tick "Apply auto Preview"
Just loaded a ts file to verify: everything's as expected.
But these are MeGui basics, no need to clutter the Capturing and Editing forum with this.