Log in

View Full Version : DVB-TS cut commercials but retain subtitles


senderj
5th September 2015, 09:41
My stb records tv programmes to mpeg2-ts with subpic subtitles. I am trying to cut the commercials from the recording but preserves all subtitles.

I tried ProjectX. It can demux all streams to separate files and make cutting very difficult. Besides the sup files produced can only be edit after OCR and a lot of corrections are needed. Subtitle Edit also involves OCR and correction. I tried ts-doctor. It is good at cutting commercials but I don't know why the output ts subtitle cannot be displayed by the stb.

All I want is a method to cut commercials with all streams, video, audios, subtitles at the same time. No transcoding, no OCR and modifications. Just cut. Is there any software that can do this? Please help.

kalehrl
5th September 2015, 18:51
Cutting in ProjectX is pretty simple.
Just mark start frame and press button 'A' on the keyboard, then end frame and again button 'A'.
Then instead of 'demuxing' choose '1:1 copy' and you should get a ts file which is cut together with audio, video subtitles.
It can also demux subtitles to idx/sub files but you still need to OCR them to edit them.
Only teletext subtitles can be directly exported to srt text file.

Ghitulescu
5th September 2015, 20:37
ProjectX only works with SDTV, not HDTV - just to avoid any confusions.

I do all my SDTV cuttings with ProjectX.

senderj
6th September 2015, 04:17
Thanks for all the replies.

I've tried ProjectX 1:1 copy. But because my clip is MPEG2-TS and ProjectX doesn't support preview of this type. So it is difficult to do cutting. I tried to use the cut file of TS-Doctor and use cutmode=4 in ProjectX, but 1:1 copy only support byte posn cut list, not time code. Is there any way I can convert the time code to byte posn?

netmask
6th September 2015, 05:04
Could you post a MediaInfo file report on your video file. (text mode and then you can copy and paste the results)
I use ProjectX to remove commercials from my on air recordings.
Video is MPEG2 and Audio either AC3 or mpeg
Subtitles

I use demux mode as it fixes up a lot of transmission errors in this mode and edit via the arrow button in ProjectX - almost frame accurate. Make sure you click on the Cut Control tab bottom left to see the picture and the edit navigation tools.

Ghitulescu
6th September 2015, 10:30
But because my clip is MPEG2-TS and ProjectX doesn't support preview of this type.

It does. Either you don't have the necessary codecs (hard to believe after XP) or you're mistaking MPEG2-TS with HDTV (like AVCHD) or with a transmission standard (like DVB-S2).

senderj
8th September 2015, 09:09
I think I was mislead by the file properties of Windows to believe that the file is mpeg2-ts. I use MediaInfo and here is the metadata of all streams

General
ID : 1 (0x1)
Complete name : G:\data\Food Crisis.ts
Format : MPEG-TS
File size : 879 MiB
Duration : 20mn 5s
Start time : UTC 2015-09-07 12:00:31
End time : UTC 2015-09-07 12:20:21
Overall bit rate mode : Variable
Overall bit rate : 6 113 Kbps

Video
ID : 841 (0x349)
Menu ID : 2 (0x2)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Format settings, GOP : M=3, N=12
Codec ID : 27
Duration : 20mn 5s
Bit rate : 5 423 Kbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : MBAFF
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.105
Stream size : 779 MiB (89%)
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709

Audio #1
ID : 842 (0x34A)
Menu ID : 2 (0x2)
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : 6
Duration : 20mn 5s
Bit rate mode : Constant
Bit rate : 192 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Delay relative to video : -755ms
Stream size : 27.6 MiB (3%)

Audio #2
ID : 843 (0x34B)
Menu ID : 2 (0x2)
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : 6
Duration : 20mn 5s
Bit rate mode : Constant
Bit rate : 192 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Delay relative to video : -760ms
Stream size : 27.6 MiB (3%)

Text #1
ID : 845 (0x34D)
Menu ID : 2 (0x2)
Format : DVB Subtitle
Codec ID : 6
Language : Chinese

Text #2
ID : 846 (0x34E)
Menu ID : 2 (0x2)
Format : DVB Subtitle
Codec ID : 6
Language : chs / English



and the preview screen of Project X said that
"picture decoding not possible no preview for MPEG-4/H.264"
is it because of codec problem?

kalehrl
8th September 2015, 13:17
No, it's because projectx can't handle h264 at all.

pball
9th September 2015, 23:37
senderj you mentioned a sup file in your first post. If it's the same format of sup file I've been dealing with I have a way to split them, could you share a sup file for me to test?

senderj
10th September 2015, 02:21
Though mine is not mpeg2-ts, I do like to know how to use Project X. Here are 2 questions I've encountered.
1. When I demux my h264-ts, there are many warning about GOP size exceeded 6MB. Is it because of h264?
2. I tried to cut the video using the CutControl tab. I set 2 cut points, one at the very beginning and one in the middle. But when I start the demux, it still demux the whole file. How can I just demux the un-cut part?

pball, cutting each stream separately is not something at the top of my list. So splitting the sup is not what I would like to try at the moment. I intended to give you the sup file anyway, but the zipped file is too large and don't know how to cut the demux range (see above). So you have to wait for a while.

Ghitulescu
10th September 2015, 07:33
1. yes
2. the cutting procedure is explained in detail not only in internet (google, bing, cortana :) ) but also here in the guides section.

senderj
11th September 2015, 01:54
Ghitulescu, I followed the Project X Reference in this site to go this far. The cut points are set, demux works, but still the output is not cut.

pball, I am still not able to cut the sup to smaller. I post the full sup in zipx and hope you can read it. But to allow it to be upload I rename it to zip. If you can't read it, rename it back to zipx and see if it works. Mind you that it is just a segment of video I record from TV, not a full programme.

pball
18th September 2015, 12:31
senderj I checked out that subtitle file and it's not the sup format I'm familiar with, so I can't help.

Ghitulescu
18th September 2015, 14:52
I can't open the ZIP file - the method is non standard and therefore not recognized.