multi lang, each cc into a new file #202

Open
opened 2026-01-29 16:37:53 +00:00 by claunia · 7 comments
Owner

Originally created by @december-soul on GitHub (Nov 29, 2016).

If i have an DVB recording with more then one cc i would like to extract each cc into a new file.

like:

arte_multiaudio_deu.srt
arte_multiaudio_fra.srt

is there a way to auto handle multi cc video files?
This should work without multi times -o1 .. -o2 ..
I don't known how many dvb_subtitle are available.
So i want to start the ccextrator for each dvb recording without
pre-check the number of subtitles.

Here my testfile.

https://www.dropbox.com/s/5oaqnjgqq1cqzky/arte_multiaudio.ts?dl=0
It containts
Input #0, mpegts, from 'arte_multiaudio.ts':
Duration: 00:02:13.36, start: 1.400000, bitrate: 1612 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 320x240 [SAR 4:3 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc
Stream #0:10x101: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s
Stream #0:20x102: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s
Stream #0:30x103: Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
Stream #0:40x104: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
Stream #0:50x105: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 448 kb/s
Stream #0:60x106: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)

I would like to extract 0:4 and 0:6.

regards
DS

Originally created by @december-soul on GitHub (Nov 29, 2016). If i have an DVB recording with more then one cc i would like to extract each cc into a new file. like: arte_multiaudio_deu.srt arte_multiaudio_fra.srt is there a way to auto handle multi cc video files? This should work without multi times -o1 .. -o2 .. I don't known how many dvb_subtitle are available. So i want to start the ccextrator for each dvb recording without pre-check the number of subtitles. Here my testfile. [](https://www.dropbox.com/s/5oaqnjgqq1cqzky/arte_multiaudio.ts?dl=0) https://www.dropbox.com/s/5oaqnjgqq1cqzky/arte_multiaudio.ts?dl=0 It containts Input #0, mpegts, from 'arte_multiaudio.ts': Duration: 00:02:13.36, start: 1.400000, bitrate: 1612 kb/s Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 320x240 [SAR 4:3 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc Stream #0:1[0x101](deu): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s Stream #0:2[0x102](fra): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s Stream #0:3[0x103](deu): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250 Stream #0:4[0x104](deu): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired) Stream #0:5[0x105](deu): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 448 kb/s Stream #0:6[0x106](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired) I would like to extract 0:4 and 0:6. regards DS
claunia added the difficulty: medium label 2026-01-29 16:37:53 +00:00
Author
Owner

@sidgairo18 commented on GitHub (Jan 22, 2017):

@cfsmp3 I would like to work on this.

@sidgairo18 commented on GitHub (Jan 22, 2017): @cfsmp3 I would like to work on this.
Author
Owner

@cfsmp3 commented on GitHub (Jan 22, 2017):

go for it

On Sun, Jan 22, 2017 at 1:24 AM, Siddhartha Gairola <
notifications@github.com> wrote:

@cfsmp3 https://github.com/cfsmp3 I would like to work on this.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/CCExtractor/ccextractor/issues/447#issuecomment-274319514,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFrJ2ZKxJcjG6aIhtdSHO9pcwhYYzkyCks5rUyBagaJpZM4K--KM
.

@cfsmp3 commented on GitHub (Jan 22, 2017): go for it On Sun, Jan 22, 2017 at 1:24 AM, Siddhartha Gairola < notifications@github.com> wrote: > @cfsmp3 <https://github.com/cfsmp3> I would like to work on this. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/CCExtractor/ccextractor/issues/447#issuecomment-274319514>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AFrJ2ZKxJcjG6aIhtdSHO9pcwhYYzkyCks5rUyBagaJpZM4K--KM> > . >
Author
Owner

@december-soul commented on GitHub (Mar 22, 2017):

any news for that?

@december-soul commented on GitHub (Mar 22, 2017): any news for that?
Author
Owner

@pandeykartikey commented on GitHub (Jan 21, 2018):

@cfsmp3 I would like to have a go at this issue

@pandeykartikey commented on GitHub (Jan 21, 2018): @cfsmp3 I would like to have a go at this issue
Author
Owner

@cfsmp3 commented on GitHub (Jan 22, 2018):

@kartik-25 by all means go for it.

@cfsmp3 commented on GitHub (Jan 22, 2018): @kartik-25 by all means go for it.
Author
Owner

@NilsIrl commented on GitHub (Jan 13, 2020):

I was unable to see the German subtitles in VLC.

They can be selected but nothing shows up.

@NilsIrl commented on GitHub (Jan 13, 2020): I was unable to see the German subtitles in VLC. They can be selected but nothing shows up.
Author
Owner

@Rahul-2k4 commented on GitHub (Dec 16, 2025):

Hi everyone,

I’ve been working on exactly this use case. I implemented a solution that automatically extracts each DVB subtitle stream into its own output file, without requiring multiple -o runs or pre-knowing the number of subtitle streams.

The approach works by:
Discovering all DVB subtitle streams from the PMT (PID + language).
Creating a separate decoding pipeline per subtitle PID, each with its own decoder, timing context, encoder, and output file.
Generating filenames automatically using language / PID (e.g. arte_multiaudio_deu.srt, arte_multiaudio_fra.srt).
Preserving existing behavior when the feature is not enabled.

This is exposed via a new flag:
--split-dvb-subs
So running CCExtractor once on a file like your arte_multiaudio.ts will extract both subtitle streams (0:4 and 0:6) into separate files automatically.

I’m preparing a PR that implements this safely (no global state, lazy init, clean shutdown). I’ll link it here once opened for review.
Thanks for the detailed example — it directly matches the test case I used.

@Rahul-2k4 commented on GitHub (Dec 16, 2025): Hi everyone, I’ve been working on exactly this use case. I implemented a solution that automatically extracts each DVB subtitle stream into its own output file, without requiring multiple -o runs or pre-knowing the number of subtitle streams. The approach works by: Discovering all DVB subtitle streams from the PMT (PID + language). Creating a separate decoding pipeline per subtitle PID, each with its own decoder, timing context, encoder, and output file. Generating filenames automatically using language / PID (e.g. arte_multiaudio_deu.srt, arte_multiaudio_fra.srt). Preserving existing behavior when the feature is not enabled. This is exposed via a new flag: --split-dvb-subs So running CCExtractor once on a file like your arte_multiaudio.ts will extract both subtitle streams (0:4 and 0:6) into separate files automatically. I’m preparing a PR that implements this safely (no global state, lazy init, clean shutdown). I’ll link it here once opened for review. Thanks for the detailed example — it directly matches the test case I used.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#202