You-get && FFmpeg

2023-05-16

  • 一、引言
  • 二、 you-get 介绍
    • 2.1 you-get 安装
    • 2.2 you-get语法及参数
    • 2.3 you-get运用实例
  • 三、FFmpeg介绍
    • 3.1 FFmpeg安装
    • 3.2 you-get与FFmpeg的结合使用
  • 四、 HEVC 扩展

一、引言

  Sometimes we need to download the video on the web page to share or recreate, or you know. When the relevant website does not provide video download or does not provide the service of saving the video to the local, what should we do?

  1. On the mobile phone, screen recording can be used, but the files obtained from the screen recording are generally larger. IPhone can write a shortcut for one-click download, as shown in the figure below, this article will not discuss the implementation method.

  2. There are many ways to implement it on the PC side. Common ones include screen recording, Chrome browser installation of corresponding plug-ins, Edge browser installation of plug-ins, Python crawlers, and so on.

    This article shares the use of the command line program you-get to download videos from web pages.

二、 you-get 介绍

  You get is an open source library of Python on GitHub(link),the latest version is 0.4.1555。

The official introduction is:

You-Get is a small command-line utility for downloading media (video, audio and images) from the Web when there are no other means to do so. It can download video and audio files from such popular web sites as YouTube, Twitter, Niconico, Vimeo, Flickr, Instagram and a whole lot more.

You-Get is a great option for when you want to enjoy your favorite videos, audio or images from the internet without having to open any web browsers or get interrupted by ads. It’s also a good choice for when you want to get rid of any closed-source technology or proprietary JavaScript code from running on your computer.

2.1 you-get 安装

  You need to install python3 and pip before installing you get,You must have installed them. I won’t repeat it here.

  There are many ways to install you-get, and we choose the most convenient PIP installation method. Open the CMD (PowerShell) window and enter the following code to install you-get

pip install you-get

Or download it on this website:https://sourceforge.net/projects/you-get.mirror/

在这里插入图片描述

  After installation, view the version information on the command line:

PS C:\Users\dahu> you-get --v
you-get: version 0.4.1520, a tiny downloader that scrapes the web.

2.2 you-get语法及参数

  After you-get is installed, it can be used directly on the command line. A simple command line can realize video download, or it can be used in Python script to complete more complex work.

  Generally, many languages can use the ‘help’ parameter to view the help and description of related function packages or functions. The optional parameters of you get are as follows:

  (Readers can read Section 2.3 first and try the following parameters slowly after simple application.)

C:\Users\dahu>you-get --help
usage: you-get [OPTION]... URL...

A tiny downloader that scrapes the web

optional arguments:
  -V, --version         Print version and exit
  -h, --help            Print this help message and exit

Dry-run options:
  (no actual downloading)

  -i, --info            Print extracted information
  -u, --url             Print extracted information with URLs
  --json                Print extracted URLs in JSON format

Download options:
  -n, --no-merge        Do not merge video parts
  --no-caption          Do not download captions (subtitles, lyrics, danmaku,
                        ...)
  -f, --force           Force overwriting existing files
  --skip-existing-file-size-check
                        Skip existing file without checking file size
  -F STREAM_ID, --format STREAM_ID
                        Set video format to STREAM_ID
  -O FILE, --output-filename FILE
                        Set output filename
  -o DIR, --output-dir DIR
                        Set output directory
  -p PLAYER, --player PLAYER
                        Stream extracted URL to a PLAYER
  -c COOKIES_FILE, --cookies COOKIES_FILE
                        Load cookies.txt or cookies.sqlite
  -t SECONDS, --timeout SECONDS
                        Set socket timeout
  -d, --debug           Show traceback and other debug info
  -I FILE, --input-file FILE
                        Read non-playlist URLs from FILE
  -P PASSWORD, --password PASSWORD
                        Set video visit password to PASSWORD
  -l, --playlist        Prefer to download a playlist
  -a, --auto-rename     Auto rename same name different files
  -k, --insecure        ignore ssl errors

Playlist optional options:
  --first FIRST         the first number
  --last LAST           the last number
  --size PAGE_SIZE, --page-size PAGE_SIZE
                        the page size number

Proxy options:
  -x HOST:PORT, --http-proxy HOST:PORT
                        Use an HTTP proxy for downloading
  -y HOST:PORT, --extractor-proxy HOST:PORT
                        Use an HTTP proxy for extracting only
  --no-proxy            Never use a proxy
  -s HOST:PORT or USERNAME:PASSWORD@HOST:PORT, --socks-proxy HOST:PORT or USERNAME:PASSWORD@HOST:PORT
                        Use an SOCKS5 proxy for downloading

The above help documents are actually very comprehensive. It’s not difficult for you to understand as long as you know a little English.

Probably translate it:

语法:you-get 选项及参数 网页视频URL

可选参数:
-V, --version 打印版本并退出
-h, --help 打印此帮助信息并退出

试运行选项:(没有实际下载)
-i, --info 打印提取的信息(通常用此参数获取目标视频可供下载的清晰度)
-u, --url 打印带有 URL 的提取信息
–json 以 JSON 格式打印提取的 URL

下载选项:
-n, --no-merge 不合并视频部分
–no-caption 不下载字幕(字幕、歌词、弹幕、…)
-f, --force 强制覆盖现有文件
–skip-existing-file-size-check跳过现有文件而不检查文件大小
-F STREAM_ID, --format STREAM_ID将视频格式设置为 STREAM_ID
-O 文件,–输出文件名文件 设置输出文件名
-o 目录,–输出目录目录设置输出目录
-p 播放器,–player 播放器将提取的 URL 流式传输到 PLAYER
-c COOKIES_FILE,–cookies COOKIES_FILE加载 cookies.txt 或 cookies.sqlite
-t 秒,–超时秒设置套接字超时
-d, --debug 显示回溯和其他调试信息
-I 文件,–输入文件文件从 FILE 中读取非播放列表 URL
-P 密码, --password 密码将视频访问密码设置为 PASSWORD
-l, --playlist 喜欢下载播放列表
-a, --auto-rename 自动重命名同名的不同文件
-k, --insecure 忽略 ssl 错误

播放列表可选选项:(播放列表:比如要下载B站的视频合集)
–first FIRST 第一个数字
–last LAST 最后一个数字
–size PAGE_SIZE, --page-size PAGE_SIZE页面大小编号

代理选项:
-x 主机:端口,–http-proxy 主机:端口 使用 HTTP 代理进行下载
-y 主机:端口,–extractor-proxy 主机:端口 仅使用 HTTP 代理进行提取
–no-proxy 从不使用代理
-s HOST:PORT 或 USERNAME:PASSWORD@HOST:PORT, --socks-proxy HOST:PORT 或 USERNAME:PASSWORD@HOST:PORT 使用 SOCKS5 代理下载

2.3 you-get运用实例

  1. Check this video Clarity available for save,The value of format field is the parameter of downloading videos with different definition.
    在这里插入图片描述

  2. Saving this video,Select MP4 format 1080p definition and save it in the local disk directory ‘F: \ say love you’.
    在这里插入图片描述
    Go to the corresponding location of the computer to view: (where XML is the bullet screen file of the video, and those interested can further merge the bullet screen with the video)
    在这里插入图片描述
    Tips:There are generally two video formats: MP4 and flv. If saved in MP4 format, a web video will correspond to three local files after downloading: barrage XML, video MP4, audio MP4, namely audio and video separation, needs to be further synthesized by itself; This is not the case with FLV format (you can watch it directly with iqiyi). However, MP4 is a commonly used format, so you need to install ‘ffmpeg’ on your PC for automatic synthesis. The appeal example is my download effect after installing ffmpeg, which automatically combines audio and video, which is very convenient.
    在这里插入图片描述

三、FFmpeg介绍

FFmpeg:A set of open source computer programs that can be used to record, convert digital audio and video, and convert them into streams.

3.1 FFmpeg安装

(1)Go to ffmpeg official website https://ffmpeg.org/download.html Download the installation package. Or download directly from my GitHub or gitee. (it may be faster to use gitee)

github地址:click here

gitee地址:click here

在这里插入图片描述
(2)After downloading, unzip the file and enter the bin directory. You can see ffmpeg.exe、ffplay.exe、ffprobe.exe three files. OK, go to the next step.

在这里插入图片描述
(3)Set the environment variable, click “system properties - > Advanced - > environment variable - > user variable”, select the entry “path”, click “Edit - > new”, copy and paste the bin folder path in the first step, and then click OK.

在这里插入图片描述
(4)We open the CMD command line window and enter the command “ffmpeg – version”. The window returns the version information of ffmpeg, indicating that the installation is successful.

Next, don’t worry. After downloading with you get, it will automatically merge audio and video.

在这里插入图片描述

3.2 you-get与FFmpeg的结合使用

For example, download a video collection of bilibili, note that the ` – playlist 'option is required here.在这里插入图片描述

四、 HEVC 扩展

After merging videos with this method, it is possible that when using win10’s “movie and TV” for playback, it will prompt that it cannot be decoded and need to install hevc extension, but the extension is charged for power on at Microsoft.

在这里插入图片描述

在这里插入图片描述

If you don’t want to pay, you can download it directly in my warehouse in section ‘3.1’, and double-click to install it.

来一句歌词:

她的睫毛 弯的嘴角
无预警地对我笑
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

You-get && FFmpeg 的相关文章

随机推荐

  • SQL Server(2019)导入excel数据

    要导入的excel文件如图所示 xff0c 600个记录 操作步骤 xff1a 1 在要导入的数据库上右键 xff0c 任务 xff0c 导入数据 2 选择数据源为excel xff0c 选择相应excel文件 xff0c 选择excel版
  • SQL Server(2019)导出excel数据

    目标 xff1a 将Grademanager数据库中的test表导出为excel test表内容 xff1a 如图 xff0c 600条记录 操作步骤 xff1a 1 在相应数据库上右键 xff0c 任务 xff0c 导出数据 2 选择数据
  • 机器视觉特征提取介绍:HOG、SIFT、SURF、ORB、LBP、HAAR

    一 概述 这里主要记录自己的一些感悟 xff0c 不是很系统 想要详细系统的理论 xff0c 请参考文末的 图像处理之特征提取 个人不是专业cv工程师 xff0c 很多细节没有深究 xff0c 描述可能不严谨 在总结物体检测算法之前先把基础
  • ROS低调复习总结

    ROS复习 一 考试时间 形式 日期二 题型三 不知道随便写四 课程知识点 难点1 1 3章课后复习题1 1 单元测试一1 2 单元测试二1 3 单元测试三 2 第二章 ROS系统架构2 1 比较Topic与Service通信2 2 关闭一
  • 了解Web前端-1 Http基本原理

    HTTP基本原理 1 HTTP协议2 HTTP与Web服务器3 浏览器中的请求和响应1xx 信息2xx 成功3xx 重定向4xx 客户端错误5xx 服务器错误 1 HTTP协议 Hyper Text Transfer Protocol xf
  • 了解Web前端2-HTML语言

    HTML语言 1 什么是HTML2 了解HTML结构4 HTML的基本标签4 1 不是标签4 2 文件开始标签 96 96 4 3文件头部标签 96 96 4 4文件标题标签 96 96 4 5元信息标签 96 96 4 6页面的主体标签
  • 了解Web前端3-CSS层叠样式表

    CSS样式层叠表 1 CSS 概述2 属性选择器2 1属性选择器2 2属性和值选择器2 3属性和值的选择器 多值 3 类和ID选择器3 1ID选择器3 2类选择器3 3为特定元素使用class 1 CSS 概述 CSS是一种标记语言 xff
  • 了解Web前端4-JavaScript动态脚本语言

    JavaScript 动态脚本语言 1 页面中直接嵌入JavaScript代码2 连接外部JavaScript文件 JavaScript 是 web 开发人员必须学习的 3 门语言中的一门 xff1a HTML 定义了网页的内容CSS 描述
  • 爬虫の简介

    爬虫简介 一 什么是爬虫二 Python爬虫架构 一 什么是爬虫 爬虫 xff1a 一段自动抓取互联网信息的程序 xff0c 从互联网上抓取对于我们有价值的信息 二 Python爬虫架构 Python 爬虫架构主要由五个部分组成 xff0c
  • 一个不错的在线作图网站

    菜鸟教程的一个在线工具 连接 xff1a https c runoob com more shapefly diagram 优点 xff1a 没有广告 xff0c 不用关注微信公众号 xff0c 不用登陆 此外 xff0c 菜鸟还提供了其他
  • ABB机器人复习

    1 工业机器人最显著的特点 xff1a 2 工业气人的5种典型的结构 xff1a 3 认识示教器 xff1a 4 ABB机器人坐标系 xff1a 5 轴运动与线性运动 xff1a 1 轴运动 xff1a 2 线性运动 xff1a 6 重定位
  • step7basic的许可无法彻底完成

    安装博途并 后 xff0c 在项目中选择设备时可能会出现 xff1a step7basic的许可无法彻底完成 因为automation license manager中 的报错 原因 xff1a win10系统的更新 xff0c 导致软件不
  • 西门子学习第一章 S7-1200基础

    第一章 1 1 S7 1200系统概述 xff08 1 xff09 PLC 运用领域 xff08 2 xff09 S7 1200外观 xff08 3 xff09 西门子系列分类 1 2博途软件1 3 S7 1200系列PLC的硬件介绍 xf
  • 可见光的波长转换为RGB值颜色,光谱波长与RGBA分量,不同波长的光转换成不同的RGB值,JavaScript版本

    JS版本的光谱波长转换RGBA颜色值的方法 xff0c 在网上没找到 xff0c 后来领导发来一个C 43 43 版本的 xff0c 我对照着改为JS版 xff0c 有需要的朋友 可以参考 xff0c 代码如下 xff1a lt html
  • Modbus TCP Server端(附超全注释)

    实验项目名称 Modbus TCP实验 一 实验目的二 实验内容三 实验环境四 设计方案五 实验结果及分析 xff08 或设计总结 xff09 六 完整代码6 1 server c6 2 respond c6 3 respond h 开发语
  • ORB特征提取和匹配

    一 步骤二 代码三 部分结果展示3 1 使用Sobel算子且方向为vertical xff0c 进行边缘检测3 2 特征点提取 xff08 部分 xff09 3 3 特征点匹配 一 步骤 Step1 xff1a 读取彩色图片 1 新建实验用
  • windows下 Gitee(码云)使用

    1 注册Gitee并新建远程仓库2 初始化本地工作空间3 Git 全局设置 4 SSH公钥绑定5 提交文件到远程仓库 本文前提 xff1a 你已经在windows安装了git xff0c 如图所示 xff0c 关于git的安装 xff0c
  • 在 VS Code 中使用 Git

    1 VS Code安装2 在VS Code中登录Github账号3 Git 安装4 Git配置5 新建远程仓库并用命令行提交6 使用VSCode提交 1 VS Code安装 到vs code官网下载合适的版本并安装 2 在VS Code中登
  • 图像处理与机器视觉复习

    完整资源 xff1a GIthub链接 一 填空题 图像灰度均值 方差 图像的灰度平均值是平指灰度的平均水平 平均方差是衡量一个样本波动大小的量 xff0c 对图像来说 xff0c 平均方差反应的是图像高频部分的大小 方差小 xff0c 则
  • You-get && FFmpeg

    一 引言二 you get 介绍2 1 you get 安装2 2 you get语法及参数2 3 you get运用实例 三 FFmpeg介绍3 1 FFmpeg安装3 2 you get与FFmpeg的结合使用 四 HEVC 扩展 一