From 4bd294e26bc23f6d717e3817c0e300c0122a06c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tronel?= Date: Thu, 30 Nov 2023 16:14:20 +0100 Subject: [PATCH] A better README. --- README.md | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6b790a3..5be567a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,26 @@ -# removeads +# Goal of the script -Remove ads from TV recordings with optimal cuts. \ No newline at end of file +Remove ads from TV recordings with optimal cuts with single video frame precision. + +When I record a movie on TV, I sometimes wish to archive the movie on my NAS. +In that case, I want to remove (at least) the beginning and the end of the recording +if the movie was broadcast on a advertisment free channel, or even worse I may +have to split it in numerous parts so as to remove the advertisments. +And I do not want to reencode the entire movie since it's a really slow process (on my NAS) +and the movie is already broadcast using H264 (DVB-T). + +Doing this by hand is really painful, because most tools like ffmpeg, or mkvmerge are only +able to cut a movie (without reencoding) at a boundary within the video stream that corresponds +to a reference frame (so called I-frames). These frames are only present roughly every 10-20 frames +which corresponds to quite long duration (in the order of a second). + +I really want to cut the movie with a better precision. So I have written a Python script +that leverages _ffmpeg_, _ffprobe_ and _mkvmerge_ to do the job with the required precision. + +# Parameters + +# How does it work ? + +# How to determine where to cuts + +Use `mpv --osd-fractions --osd-level=3 ./movie.ts`