Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,6 @@ plans/
tess.log
**/tess.log
ut=srt*
*.bak
mac/libccx_rust.a
tests/samples.zip
1 change: 1 addition & 0 deletions docs/CHANGES.TXT
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
0.96.7 (unreleased)
-------------------
- Feature: Added FFmpeg-based MP4 demuxing as alternative to GPAC (enabled with -DWITH_FFMPEG=ON).
- Fix: Prevent crash in Rust timing module when logging out-of-range PTS/FTS timestamps from malformed streams.

0.96.6 (2026-02-19)
Expand Down
7 changes: 7 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,20 +175,24 @@ if (PKG_CONFIG_FOUND AND WITH_FFMPEG)
pkg_check_modules (AVCODEC REQUIRED libavcodec)
pkg_check_modules (AVFILTER REQUIRED libavfilter)
pkg_check_modules (SWSCALE REQUIRED libswscale)
pkg_check_modules (SWRESAMPLE REQUIRED libswresample)

set (EXTRA_LIBS ${EXTRA_LIBS} ${AVFORMAT_LIBRARIES})
set (EXTRA_LIBS ${EXTRA_LIBS} ${AVUTIL_LIBRARIES})
set (EXTRA_LIBS ${EXTRA_LIBS} ${AVCODEC_LIBRARIES})
set (EXTRA_LIBS ${EXTRA_LIBS} ${AVFILTER_LIBRARIES})
set (EXTRA_LIBS ${EXTRA_LIBS} ${SWSCALE_LIBRARIES})
set (EXTRA_LIBS ${EXTRA_LIBS} ${SWRESAMPLE_LIBRARIES})

set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${AVFORMAT_INCLUDE_DIRS})
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${AVUTIL_INCLUDE_DIRS})
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${AVCODEC_INCLUDE_DIRS})
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${AVFILTER_INCLUDE_DIRS})
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${SWSCALE_INCLUDE_DIRS})
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${SWRESAMPLE_INCLUDE_DIRS})

set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_FFMPEG")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_FFMPEG_MP4")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_HARDSUBX")
endif (PKG_CONFIG_FOUND AND WITH_FFMPEG)

Expand Down Expand Up @@ -219,18 +223,21 @@ if (PKG_CONFIG_FOUND AND WITH_HARDSUBX)
pkg_check_modules (AVCODEC REQUIRED libavcodec)
pkg_check_modules (AVFILTER REQUIRED libavfilter)
pkg_check_modules (SWSCALE REQUIRED libswscale)
pkg_check_modules (SWRESAMPLE REQUIRED libswresample)

set (EXTRA_LIBS ${EXTRA_LIBS} ${AVFORMAT_LIBRARIES})
set (EXTRA_LIBS ${EXTRA_LIBS} ${AVUTIL_LIBRARIES})
set (EXTRA_LIBS ${EXTRA_LIBS} ${AVCODEC_LIBRARIES})
set (EXTRA_LIBS ${EXTRA_LIBS} ${AVFILTER_LIBRARIES})
set (EXTRA_LIBS ${EXTRA_LIBS} ${SWSCALE_LIBRARIES})
set (EXTRA_LIBS ${EXTRA_LIBS} ${SWRESAMPLE_LIBRARIES})

set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${AVFORMAT_INCLUDE_DIRS})
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${AVUTIL_INCLUDE_DIRS})
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${AVCODEC_INCLUDE_DIRS})
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${AVFILTER_INCLUDE_DIRS})
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${SWSCALE_INCLUDE_DIRS})
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${SWRESAMPLE_INCLUDE_DIRS})

set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_HARDSUBX")
pkg_check_modules (TESSERACT REQUIRED tesseract)
Expand Down
4 changes: 2 additions & 2 deletions src/ccextractor.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ int start_ccx()
ret = tmp;
break;
case CCX_SM_MP4:
mprint("\rAnalyzing data with GPAC (MP4 library)\n");
close_input_file(ctx); // No need to have it open. GPAC will do it for us
mprint("\rAnalyzing data in MP4 mode\n");
close_input_file(ctx); // No need to have it open. The MP4 library will reopen it
if (ctx->current_file == -1) // We don't have a file to open, must be stdin, and GPAC is incompatible with stdin
{
fatal(EXIT_INCOMPATIBLE_PARAMETERS, "MP4 requires an actual file, it's not possible to read from a stream, including stdin.\n");
Expand Down
1 change: 1 addition & 0 deletions src/lib_ccx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ if (WITH_FFMPEG)
set (EXTRA_INCLUDES ${EXTRA_INCLUDES} ${SWSCALE_INCLUDE_DIRS})

set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_FFMPEG")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_FFMPEG_MP4")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_HARDSUBX")
endif (WITH_FFMPEG)

Expand Down
6 changes: 6 additions & 0 deletions src/lib_ccx/ccx_mp4.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@

int processmp4(struct lib_ccx_ctx *ctx, struct ccx_s_mp4Cfg *cfg, char *file);
int dumpchapters(struct lib_ccx_ctx *ctx, struct ccx_s_mp4Cfg *cfg, char *file);

#ifdef ENABLE_FFMPEG_MP4
int processmp4_ffmpeg(struct lib_ccx_ctx *ctx, struct ccx_s_mp4Cfg *cfg, char *file);
int dumpchapters_ffmpeg(struct lib_ccx_ctx *ctx, struct ccx_s_mp4Cfg *cfg, char *file);
#endif

#endif
Loading
Loading