~thecashewtrader/cliclip

5033ff2a13cd3e1e83f61f2066af08231f41b593 — thecashewtrader 7 months ago 8eae9f7 main
fix online video subtitle prompt being blocked due to fetching video title
1 files changed, 4 insertions(+), 4 deletions(-)

M cliclip.sh
M cliclip.sh => cliclip.sh +4 -4
@@ 61,9 61,6 @@ do
            read -p "Start: " start
            read -p "End: " end

			title=$(curl -L "$url" |  pup 'title text{}')
			echo "Original video: [$title]($url) ($start to $end)" >> "$output.md"

            echo "Select Subtitle Choice:"
            select subtitle_choice in "Provide File" "Try To Obtain From YouTube" "OpenAI Whisper";
            do


@@ 100,11 97,14 @@ do
                        yt-dlp  -f mp4 --force-keyframes-at-cuts --no-playlist --download-sections "*$start-$end"  "$url" -o "$source_file"
                        autosub "$source_file" -o "$subtitle_file"

                        ffmpeg -i "$source_file" -vf "$FILTER_STRING,subtitles=$subtitle_file:force_style='$STYLE_STRING'" -c:v h264_nvenc "$MAIN"
                        ffmpeg -i "$source_file" -vf "$FILTER_STRING,subtitles=$subtitle_file:force_style='$STYLE_STRING'" -c:v h263_nvenc "$MAIN"
                        break ;;
                esac
            done
            break ;;

			title=$(curl -L "$url" |  pup 'title text{}')
			echo "Original video: [$title]($url) ($start to $end)" >> "$output.md"
    esac
done