Essential-Google-Colab-Notebook
Essential-Google-Colab-Notebook copied to clipboard
All essential cells in one Google Colab Notebook!
Essential-Google-Colab-Notebook
All Essential Cells in one Google Colab Notebook!. You can handle your Google Drive files more convenient than before.
- Click on the "Open in Colab" button to open this notebook in google colab
Mount Google Drive
- You can mount and unmount your Google Drive to the runtime.
Manage Files & Folders
- You can manage your folders and files with below cells.
Copy Files & Folders
-
sourcePath
: add source file's or folder's path. - You can add more source paths and seperate each by a comma and a space.
eg:
sourcePath: [file01], [file02], [folder01], [folder02], [file03], [file04]
-
onlyContent
: use this when coping the content of a folder.
- when adding
/content/testFolder
will copy the content intestFolder
folder, not the entiretestFolder
.- If you have added more folder paths, this will copy only the content in all those folders.
-
Update
: copy only when the source file is newer than the destination file or when the destination file is missing.
Move Files & Folders
-
sourcePath
: add source file's or folder's path. - You can add more source paths and seperate each by a comma and a space.
eg:
sourcePath: [file01], [file02], [folder01], [folder02], [file03], [file04]
-
onlyContent
: use this when moving the content of a folder.
- when adding
/content/testFolder
will move the content intestFolder
folder, not the entiretestFolder
.- If you have added more folder paths, this will copy only the content in all those folders.
-
Update
: move only when the source file is newer than the destination file or when the destination file is missing.
Delete Files & Folders
-
sourcePath
: add source file's or folder's path. - You can add more source paths and seperate each by a comma and a space.
eg:
sourcePath: [file01], [file02], [folder01], [folder02], [file03], [file04]
-
onlyContent
: use this when deleting the content of a folder.
- when adding
/content/testFolder
will delete the content intestFolder
folder, not the entiretestFolder
.- If you have added more folder paths, this will remove only the content in all those folders.
View Folder Size
- This will show the size of folders and sub folders only. to view all files select
viewContent
. -
modificationTime
: Use this to view time information of files. - If
Summary
is selected, only shows the total size of the folder, So uncheck it to useviewContent
option.
7-Zip
- 7zip archiving program in colab.
Compress Files and Folders
- Create zip, tar, 7z, gz, bz2, xz, wim files.
- If you want you can add password or split the archive.
- If you want to save archive in another location uncheck
saveToSourceLocation
.
Uncompress Files
- To list content of the file, use
viewFile
. Uncheck this after viewing the content. - Can also extract splited archives.
-
saveToSourceLocation
: Extracts files to source location. - If you want to extract files from archive without using directory names, uncheck
directoryNames
.
- NOTE : Don't uncheck
directoryNames
at normal use.
![]()
- Without
directoryNames
, extracts files as 2nd figure.
Transfer files to Google Drive
- Import files to colab
Transfer files between two Google drives
- Mount Google Drives and copy files.
Transfer files from direct links
wget
- Transfer files from direct links to google drive.
- Enter the folder path where you want to save the file.
- Run cell to add direct link.
JDownloader
- Run cell to install JDownloader to get WEB-UI.
Transfer files from MEGA
- Run cell to start transfer.
- If you have a Mega Pro account, select
megaProAccount
to sign in to use its bandwidth (transfer quota) - You can also add a public link without a Pro account, but it has transfer limits.
- If
savePath
is not provided, files will be transfered to/content/MEGAdownloads
. - Sometimes this cell doesn't stop itself after the completion of the transfer. In case of that stop the cell manually.
Transfer files from Torrents
libtorrent
- Run cell to install libtorrent to the runtime.
-
savePath
: add folder path where you want to download. -
torrentFile
: use a torrent file to download. -
magnetLink
: use a magnet link to download.
qBittorrent
- Run cell to install qBittorrent to get WEB-UI.
youtube-dl
-
videoLink
: YouTube and other supported website URLs are working. -
outputFolder
: Set the download directory. -
Preset
: All presets are working for YouTube URLs, but if you entering an another website's URL setPreset: Choose Codecs
.
You can add formatCodes as
{video_code}+{audio_code}
to get a full output.
-
mergeFile
: Merge final output to an another container format. -
viewFormats
: You can view all available formats to download. - Please uncheck
viewFormats
while downloading.
Mediainfo
- Run cell to get mediainfo.
FFmpeg
- Run cell to Install FFmpeg.
Remux Video Files
- REMUX video files without RE-ENCODING.
- Make sure that
outputFormat
that you have selected is supported for all tracks in theinputFile
. -
WebM
only supportVP9
,VP8
,AV1
video andVorbis
,Opus
audio andWebVTT
subtitles.
Trim Video Files
- TRIM video files without RE-ENCODING.
-
inputFile
: video file's path and setstartTime
andendTime
to trim. - Trimed video will be saved as same as the source's format.
Extract Audio
- EXTRACT audio tracks from video files.
-
DTS
,DTS-HD
,DTS-MA
,TrueHD
tracks will be muxed as a.mka
file.
Remove Bitstream Metadata
- For
H.264
/AVC
tracks run first cell. - For
H.265
/HEVC
tracks run second cell.
Encode H.264
-
CRF
and2-Pass
encoding available. - This cell only encodes the first video track from the input file.
HDR to SDR
- Convert
HDR
video toSDR
video. -
toneMap
: Select tone mapping method.
HDR10 Encoding
- Only
x265
/HEVC
tracks are supported. -
extractColors
: View the color information of the footage. - When encoding, make sure
extractColors
is deselected.
H.264 Encoder
- This encodes video track only.
- Use ffmpeg or any other to merge video with audios.
- Run cell to install x264.
- Set
inputFile
andoutputFolder
. - This cell is taking the output name as same as the input filename. So, you need to set the output folder only.
- Change settings as you want.
MP4Box
- Run cell to install MP4Box.
Create MP4/M4A Files
- Enter tracks while running the cell.
- Tracks must be in raw format.
(eg: .h264, .hevc, .aac, .eac3,....)
- If you don't want to add track title and track language leave them blank.
Tag MP4 / M4A Files
- Enter MP4 or M4A file path in
inputFile
. -
updateFile
: Update the exsisting file with tags. - Recommended to use Mutagen MP4/M4A tagger for advanced use.
MKVToolNix
- Run cell to install MKVToolNix.
- You can use any version, to do that enter the version correctly in
Version
.
mkvmerge
- You can input tracks while running the cell.
- Don't use
#
and"
inmkvTitle
. - Add XML file path for
globalTags
,segmentInfo
. - Choose a
splitMode
and addsplitArgument
according to thesplitMode
. - Chapter are accpeted both
XML
andOGM_txt
files. - When adding a language use laguage codes.
- If you don't want to fill a field, leave it blank.
- If you don't know what is the relevant
mime-type
, also leave it blank inattachmentmimeType
. - When adding track
default
,forced
flags, If you leave it blank, it's value will be 'No'. - For all inputs 'y' for 'yes' and 'n' for 'no'.
-
webmCompliantFile
: Create a WebM compliant file instead of mkv. - Add tracks while running the cell and after adding all tracks you want, type 'done' in
inputFile
to continue.
mkvextract
- You can extract all tracks, attachments, chapters, tags, cues, cue sheet, timecodes from below cell.
- Also you can extract a single track by selecting
extractMode: Single Track
option.
mkvpropedit
- You can edit segment info, track info, chapters, attachments, tags in a mkv file.
- If you want to delete statistic tags from tracks select
deleteTrackStatisticsTags
Matroska/WebM Tags
- Enter mkv file's path in
mkvFile
. - If you want to delete
Title
type "delete" inTitle
. - If you want to add multiple values, separate tags by a comma and a space.
Eg: Artist: Artist1, Artist2, Artist3
- You can add tags using a text document. Text document's content must be as formatted as below.
Tag name 1: Tag value 1, Tag value 2, Tag value 3
Tag name 2: Tag value 1, Tag value 2, Tag value 3
- Explainations are available while running the cell.
Mutagen
- Mutagen is a python based multimedia tagging library.
- Run cell to install Mutagen.
FLAC
- Enter FLAC file path in
inputFLAC
. - If you want to add multiple values, separate tags by a comma and a space.
Eg: Artist: Artist1, Artist2, Artist3
- You can add more custom tags using a text file. Text file's content must be as formatted as below.
Tag name 1: Tag value 1, Tag value 2, Tag value 3
Tag name 2: Tag value 1, Tag value 2, Tag value 3
- Explainations are available while running the cell.
MP4 / M4A
- Enter MP4/M4A file path in
inputMP4
. - If you want to add multiple values, separate tags by a comma and a space.
Eg: Artist: Artist1, Artist2, Artist3
- You can add more custom tags using a text file. Text file's content must be as formatted as below.
Tag name 1: Tag value 1, Tag value 2, Tag value 3
Tag name 2: Tag value 1, Tag value 2, Tag value 3
- Explainations are available while running the cell.