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 ...
随机推荐
- DTV_SI 汇总 & 兼谈LCN
前言 本章主要对数字广播DVB做一个系统的概况的描述,以及一些spc的相关的内容,虽然流程分析的不多,但是做为后续 章节资料的源泉,也是不可或缺的. 一. ATSC和DVB数字电视系统的比较 本文的主 ...
- 杂项:MySQL
ylbtech-杂项:MySQL 1.返回顶部 2.返回顶部 3.返回顶部 4.返回顶部 5.返回顶部 0. https://www.mysql.com/ 1. https://bai ...
- 频繁项集------->产生强关联规则的过程
频繁项集------->产生强关联规则的过程 1.由Apriori算法(当然别的也可以)产生频繁项集 2.根据选定的频繁项集,找到它所有的非空子集 3.强关联规则需要满足最小支持度和最小置性度 ...
- mysql数据类型和java对应表(copy)
[说明] 资料来自:http://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-type-conversions.html My ...
- Linux 系统管理命令 - lsof - 查看进程打开的文件
命令详解 重要星级: ★★★★★ 功能说明: 全名为 list open files,也就是列举系统中已经被打开的文件,通过 lsof 命令,就可以根据文件找到对应的进程信息,也可以根据进程信息找到进 ...
- 10.12NOIP模拟题(1)
#include<iostream> #include<cstdio> #include<cstring> #include<queue> #defin ...
- SQL 索引篇
索引介绍: 1.索引是对数据库表中一列或多列的值进行排序的一种结构,使用索引可快速访问数据库表中的特定信息. 数据库索引好比是一本书前面的目录, SQL Server的B树结构 2.加快数据库的查询速 ...
- 三分 POJ 2420 A Star not a Tree?
题目传送门 /* 题意:求费马点 三分:对x轴和y轴求极值,使到每个点的距离和最小 */ #include <cstdio> #include <algorithm> #inc ...
- 几个不同的tab切换示例
上一篇<论tab切换的几种实现方法>中讲了tab切换的4种不同实现原理,那么,现在到理论联系实际的时候了,下面就写几个实例. 一.仿”中国人民大学“官网的tab切换,背景是图片,效果图如下 ...
- LN : leetcode 690 Employee Importance
lc 690 Employee Importance 690 Employee Importance You are given a data structure of employee inform ...