This guide will walk you through setting up and initializing the Go project to utilize the functionalities provided in the main.go
file.
Before you begin, ensure you have the following installed on your system:
- Go Programming Language: Install Go
- YouTube-DL: Install YouTube-DL
- FFmpeg: Install FFmpeg
-
Clone the repository or create a new directory for your project.
git clone <repository-url>
-
Navigate to the project directory.
cd <project-directory>
-
Create a new Go module (if not already initialized).
go mod init <module-name>
-
Open the
main.go
file in your preferred text editor. -
Make sure to update the values of
inputFilePath
,outputFilePath
, andoutputAudio
variables if needed. It takes input in both HH:MM:SS format or simple SS only -
Run the project using the following command:
go run main.go
-
Follow the on-screen prompts to interact with the program:
- Select the desired operation (Video Download Full, Download Audio, Trimmed Video, or Audio Trim).
- Provide the necessary input such as URL, start time, and end time as prompted.
- This project uses external commands such as
yt-dlp
andffmpeg
, make sure they are properly installed and accessible in your system's PATH. - Ensure that you have appropriate permissions to read, write, and execute files in the specified directories.
- Modify the code as per your requirements and extend its functionalities as needed.