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 ...
随机推荐
- 用js获取access_token
尝试用js获取access_token 最终失败告终,哈哈 1需要 appId和AppSecret 这两个参数是要保密的,建议不要暴露在外面,以防被别有用心的人利用. $.ajax({ url:'ht ...
- 给网站添加免费Https SSL证书
基于阿里云的云盾证书服务,系统是centos6.8,web服务器是nginx1.8.0,简单记录下踩坑情况. 申请证书 登录阿里云控制台→安全(云盾)→证书服务→购买证书(https://common ...
- codevs1669(dfs)子集和目标值
1692 子集和的目标值 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 钻石 Diamond 题目描述 Description 给定n个整数in和目标值T,求某一非空子集 ...
- [转]c 语言中 %d,%lu等区别
转载至:http://blog.sina.com.cn/s/blog_7d94c35c01019f96.html %d 有符号10进制整数 %ld 长整型 %hd短整型 %hu 无符号短整形 %u无符 ...
- 转 awr自动收集脚本
1. remote get awr report #!/usr/bin/ksh ####sample: sh awr.sh 20170515 20170516 AWR ### default it w ...
- Storm概念学习系列之storm的定时任务
不多说,直接上干货! 至于为什么,有storm的定时任务.这个很简单.但是,这个在工作中非常重要! 假设有如下的业务场景 这个spoult源源不断地发送数据,boilt呢会进行处理.然后呢,处理后的结 ...
- ASP.NET文件操作
在开发Web程序时,不但有存储在数据库中和XML文件中的数据形式需要处理,而且还有很多诸如文本.Word文档和图片等格式的文件数据需要处理.尤其是在一些信息管理系统中,文档的处理流程贯穿了整个系统的运 ...
- RabbitMQ指南之五:主题交换器(Topic Exchange)
在上一章中,我们完善了我们的日志系统,用direct交换器替换了fanout交换器,使得我们可以有选择性地接收消息.尽管如此,仍然还有限制:不能基于多个标准进行路由.在我们的日志系统中,我们可能不仅希 ...
- js中关于string转date类型的转换
var date_up = input.split("-");//input表示string类型(时间例如:2017-11-12 10:07:36.653) var date_do ...
- Android基础TOP4_2:弹窗式选择列表
Activity: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmln ...