![]() "on their own lines in the format timecode name " Input("Fix the description file to have the chapters " # Download the file as mp4 (in order to use MP4) Result = n(["youtube-dl", "-get-filename",ĭef get_best_mp4_single_file(download_source:str, description_file:str, # Get the expected filename in order to process everything down the line Import subprocess, os, argparse, datetime, re, sysĭef get_source_name(download_source:str)->str: youtubedl and ffmpeg should be in your system path or else change the code below to include the full path to the executables. If you don't want to keep the original MP4, or if you don't care about it having the chapters, you can comment out that section. Requirements: youtubedl, ffmpeg and MP4Box (GPAC). The chapter record will be added to the original downloaded MP4. You can pass multiple download links and it will loop through the list. Usage - if you save this into a file called "yt_chapters.py" then run I have written a Python script which will download the whole file, process the description file and then split the downloaded file into it's component chapters.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |