### Build Executable and Link Library Source: https://github.com/szatmary/libcaption/blob/develop/examples/CMakeLists.txt Defines an executable target, links it against the 'caption' library, and installs it to the 'bin' directory. ```cmake set(CMAKE_BUILD_TYPE Debug) add_executable(flv2srt flv2srt.c flv.c) target_link_libraries(flv2srt caption) install(TARGETS flv2srt DESTINATION bin) ``` ```cmake add_executable(ts2srt ts2srt.c ts.c) target_link_libraries(ts2srt caption) install(TARGETS ts2srt DESTINATION bin) ``` ```cmake add_executable(scc2vtt scc2vtt.c) target_link_libraries(scc2vtt caption) install(TARGETS scc2vtt DESTINATION bin) ``` ```cmake add_executable(srt2vtt srt2vtt.c) target_link_libraries(srt2vtt caption) install(TARGETS srt2vtt DESTINATION bin) ``` ```cmake add_executable(scc2srt scc2srt.c) target_link_libraries(scc2srt caption) install(TARGETS scc2srt DESTINATION bin) ``` ```cmake add_executable(flv+srt flv+srt.c flv.c) target_link_libraries(flv+srt caption) install(TARGETS flv+srt DESTINATION bin) ``` ```cmake add_executable(flv+scc flv+scc.c flv.c) target_link_libraries(flv+scc caption) install(TARGETS flv+scc DESTINATION bin) ``` ```cmake add_executable(sccdump sccdump.c flv.c) target_link_libraries(sccdump caption) install(TARGETS sccdump DESTINATION bin) ``` ```cmake add_executable(srtdump srtdump.c) target_link_libraries(srtdump caption) install(TARGETS srtdump DESTINATION bin) ``` ```cmake add_executable(vttdump vttdump.c) target_link_libraries(vttdump caption) install(TARGETS vttdump DESTINATION bin) ``` ```cmake add_executable(rollup rollup.c flv.c) target_link_libraries(rollup caption) install(TARGETS rollup DESTINATION bin) ``` ```cmake add_executable(party party.c flv.c) target_link_libraries(party caption) install(TARGETS party DESTINATION bin) ``` ```cmake add_executable(vttsegmenter vttsegmenter.c) target_link_libraries(vttsegmenter caption) install(TARGETS vttsegmenter DESTINATION bin) ``` -------------------------------- ### Add Captions to FLV File Source: https://github.com/szatmary/libcaption/blob/develop/examples/README.md This example shows how to add SRT captions to an FLV file using the `flv+srt` tool. The output is written to a new FLV file. ```bash flv+srt in.flv in.srt out.flv ``` -------------------------------- ### Caption Non-FLV File using FFmpeg and FLV+SRT Source: https://github.com/szatmary/libcaption/blob/develop/examples/README.md This advanced example shows how to caption a non-FLV file by first remuxing it to FLV using ffmpeg, then adding captions with `flv+srt`, and finally remuxing it back to MP4. ```bash ffmpeg -i in.mp4 -codec copy -f flv - | flv+srt - in.srt - | ffmpeg -i - -codec copy out.mp4 ``` -------------------------------- ### Add Captions to FLV File via Stdout Source: https://github.com/szatmary/libcaption/blob/develop/examples/README.md This example demonstrates adding SRT captions to an FLV file, writing the output to standard output, which can then be redirected to a file. ```bash flv+srt in.flv in.srt - >out.flv ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.