Saravanan666/pypi-org huggingface dataset:
Package: vid-cleaner
Vid CleanerTools to transcode, inspect and convert videos. This package provides convenience wrappers aroundffmpegandffprobeto make it easier to work with video files. The functionality is highly customized to my personal workflows and needs. I am sharing it in case it is useful to others.FeaturesRemove commentary tracks and subtitlesRemove unwanted audio and subtitle tracksConvert to H.265 or VP9Convert 4k to 1080pDownmix from surround to create missing stereo streams with custom filters to improve qualityRemoves unwanted audio and subtitle tracks, optionally keeping the original language audio trackCreate clips from a video fileInstallBefore installing vid-cleaner, the following dependencies must be installed:ffmpegffprobepython 3.11+To install vid-cleaner, run:pipinstallvid-cleanerUsageRunvidcleaner --helpto see the available commands and options.ContributingSetup: Once per projectInstall Python 3.11 andPoetryClone this repository.git clone https://github.com/natelandau/vid-cleanerInstall the Poetry environment withpoetry install.Activate your Poetry environment withpoetry shell.Install the pre-commit hooks withpre-commit install --install-hooks.DevelopingThis project follows theConventional Commitsstandard to automateSemantic VersioningandKeep A ChangelogwithCommitizen.When you're ready to commit changes runcz cRunpoefrom within the development environment to print a list ofPoe the Poettasks available to run on this project. Common commands:poe lintruns all linterspoe testruns all tests with PytestRunpoetry add {package}from within the development environment to install a run time dependency and add it topyproject.tomlandpoetry.lock.Runpoetry remove {package}from within the development environment to uninstall a run time dependency and remove it frompyproject.tomlandpoetry.lock.Runpoetry updatefrom within the development environment to upgrade all dependencies to the latest versions allowed bypyproject.toml.
Package: vidclip
vidclipTrim and merge videos using TOML.Installation$ pip install vidclipRequiresFFmpeg.ExamplesRendering a TOML Project Fileproject.toml:# Video project file for vidclip (https://github.com/makes/vidclip)# usage: vidclip render <filename>[output]path="./out.mp4"x=1920y=1080fps=29.97video_codec="libx264"crf=23# Constant Rate Factor. Lower CRF -> higher quality (x264: 0-51, default 23)audio_codec="aac"audio_bitrate="256k"[[clip]]file="vid1.mp4"# 30 fpsinterval=["00:20.222","00:28.458"]# 606 - 853[[clip]]file="vid2.mp4"interval=["0","00:15.560"][[clip]]file="vid1.mp4"# 30 fpsinterval=["36.492","41.829"]# 1094 - 1254[[clip]]file="vid3.mov"interval=[0,10]Render command:$ vidclip render project.toml output.mp4Extracting a Clip$ vidclip extract input.mp4 00:20.222 00:28.458 output.mp4
Package: vidcrawler
vidcrawlerCrawls major videos sites like YouTube/Rumble/Bitchute/Brighteon for video content and outputs a json feed of all the videos that were found.Platform Unit TestsScraper TestsNote that bitchute doesn't like the github runner's IP and will fail with a 403 forbidden.APICommand linevidcrawler --input_crawl_json "fetch_list.json" --output_json "out_list.json"Pythonimportjsonfromvidcrawlerimportcrawl_video_sitescrawl_list=[["Computing Forever",# Can be whatever you want."bitchute",# Must be "youtube", "rumble", "bitchute" (and others)."hybm74uihjkf"# The channel id on the service.]]output=crawl_video_sites(crawl_list)print(json.dumps(output))"source" and "channel_id" are used to generate the video-platform-specific urls to fetch data. The "channel name"
is echo'd back in the generated json feeds, but doesn't not affect the fetching process in any way.TestingInstall vidcrawler and then the commandvidcralwer_testwill become available.>pipinstallvidcrawler
>vidcrawler_testyoutube-pull-channelThis new command will a channel and all of it's files as mp3s. Great for transcribing and putting into an LLM.Example inputfetch_list.json[["Health Ranger Report","brighteon","hrreport"],["Sydney Watson","youtube","UCSFy-1JrpZf0tFlRZfo-Rvw"],["Computing Forever","bitchute","hybm74uihjkf"],["ThePeteSantilliShow","rumble","ThePeteSantilliShow"],["Macroaggressions","odysee","Macroaggressions"]]Example Output:[{"channel_name":"ThePeteSantilliShow","title":"The damage this caused is now being totaled up","date_published":"2022-05-17T05:00:11+00:00","date_lastupdated":"2022-05-17T05:17:18.540084","channel_url":"https://www.youtube.com/channel/UCXIJgqnII2ZOINSWNOGFThA","source":"youtube.com","url":"https://www.youtube.com/watch?v=bwqBudCzDrQ","duration":254,"description":"","img_src":"https://i3.ytimg.com/vi/bwqBudCzDrQ/hqdefault.jpg","iframe_src":"https://youtube.com/embed/bwqBudCzDrQ","views":1429},{"channel_name":"ThePeteSantilliShow","title":"..."}]Releases1.0.21: Misc fixes1.0.16: Make the library downloading more robust.1.0.15: Improve cleaning filepaths for brighteon_bot1.0.13: Newbrighteon-pull-channelcommand1.0.11: Improvesyoutube-pull-channel1.0.10: Addsyoutube-pull-channelwhich pulls all files down as mp3s for a channel.1.0.9: Fixes crawler for rumble and minor fixes + linting fixes.1.0.8: Readme correction.1.0.7: Fixes Odysee scraper by including image/webp thumbnail format.1.0.4: Fixes local_now() to be local timezone aware.1.0.3: Bump1.0.2: Updates testing1.0.1: improves command line1.0.0: Initial release
Package: viddur
viddurCalculating and viewing the durations of videos.InstallationFirst, you need to install "FFprobe". Then, use the package managerpipto install viddur.sudoapt-getinstallffmpeg&&pipinstallviddur;UsagePlease check outviddur --helpfor instructions.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Contact me:OSS@Mahyar24.com:)LicenseGNU GPLv3
Package: videdit
VidEditCommand line interface to edit video files based on ffpmegUsageCrop a videoSay you have a video file (my-record.mkv) that last 3 minutes, composed of 5 segments (A, B, C, D, E) defined as below...A (00:00:00 - 00:00:15)B (00:00:15 - 00:00:30)C (00:00:30 - 00:01:00)D (00:01:00 - 00:02:00)E (00:02:00 - 00:03:00)...and you want to create a new video (new-video.mkv) with only segments A, C and E.You can use thecutcommand like the following :videditcutmy-record.mkv-onew-video.mkv0-1530-1:02:0-3:0Note: As you can see, there is no need to specify the time in full format. But you are free to use this longer format :videditcutmy-record.mkv-onew-video.mkv00:00:00-00:00:1500:00:30-00:01:0000:02:00-00:03:00
Package: video2audio
DescriptionThis library usesffmpegto extract an audio track from a video file.  The audio can also be separated by chapter, if the chapters are annotated in the video.Installation$pip3installvideo2audioTheffmpegandffprobecommands must be available on your system (andPATH).Usagefromvideo2audioimportAVFilef=AVFile('/path/to/some/movie.mkv')# Extract the entire audio track as a single mp3:f.extract_audio('/path/to/some/audio_only.mp3',chapter=None)# Extract the second, entire audio track as a single mp3:f.extract_audio('/path/to/some/audio_only_second_stream.mp3',chapter=None,stream=1)# Extract each chapter to a separate mp3 file:f.extract_all_chapters_audio('/path/to/chapter/outputs/')# Extract each chapter to a separate mp3 file, manually naming them:f.extract_all_chapters_audio('/path/to/chapter/outputs/',output_filenames=['ch1_title.mp3','ch2_title.mp3','ch3_title.mp3'])# Extract only chapter number 12 (or 13, using 1-indexing):chapter_list=f.get_chapters()f.extract_audio('single_chapter.mp3',chapter=chapter_list[12])CLIExtract the second audio track using the command line tool:$video2audio-t1/path/to/some/movie.mkv/path/to/chapter/outputs/video2audio -hwill explain the other options.TODOAdd testsCheck for injection / missing escapes in subprocess
Package: video2chars
Video to CharsConvert video to character art animation.中文说明InstallInstall video2chars:pip install video2charsIf you're using an old version ofpip, maybe you should add--prefer-binaryto make things go right(or upgrade your pip first):pipinstallvideo2chars--prefer-binaryThis tool relies onimageio-ffmpeg, but only the binary version ofimageio-ffmpegcontains theffmpegbinary.
if pip choose the source version, problem will occurs.Usagevideo2chars --width 120 --end 10 path/of/video_fileThe command shows that the specified video will be converted to an ascii art animation with the width of 120, and only convert the first 10 seconds.
you'll see a file namedoutput.mp4in your current directory when completes, have fun ~p.s. it's a bit slow, turn down the width and fps, to speed up the conversion.Checkvideo2chars --helpfor more information.DemonstrationOld versionvideo2chars - v0.3shell version demo：html version demo：ArticleShell Version(in Chinese):视频转字符动画-Python-60行代码Related ProjectsVideo2ASCII.jl(Julia Version): simple implementation in julia.video2ascii-rs(rust version): simple implementation in rust.Stargazers over time
Package: video2numpy
video2numpyOptimized library for large-scale extraction of frames and audio from video.Installpip install video2numpyOr build from source:python setup.py installUsageNAME
    video2numpy - Read frames from videos and save as numpy arrays

SYNOPSIS
    video2numpy SRC <flags>

DESCRIPTION
    Input:
    src:
        str: path to mp4 file
        str: youtube link
        str: path to txt file with multiple mp4's or youtube links
        list: list with multiple mp4's or youtube links
    dest:
        str: directory where to save frames to
        None: dest = src + .npy
    take_every_nth:
        int: only take every nth frame
    resize_size:
        int: new pixel height and width of resized frame
    workers:
        int: number of workers used to read videos
    memory_size:
        int: number of GB of shared memory used for reading, use larger shared memory for more videos

POSITIONAL ARGUMENTS
    SRC

FLAGS
    --dest=DEST
        Default: ''
    --take_every_nth=TAKE_EVERY_NTH
        Default: 1
    --resize_size=RESIZE_SIZE
        Default: 224
    --workers=WORKERS
        Default: 1
    --memory_size=MEMORY_SIZE
        Default: 4

NOTES
    You can also use flags syntax for POSITIONAL ARGUMENTSAPIThis module exposes a single functionvideo2numpywhich takes the same arguments as the command line tool:importglobfromvideo2numpyimportvideo2numpyVIDS=glob.glob("some/path/my_videos/*.mp4")FRAME_DIR="some/path/my_frames"take_every_5=5video2numpy(VIDS,FRAME_DIR,take_every_5)You can also directly use the reader and iterate over videos yourself:importglobfromvideo2numpy.frame_readerimportFrameReaderVIDS=glob.glob("some/path/my_videos/*.mp4")take_every_5=5resize_size=300batch_size=64# output shape will be (n, batch_size, height, width, 3)reader=FrameReader(VIDS,take_every_5,resize_size,batch_size)reader.start_reading()forvid_frames,info_dictinreader:# info_dict["dst_name"] - name for saving numpy array# info_dict["pad_by"] - how many pad frames were added to final block so n_frames % batch_size == 0# do something with vid_frames of shape (n_blocks, 64, 300, 300, 3)...For developmentEither locally, or ingitpod(doexport PIP_USER=falsethere)Setup a virtualenv:python3 -m venv .env
source .env/bin/activate
pip install -e .to run tests:pip install -r requirements-test.txtthenmake lint
make testYou can usemake blackto reformat the codepython -m pytest -x -s -v tests -k "dummy"to run a specific test
Package: video2spectrogram
video2spectrogramAboutThis package is meant to automate the process of extracting audio files from videos and saving the plots computed from these audio frequencies in the Mel scale (Sectrogram). Videos are processed in parallel with the audio extracted byffmpegstored in.wavfiles which are then used to create spectrograms stored as.JPEGand can be used by any audio-based method.Currently supported video formats include.mp4,mpeg-4,.avi,.wmv. If you have a different extension, you can simply change the script to include them (in thevideo2spectrogram/get_spectrogram.py)Package requirementslibrosanumpymatplotlibMake sure that the above packages are installed before running any functions.ffmpeg: You will need to have installedffmpegin order to perform the audio extraction from the video files.Multiprocessing:The code uses multiprocessing for improving speeds, thus the total time required for the conversion varies across different processors. The code has been tested on an AMD Ryzen 3950X with an average conversion time of 4 minutes for ~1K videos (with an average resolution of 480p and length of 5s.)Dataset structureThe package assumes a fixed video dataset structure:<dataset>    
  │
  └──<class 1>
  │     │
  │     │─── <video_1.mp4>
  │     │─── <video_2.mp4>
  │     │─── ...
  │    ...      
  │
  └───<class 2>
  │      │
  │      │─── <video_1.mp4>
  │      │─── <video_2.mp4>
  │      │─── ...
 ...    ...UsageThe main code is at theget_spectrograme.pyfile. To run the convertor simply call theconvertfunction with the base directory of the dataset and the destination directory for where to save the audio.
Additional arguments that can be used:verbose_lvl: Integer for verbosity.save_wav: Boolean to determine if the created wav files are to be stored and not deleted.ar: Integer for the ffmpeg option for specifying the audio sampling frequency.res_h: Integer for the height of the spectrogram image to be saved.res_w: Integer for the width of the spectrogram image to be saved.dpi: Integer for the display's dot's per inch. Needs to be set to avoid inconsistencies to theresargument.fromvideo2spectrogramimportconvert#orfromget_spectrogramimportconvertconvert(my_dataset_dir,my_target_dir)Installation through gitPlease make sure, Git is installed in your machine:$ sudo apt-get update
$ sudo apt-get install git
$ git clone https://github.com/alexandrosstergiou/video2spectrogram.git
$ cd dataset2database
$ pip install .You can then use it as any other package installed through pip.Installation through pipThe latest stable release is also available for download through pip$ pip install video2spectrogram
Package: video2sub
video2subvideo2sub is a command-line tool that transcribes video/audio/url to subtitles. It supports various subtitle formats such as txt, srt, vtt, tsv, and json. The tool uses speech recognition models fromwhisperto perform transcription.RequirementsPython 3.8+ffmpegInstallationInstallffmpeg.(Optional) InstallCUDA&cuDNN. You can either install them system wide or create a conda environment usingenvironment.yml.Installpipx.Install video2sub using pipx:pipxinstallvideo2sub--include-deps(Optional) Copyconfig.vide2sub.example.ymlto~/.config/(win%UserProfile%\.config) then rename it toconfig.video2sub.yml. Edit it to your prefer default value.Usagevideo2sub[video_url][--lang][--model][--proxy][--output][--verbose][--force]ArgumentDescriptionvideo_urlThe URL of the video or path of the video/audio file.--langThe language code of the audio file to be transcribed. Default: "en".--modelThe name/path to the speech recognition model to be used for transcription. Default: "small".--proxyProxy to be used for downloading the video from url.--outputOutput format: txt, vtt, srt, tsv, json. Default: "txt".--verboseShow output.--forceForce to retrieve then transcribe video regardless of existing audio or subtitle file.Note: If the --lang or --model arguments are not specified, the tool will use the default values which can be set by the user in the configuration file~/.config/video2txt.yml.ExamplesTranscribe a video from a URL using default config:video2subhttps://www.youtube.com/watch?v=dQw4w9WgXcQTranscribe a video from a English spoken video file using medium model and save it as a .vtt subtitle:video2submy_video.mp4--langen--modelmedium--outputvttTranscribe an audio file and save it as a .srt subtitle:video2submy_audio.mp3--outputsrt
Package: video2tfrecord
Easily convert RGB video data (e.g. tested with .avi and .mp4) to the TensorFlow tfrecords file format for training e.g. a NN in TensorFlow. Due to common hardware/GPU RAM limitations in Deep Learning, this implementation allows to limit the number of frames per video to be stored in the tfrecords. The code automatically chooses the frame step size s.t. there is an equal separation distribution of the individual video frames.
Package: videoall
VideoAllAll video downloadInstallationpip install videoallHow to importfrom videoall import videoExamplesfrom videoall import video

config = {
    "logfilepath": "video.log",
    "proxies": {},
    "savedir": "download"
}

video_client = video.videoall(config=config)

video_path = 'the video path'

video_client.get_video(video_path)Support ListTed, CNTV, MGTV, Migu, Pipix, AcFun, Zhihu, Xigua, Iqiyi, Douyin, Haokan, Bilibili, Pipigaoxiao,
Yinyuetai, Weibo, BaiduTieba, Ku6, Kuaishou, Sohu
Package: videoanalytics
videoanalyticsPython library for prototyping of video analytic applications. Relies on OpenCV, Keras, and other standard computer vision and machine learning python packages.References:Code for YOLOv4 and DeepSORT was adapted fromyolov4-deepsort.Component referenceComponents are organized as Sources and sinks which are instanced and connected at execution time as pipelines.
Sources consume data from a camera or file and trigger the processing pipeline.
Sinks process data that was made available from other components and generate new.SourcesVideoReaderSinksObject detectionYOLOv4DetectorDetectorCSVVisualizationBounding box annotationMatplotlibOutputsMetadataDetectionsCSVWriterStore object detections as CSV.TrackingCSVWriterStore tracked objects as CSV.DatabaseInfluxDB.ELasticSearchVideoWrite frames to video file.Instructions for developersImport conda environment (GPU):condaenvcreate-fvideoanalytics-gpu.ymlSome examples are provided as jupyter notebooks.condaactivatevideoanalytics-gpu.yml
jupyternotebook.
Package: video-background-estimation
video_background_estimationBackground estimation of videos using simple technques.Input:Output:Usagefrom video_background_estimation.EstimateBackground import BackgroundEstimation
back_est = BackgroundEstimation("videos/british_highway_traffic.mp4", frame_fraction=0.1)
result = back_est.get_background(method="median")Acknowledgement:Thanks to my colleague Dinesh Ladi for all the help with Poetry.References:[1] Road Traffic Video Monitoring.https://www.kaggle.com/datasets/493b50c9f4c536c08262acadfeca70e2e4df0dadacae1655e8669903b2e21623.[2] Simple Background Estimation in Videos Using OpenCV (C++/Python) | LearnOpenCV #. 27 Aug. 2019,https://learnopencv.com/simple-background-estimation-in-videos-using-opencv-c-python/
Package: videoboard
videoboardSimple http server for visualizing videos and images.Videoboard launches a http server which recursively searches directories and shows all videos and images grouped by directory.
It supports videos and images with extensionsmp4,png,jpg,jpeg, andgif.This repo is initiated to check training and testing results for Reinforcement Learning research.Using Python's SimpleHTTPServer requires me to navigate forward and backward.
It is especially annoying when multiple experiments are running.Videoboard makes visualizing videos from multiple directories much easier.UsageRun videoboard:$ videoboardOptions:--logdir: Directory where videoboard will look for videos and images recursively--port: Port number--height: Maximum height of image/video--width: Maximum width of image/video--file_name_length: Maximum length of file name shown in videoboard--recursive: Search files recursively--display: Display videos and imagesCheck the website athttp://127.0.0.1:8000orhttp://[server]:[port].
Whenever click a directory, videos and images inside will be reloaded.InstallationOnly work on Python3Install from pip:pip install videoboard
# or pip3 install videoboardInstall from the latest code:git clone https://github.com/youngwoon/videoboard.git
cd videoboard
pip install -e .LicenseMIT License
Package: video-browser
This application can be used to browse the frames of video files and
apply basic transformations on them.Installationpip install video-browserThe application requires OpenCV and in case you have already installed it,
please make sure you have a compatible version
(see herefor more information).UsageThe application can be started from the command-line by providing the
path to the directory containing the relevant video files:python -m video_browser <video-dir>It contains various control elements at the top, from left to right:Bash-style globbing filter – specify a globbing pattern to filter the
videos in the video-dir, e.g.favorite_*.ts.Drop-down list containing all available video file names (optionally filtered)
– change the selection to load a new video.Three elements for frame selection:<button selects the previous frame,Frame counter spin box indicates the current frame and selects a new one
when changed,>button selects the next frame.Four elements for transforming the current frame; these transformations are
temporary in a sense that if the same frame number is loaded again
(e.g. by pressing<followed by>) then the original frame without
previous transformations is displayed. That is the transformations only
change how a frame is displayed, not how it is stored.Median Filter (3)– apply a median filter with kernel size 3,Median Filter (5)– apply a median filter with kernel size 5,Denoising– apply non-local means denoising,Grayscale– change from color to grayscale; if already in grayscale, do nothing.One button for displaying the current Region Of Interest (the axes boundaries of
the image canvas).In addition to these control elements, the canvas’ toolbar at the top of it can be
used to zoom or otherwise modify the displayed image (this is the standard matplotlib
Qt-style toolbar).CustomizationThe application can be customized via command line arguments, for example changing
the figure size:python -m video_browser <video-dir> --canvas-figsize-inches 8 6A complete overview of all available parameters can be obtained by using--help:python -m video_browser --helpExample ScreenshotThe UI window:
Package: videocdn-tv
VideoCND - APIРеализация Api для сервиса VideoCDN.tvУстановка:pip install videocdn-tvМетодыВзаимодействие:from.videocdnimportVideoCDN,ParamsContent,ParamsEpisode,ParamsSeasonvideocdn=VideoCDN(api_token="KEY")translationsdata=videocdn.get_translations()moviesdata=videocdn.get_movies(ParamsContent(query="Аквамене"))animesdata=videocdn.get_animes(ParamsContent(query="Ван-Пис: Золото"))tv-seriesdata=videocdn.get_tv_series(ParamsContent(query="Игра Пристолов"))tv-series/seasonsdata=videocdn.get_tv_series_seasons(ParamsSeason(tv_series_id=1))tv-series/episodesdata=videocdn.get_tv_series_episodes(ParamsEpisode(tv_series_id=1))anime-tv-seriesdata=videocdn.get_anime_tv_series(ParamsContent(query="Доктор Стоун"))anime-tv-series/seasonsdata=videocdn.get_anime_tv_series_seasons(ParamsSeason(tv_series_id=1))anime-tv-series/episodesdata=videocdn.get_anime_tv_series_episodes(ParamsEpisode(tv_series_id=1))show-tv-seriesdata=videocdn.get_show_tv_series(ParamsContent(query="Зовите шефа"))show-tv-series/seasonsdata=videocdn.get_show_tv_series_season(ParamsSeason(tv_series_id=1))show-tv-series/episodesdata=videocdn.get_show_tv_series_episodes(ParamsEpisode(tv_series_id=1))
Package: videocheck
VideoCheckAutomated tool to check consistency of your video library.InstallationClone this repo andpip install .orpip install videocheckCheck us onPyPI!Usagevideocheck[OPTIONS][PATHS]...Automatedtooltocheckconsistencyofyourvideolibrary.

Options:-o,--outputFILEOutputfilepath(csvfile)-e,--extensionsTEXTVideoextensionstoscan-f,--forbidden-hoursTEXTForbiddenhours(usefulformulti-dayscans),example:18-23toforbidscanningbetween18hand23h-t,--threadsINTEGERCPUthreadsforFFmpeg-d,--deleteDeletecorruptfilesafterscanning--helpShowthismessageandexit.Output Example🏁2filestocheck
✅~/Videos/ok.mp4
❌~/Videos/ko.mp4100%|██████████████████████████|2/2[00:00<00:00,16.99it/s]##############################SCANDONE1/2faultyvideosdetected🚨Reportfileavailable:./videochecked.csv
Tip:Use--deletetodeletethem
OVER✅