Conversation
Replace GPAC with FFmpeg for MP4 demuxing via a Rust implementation using rsmpeg. Supports AVC/H.264, HEVC/H.265, CEA-608, CEA-708, and tx3g subtitle tracks. Includes chapter extraction via ccxr_dumpchapters. VobSub tracks are detected but not yet supported. Selected at compile time via ENABLE_FFMPEG_MP4 / enable_mp4_ffmpeg Cargo feature.
- mp4_rust_bridge.c/.h: C-callable functions for AVC/HEVC/CC processing - ccx_gpac_types.h: compat defines for GF_4CC, GF_ISOM_SUBTYPE_C708, etc. - mp4.c: dispatch to Rust demuxer when ENABLE_FFMPEG_MP4 is set - ccextractor.c: iterate all input files in MP4 mode - Remove dead processmp4_ffmpeg/dumpchapters_ffmpeg declarations
- src/CMakeLists.txt: link swresample, re-add libs after ccx_rust for circular dependencies, --no-as-needed on Linux, ENABLE_HARDSUBX - lib_ccx/CMakeLists.txt: target_compile_definitions for ENABLE_HARDSUBX - rust/CMakeLists.txt: enable_mp4_ffmpeg Cargo feature
set_fts() produces stale fts_now values after empty tx3g gap packets, causing subtitle start times to be incorrect. Override fts_now with the correct DTS-based millisecond timestamp before calling process_tx3g. Fixes CCExtractor#2198
Pass AVPacket.duration through ccx_mp4_process_cc_packet so the last subtitle ends at start+duration instead of video end.
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 578abca...:
Your PR breaks these cases:
NOTE: The following tests have been failing on the master branch as well as the PR:
Congratulations: Merging this PR would fix the following tests:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Check the result page for more info. |
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit 578abca...:
Your PR breaks these cases:
NOTE: The following tests have been failing on the master branch as well as the PR:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Check the result page for more info. |
|
Note: CCExtractor's SRT encoder subtracts 1ms from end times to prevent |
|
@cfsmp3 #2199 fixes tx3g timestamps on the FFmpeg path (depends on #2170) — wrong start times from gap packets and last subtitle ending at video end instead of actual duration. Both fixed, tested against ffmpeg reference. Note: the GPAC path on master has the same bug but worse (overflow to 0xFFFFFFFF) — can fix separately if needed. |

In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
Fixes #2198. Corrects tx3g subtitle timestamps on the FFmpeg demuxer path.