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 ...
随机推荐
- bzoj3196 二逼平衡树——线段树套平衡树
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=3196 人生中第一棵树套树! 写了一个晚上,成功卡时 9000ms+ 过了! 很要注意数组的大 ...
- 如何在linux 32位机器编译64位程序
编译64位程序,不一定要编译机器是64位的,但是32位机器默认安装的gcc编译环境还是不能用来编译64位程序. 编译64位程序,需要加上-m64编译器参数,默认安装的gcc已经支持该参数,但是缺少64 ...
- Java多线程(九) synchronized 锁对象的改变
public class MyService { private String lock = "123"; public void testMethod() { synchroni ...
- [Usaco2018 Open]Milking Order
Description Farmer John的N头奶牛(1≤N≤10^5),仍然编号为1-N,正好闲得发慌.因此,她们发展了一个与Farmer John每天早上为她们挤牛奶的时候的排队顺序相关的复杂 ...
- 题解报告:poj 1426 Find The Multiple(bfs、dfs)
Description Given a positive integer n, write a program to find out a nonzero multiple m of n whose ...
- hbase本地调试环境搭建
1,前言 想要深入的了解hbase,看hbase源码是必须的.以下描述了搭建hbase本地调试环境的经历 2,安装步骤 2.1,启动hbase 1,安装java和IDE IntelliJ,下载源码等. ...
- 面向过程与面向对象引入三大特性&&事务
1.面向过程 int a = 10;int b =5;int c = a+b; int r1 = 10;int r2 = 5;double c = r1*r1*3.14 - r2*r2*3.14 缺点 ...
- SQL server 查询语句 练习题
用SQL语句创建四个表: create database tongjigouse tongjigocreate table student(Sno varchar(20) not null prima ...
- 自定义样式 dialog
自定义样式 dialog,可设置界面外点击屏幕外和返回键 是否消失 基本用法如下: CustomDialog.Builder customBuilder = new CustomDialog.Bui ...
- 关于使用 autoFac 的注入方法
1.使用 NUGET 安装 Autofac 2.需要引用Autofac ASP.NET MVC 5 Integration 这个扩展包. 但有时候在NuGet中找不到 该包 需要使用“程序要控制器控 ...