[QUESTION] Support for extracting arib subs from bin_data pid #648

Closed
opened 2026-01-29 16:50:08 +00:00 by claunia · 0 comments
Owner

Originally created by @jakubvojacek on GitHub (Jul 20, 2021).

CCExtractor version: 0.90

In raising this issue, I confirm the following:

  • I have read and understood the contributors guide.
  • I have checked that the bug-fix I am reporting can be replicated, or that the feature I am suggesting isn't already present.
  • I have checked that the issue I'm posting isn't already reported.
  • I have checked that the issue I'm porting isn't already solved and no duplicates exist in closed issues and in opened issues
  • I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.
  • I have used the latest available version of CCExtractor to verify this issue exists.
  • I have ticked all the boxes in this section and to prove it I'm deleting the section completely to remove boilerplate text.

Necessary information

  • Is this a regression (i.e. did it work before)? Most likely not
  • What platform did you use? Linux
  • What were the used arguments? ccextractor output.ts -datapid 0x102

Video links

  • original file - https://edge1.motv.eu/aribs/nsc.ts
  • ffmpeg copying - ffmpeg -y -i nsc.ts -map 0:0 -vcodec copy -map 0:1 -acodec copy -map 0:3 -scodec copy -copy_unknown -f mpegts output.ts
  • copied file - https://edge1.motv.eu/aribs/output.ts
  • ccextractor output.ts -datapid 0x102 found no subs
  • i tried playing around with -datastreamtype and -streamtype but no luck

I am trying to extract arib captions from stream that is transcoded via ffmpeg (abr, resize, ...) and I need to copy the subs as well so that the timestamp of the video would be same as of subtitles. To simplify things, I am testing with simple ffmpeg copy, command above.

I know that ffmpeg does not support copying arib (isdbt) subtitles yet, it can only decode, not encode. But anyway, it tries and copies the data somehow. ffprobe says that the subs are Stream #0:2[0x102]: Data: bin_data ([6][0][0][0] / 0x0006), mediainfo command correctly recognizes ARIB STD B24/B37.

I checked the subtitle PID of both the input and output files via tsdump (part of tsduck) and the packets are pretty much 90% the same. Only the header seems to differ. I suspect that ffmpeg might have managed to copy the data correctly but the headers that ccextractor is using to choose which decoder to use, are missing.

I tried forcing ccextractor to use isdb codec (i changed the else to be isdb decoder here https://github.com/CCExtractor/ccextractor/blob/master/src/lib_ccx/general_loop.c#L727) but still no luck extracting the subtitles - my C knowledge is rather bad

I would highly appreciate if anyone could take a look at the output.ts file and tried to extract the subs. Perhaps the data are not there but I think that they might and it could be quite easy to persuade ccextractor to extract them.

Thanks
Jakub

Originally created by @jakubvojacek on GitHub (Jul 20, 2021). CCExtractor version: 0.90 # In raising this issue, I confirm the following: - [x] I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md). - [x] I have checked that the bug-fix I am reporting can be replicated, or that the feature I am suggesting isn't already present. - [x] I have checked that the issue I'm posting isn't already reported. - [x] I have checked that the issue I'm porting isn't already solved and no duplicates exist in [closed issues](https://github.com/CCExtractor/ccextractor/issues?q=is%3Aissue+is%3Aclosed) and in [opened issues](https://github.com/CCExtractor/ccextractor/issues) - [x] I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion. - [x] I have used the latest available version of CCExtractor to verify this issue exists. - [x] I have ticked all the boxes in this section and to prove it I'm deleting the section completely to remove boilerplate text. # Necessary information - Is this a regression (i.e. did it work before)? Most likely not - What platform did you use? Linux - What were the used arguments? `ccextractor output.ts -datapid 0x102` # Video links * original file - https://edge1.motv.eu/aribs/nsc.ts * ffmpeg copying - `ffmpeg -y -i nsc.ts -map 0:0 -vcodec copy -map 0:1 -acodec copy -map 0:3 -scodec copy -copy_unknown -f mpegts output.ts` * copied file - https://edge1.motv.eu/aribs/output.ts * `ccextractor output.ts -datapid 0x102` found no subs * i tried playing around with `-datastreamtype` and `-streamtype` but no luck I am trying to extract arib captions from stream that is transcoded via ffmpeg (abr, resize, ...) and I need to copy the subs as well so that the timestamp of the video would be same as of subtitles. To simplify things, I am testing with simple ffmpeg copy, command above. I know that ffmpeg does not support copying arib (isdbt) subtitles yet, it can only decode, not encode. But anyway, it tries and copies the data somehow. `ffprobe` says that the subs are `Stream #0:2[0x102]: Data: bin_data ([6][0][0][0] / 0x0006)`, `mediainfo` command correctly recognizes `ARIB STD B24/B37`. I checked the subtitle PID of both the input and output files via `tsdump` (part of `tsduck`) and the packets are pretty much 90% the same. Only the header seems to differ. I suspect that ffmpeg might have managed to copy the data correctly but the headers that ccextractor is using to choose which decoder to use, are missing. I tried forcing ccextractor to use isdb codec (i changed the else to be isdb decoder here https://github.com/CCExtractor/ccextractor/blob/master/src/lib_ccx/general_loop.c#L727) but still no luck extracting the subtitles - my C knowledge is rather bad I would highly appreciate if anyone could take a look at the output.ts file and tried to extract the subs. Perhaps the data are not there but I think that they might and it could be quite easy to persuade ccextractor to extract them. Thanks Jakub
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#648