mp4 文件格式内容查看方法

https://www.bento4.com/downloads/

上述地址下载mp4dump工具。

使用mp4dump 工具生成json文件。

mp4dump –verbosity 3 –format json testname.mp4 > test.json

vim 打开 test.json

vim 中使用如下命令,格式化json文本

%! python -m json.tool

MP4 3GPP 3GPP2 文件关系图

Relations between ISO/IEC Base Media File Format, MP4 File Format, 3GPP file format and 3GPP2 file format. Based on the 3GPP2 technical specification published on 18 May 2007

参考网址:

https://en.wikipedia.org/wiki/ISO/IEC_base_media_file_format

 

RTSP协议文档 2.0

实时流协议(Real Time Streaming Protocol,RTSP)是一种网络应用协议,专为娱乐和通信系统的使用,以控制流媒体服务器。该协议用于创建和控制终端之间的媒体会话。媒体服务器的客户端发布VCR命令,例如播放,录制和暂停,以便于实时控制从服务器到客户端(视频点播)或从客户端到服务器(语音录音)的媒体流。

流数据本身的传输不是RTSP的任务。大多数RTSP服务器使用实时传输协议(RTP)和实时传输控制协议(RTCP)结合媒体流传输。然而,一些供应商实现专有传输协议。例如,RealNetworks公司的RTSP服务器软件也使用RealNetworks的专有实时数据传输(RDT)。

RTSP由RealNetworks公司,Netscape公司 [1]哥伦比亚大学开发,第一稿于1996年提交给IETF[2]。由互联网工程任务组(IETF)的多方多媒体会话控制工作组(MMUSIC WG)进行了标准化,并于1998年发布为RFC 2326。[3] RTSP 2.0 于2016年发布为RFC 7826,作为RTSP 1.0的替代品。RTSP 2.0基于RTSP 1.0,但除了基本的版本协商机制之外不向后兼容。

rfc7826

av1 hevc H264 有用的网址

转码相关:

https://evilmartians.com/chronicles/better-web-video-with-av1-codec

https://www.cnblogs.com/tinywan/p/6404411.html

https://trac.ffmpeg.org/wiki/Encode/H.264

https://evilmartians.com/chronicles/better-web-video-with-av1-codec

https://magiclen.org/vcodec/

https://magiclen.org/image-differencer/

https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding

https://en.wikipedia.org/wiki/Advanced_Video_Coding

https://en.wikipedia.org/wiki/AV1

无损媒体资源地址:

https://media.xiph.org/

https://www.streamingmedia.com/Articles/Editorial/Featured-Articles/At-the-Battle-of-the-Codecs-Answers-on-AV1-HEVC-and-VP9-128213.aspx?utm_source=related_articles&utm_medium=gutenberg&utm_campaign=editors_selection

https://www.muvi.com/blogs/best-video-codec-for-streaming.html

https://aomedia.googlesource.com/aom

https://trac.ffmpeg.org/wiki/CompilationGuide

AV1 spec 地址:

https://aomedia.org/av1-features/get-started/

AV1-ISO-Base-Media-File-Format-Binding-Specification

av1-spec

 

质量评估:

https://magiclen.org/ffmpeg-psnr-ssim/

https://github.com/Netflix/vmaf

https://medium.com/netflix-techblog/toward-a-practical-perceptual-video-quality-metric-653f208b9652

https://www.jianshu.com/p/58f73b38a2ca

https://testerhome.com/topics/11888

https://juejin.im/post/5c1ca976e51d45436e1b94f6

https://github.com/Netflix/vmaf

https://zhuanlan.zhihu.com/p/23536648

https://www.jianshu.com/p/b97e4d15a400

http://yunxin.163.com/blog/video14-0809/

https://testerhome.com/topics/19932

 

 

ffmpeg 编译 AV1 x264 x265转码

代码下载:

1.下载ffmpeg code。

git clone https://github.com/FFmpeg/FFmpeg.git

目前最新版本branch为:

remotes/origin/release/4.2    checkout 到4.2分支。

2.下载AV1  source code 。

git clone https://aomedia.googlesource.com/aom

使用master 分支,remotes/origin/master

3.下载 x264 Source Code

git clone https://code.videolan.org/videolan/x264.git

使用 master 线 remotes/origin/master

4.下载x265 Source Code
hg clone http://hg.videolan.org/x265

 

编译库依赖库:

1.AV1 编译

假设代码位置为/*/aom  。

mkdir aom_build

drwxr-xr-x 19 xw xw 4096 11月 12 15:27 aom/
drwxr-xr-x 9 xw xw 4096 11月 12 19:34 aom_build/

cd aom_build

cmake ../aom 类似如下输出说明configure 成功。

aom_configure: Detected CPU: x86_64
Configuring done
Generating done
Build files have been written to: /mydata/mywork/mycode/media/aom_build

make -j8

sudo make install

2.编译 x264

假设代码存放位置/*../x264

cd x264

./configure –enable-shared –enable-static

make -j8

sudo make install

3.编译x265

假设代码存放位置/*…./x265/

mkdir x265_build

cd x265_build

cmake ../x265

make -j8

sudo make install

4 编译ffmpeg 。

cd ffmpeg

./configure –enable-libx264 –enable-libx265 –enable-libaom –disable-doc –enable-pic –extra-cflags=-fPIC –enable-gpl

make -j8

sudo  make install

 

 

 

 

Centos 自定义服务需要在网络连通时启动

frpc 定义service,一直重启后运行失败,看log是网络未链接成功。

[Unit]
Description=frpc
After=network.target network-online.target

[Service]
TimeoutStartSec=60
ExecStart=/usr/bin/frpc -c /etc/frp/frpc_homeserver.ini
ExecStop=/bin/kill $MAINPID

[Install]
WantedBy=multi-user.target

在service定义文件中添加下面一句依赖设置即可。

After=network.target network-online.target

ffmpeg为视频添加时间戳

--enable-debug=3 --disable-doc --disable-optimizations --enable-pic --extra-cflags=-fPIC --enable-openssl --enable-libx264 --enable-libx265 --enable-gpl --enable-nonfree --enable-libfreetype

配置ffmpeg –enable-libfreetype 选项。

使用如下命令进行转码:

ffmpeg -i inputfile -vf "drawtext=fontfile=/usr/share/fonts/truetype/wqy/wqy-microhei.ttc: x=40: y=40: fontcolor=white: fontsize=100: box=1:boxborderw=20: boxcolor=0x00000000@1: text=%{n}" -vcodec libx264 -r 15  ./outputfilename.mkv