convert images to a video (Ubuntu)
use =avconv= package
e.g. to convert images (v_1.png, v_2.png ...) to 'velocity.mp4'
>>> avconv -i v_%d.png -b:v 1000k velocity.mp4
- i :: input file
- b :: bitrate
What bitrate should I use when encoding my video?
File size = bitrate (kilobits per second) x duration
| Output size | Bitrate | Filesize |
| 320x240 pixels | 400 kbps | 3MB / minute |
| 480x270 pixels | 700 kbps | 5MB / minute |
| 1024 x 576 pixels | 1500 kbps | 11MB / minute |
| 1280x720 pixels | 2500 kbps | 19MB / minute |
| 1920x1080 pixels | 4000 kbps | 30MB / minute |
kbps= Kilo Bits Per Second
log
$ avconv -i t_%d.png -b:v 2500k temperature.mp4
ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, image2, from 't_%d.png':
Duration: 00:00:04.04, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, rgb24(pc), 1022x837, 25 fps, 25 tbr, 25 tbn, 25 tbc
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0xf47d80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0xf47d80] profile High 4:4:4 Predictive, level 3.1, 4:4:4 8-bit
[libx264 @ 0xf47d80] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=24 lookahead_threads=4 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=2500 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'temperature.mp4':
Metadata:
encoder : Lavf56.40.101
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 1022x837, q=-1--1, 2500 kb/s, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc56.60.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
Input stream #0:0 frame changed from size:1022x837 fmt:rgb24 to size:1009x837 fmt:rgb24
Input stream #0:0 frame changed from size:1009x837 fmt:rgb24 to size:1022x837 fmt:rgb24
frame= 101 fps=0.0 q=-1.0 Lsize= 1228kB time=00:00:03.96 bitrate=2539.7kbits/s
video:1226kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.161340%
[libx264 @ 0xf47d80] frame I:1 Avg QP:22.02 size: 6166
[libx264 @ 0xf47d80] frame P:39 Avg QP: 6.78 size: 13587
[libx264 @ 0xf47d80] frame B:61 Avg QP: 8.27 size: 11776
[libx264 @ 0xf47d80] consecutive B-frames: 16.8% 5.9% 5.9% 71.3%
[libx264 @ 0xf47d80] mb I I16..4: 8.1% 88.1% 3.9%
[libx264 @ 0xf47d80] mb P I16..4: 4.4% 2.9% 3.7% P16..4: 2.5% 1.0% 1.0% 0.0% 0.0% skip:84.5%
[libx264 @ 0xf47d80] mb B I16..4: 2.8% 1.1% 2.3% B16..8: 2.9% 1.3% 1.0% direct: 0.6% skip:88.0% L0:47.8% L1:37.6% BI:14.6%
[libx264 @ 0xf47d80] final ratefactor: 7.45
[libx264 @ 0xf47d80] 8x8 transform intra:29.6% inter:33.6%
[libx264 @ 0xf47d80] coded y,u,v intra: 36.5% 23.7% 20.0% inter: 2.6% 0.9% 0.8%
[libx264 @ 0xf47d80] i16 v,h,dc,p: 93% 4% 3% 0%
[libx264 @ 0xf47d80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 7% 55% 3% 3% 2% 4% 2% 4%
[libx264 @ 0xf47d80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 20% 15% 6% 10% 6% 12% 6% 11%
[libx264 @ 0xf47d80] Weighted P-Frames: Y:51.3% UV:7.7%
[libx264 @ 0xf47d80] ref P L0: 55.5% 5.7% 19.9% 12.8% 6.1%
[libx264 @ 0xf47d80] ref B L0: 74.3% 19.9% 5.8%
[libx264 @ 0xf47d80] ref B L1: 93.3% 6.7%
[libx264 @ 0xf47d80] kb/s:2483.97
References:
https://stackoverflow.com/questions/16315192/avconv-make-a-video-from-a-subset-on-images
https://libav.org/avconv.html
https://www.ezs3.com/public/What_bitrate_should_I_use_when_encoding_my_video_How_do_I_optimize_my_video_for_the_web.cfm
convert images to a video (Ubuntu)的更多相关文章
- 姿势估计实验-Realtime_Multi-Person_Pose_Estimation-CMU
前言: 论文及源代码网址: https://github.com/ZheC/Realtime_Multi-Person_Pose_Estimation 地址2: https://github.com/ ...
- 绿色 或者 免安装 软件 PortableApps
Refer to http://portableapps.com/apps for detail. Below is just a list at Jan-01-2017 for quick show ...
- Android代码优化----PullToRefresh+universal-image-loader实现从网络获取数据并刷新
[声明] 欢迎转载,但请保留文章原始出处→_→ 生命壹号:http://www.cnblogs.com/smyhvae/ 文章来源:http://www.cnblogs.com/smyhvae/p/4 ...
- (原创) jetson tk1 初始化
1. 相关的网站: 1. Jetson TK1 support https://developer.nvidia.com/jetson-tk1-support 2.official Wiki fo ...
- 命令行command line 使用 http proxy的设置方法 Setting Up HTTP Proxy in Terminal
Step 1: Install Shadowsocks Client Shadowsocks is an open-source proxy project to help people visit ...
- faceswap使用手冊
cd faceswap cd faceswap-master python faceswap.py gui Notice: This repository is not operated or mai ...
- Jetson TK1 四:重新安装系统(刷机)
转载:http://blog.sina.com.cn/s/blog_bab3fa030102vk21.html Jetson TK1是NVIDIA基于Tegra K1开发的一块低成本开发板,板载一块T ...
- AI推理单元
AI推理单元 推理服务供了一套面向 MLU(Machine Learning Unit,机器学习单元)设备的类似服务器的推理接口(C++11标准),以及模型加载与管理,推理任务调度等功能,极大地简化了 ...
- ffmpeg 音频转换: use ffmpeg convert the audio from stereo to mono without changing the video part
To convert the audio from stereo to mono without changing the video part, you can use FFmpeg: ffmpeg ...
随机推荐
- Python实现用户交互,显示省市县三级联动的选择
题目:Python实现用户交互,显示省市县三级联动的选择 定义的字典为: dic = { "江西": { "萍乡": ["安源", &quo ...
- gitlab调试
Bundle complete! 104 Gemfile dependencies, 161 gems now installed.Gems in the groups development, te ...
- 炫酷的 CSS 形状(值得收藏)
在今日头条中看到炫酷的 CSS 形状,就记录一下: 1.圆形 #circle { width: 100px; height: 100px; background: red; border-radius ...
- E20171230-hm
refine vt. 提炼; 改善; 使高雅; revert vi. 恢复; 重提; 回到…上; <律>归还; vt. 使恢复原状; n ...
- vim 跳行查看日志
VIM 跳跃行号 一.显示行号 在命令模式下输入 :set nu 或者 :set number 即可显示行号 二.跳跃行号 在编辑模式下输入 ngg 或者 nG [n为指定的行数(如25)] ...
- 讯搜问题排查xunsearch
mysql导入数据不成功,开始重建索引后提示 [XSException] ../local/xunsearch/sdk/php/lib/XS.php(1898): DB- 可打印的版本 开始重建索引 ...
- Notepad++安装插件
https://sourceforge.net/projects/npp-plugins/files/ 下载完插件后,通过notepad++的设置>>>>导入>>& ...
- 列表框、分组列表框、标签(label)、分组框(fieldset)、框架(frameset)
列表框(select) 下拉列表,用户可以从一些可选项中选择. 示例:简单的下拉列表 <select name="country"> <option value= ...
- Hadoop Hive概念学习系列之hive的数据压缩(七)
Hive文件存储格式包括以下几类: 1.TEXTFILE 2.SEQUENCEFILE 3.RCFILE 4.ORCFILE 其中TEXTFILE为默认格式,建表时不指定默认为这个格式,导入数据时会直 ...
- Angular——单页面实例
基本介绍 1.引入的route模块可以对路由的变化做出响应 2.创建的控制器中依然需要$http向后台请求数据 3.php中二维数据的遍历用的是foreach 4.php中$arr=array(),$ ...