ffmpeg在ubuntu的安装和编译

Ubuntu系统-FFmpeg安装及环境配置 FCN-4是一个应用于音频自动标注的全卷积神经网络。使用该网络完成音频标注任务时,首先需要使用python的音频处理工具包Librosa提取音频的时频特征,针对mp3格式的音频文件,Librosa读取音频文件的工作依赖音频处理后端ffmpeg完成,因此要求使用该网络进行mp3音频自动标注任务的环境具备Librosa依赖库和ffmpeg。Librosa是一个用于音频、音乐分析、处理的python工具包,具备时频处理、特征提取、绘制声音图形等常用功能。 阅读详情

环境都准备好了直接开始

1.获取ffmepg源码:

git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg  

或者Download FFmpeg  自己访问下载(tar xvf xxx.tar.gz)

2. 编译

1) ./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-filter=delogo --enable-debug --disable-optimizations --enable-libspeex --enable-shared --enable-pthreads --disable-x86asm 

   这一步一般都会报错,因为会缺少一些库 按照提示下载安装包,或者apt 获取(但每个ubuntu获取源不同,apt不一定能成功  ) 

     简单说一下可能遇到的库   sudo apt-get install xxxx

 libfdk-aac-dev
            speex (
libspeex-dev)
            libx264-dev
            libsdl2-dev(没这个ffplay编译不出来
)

如果报 not found in pkg-config

export PKG_CONFIG_PATH=/usr/local/speex/lib/pkgconfig:$PKG_CONFIG_PATH

./configure --enable-static --enable-shared --disable-asm --disable-avs

3.ffmpeg  的configure完成后,目录下有个config.h 打开,搜FFPLAY 0 置为1

  (这步是为了编译出ffplay)

4.sudo make && sudo make install 

 (注意sudo)

对于安装过程出现的yes/no 基本能输yes输yes,不知道的都回车就ok

根据第2步,/usr/local/ffmpeg  去该目录查看编译后的结果  bin下有 ffmpeg    ffplay    ffprobe

执行报错解决

 1.不加路径执行 报ffmpeg不存在

        将ffmpeg的bin目录添加到profile中 然后执行. .profile使之生效

2.ffmpeg执行报.so不存在_libomx_core.so not found_chrycoder的博客-优快云博客

编译

 gcc log.c -I /usr/local/ffmpeg/include -L /usr/local/ffmpeg/lib -lavutil

注意头文件和动态库的路径搜索配置

ubuntu ffmpeg的编译安装 ubuntu ffmpeg安装 环境:ubuntu 18.04 1.下载ffmpeg git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg cd ffmpeg ./configure --enable-shared --prefix=/usr/local/ffmpeg --enable-gpl --enable-libx264 ... 阅读详情

相关推荐

Ubuntu24.04 下源码编译安装最全的ffmpeg,生成动态库和静态库

在 Ubuntu 24.04 上编译和安装 FFmpeg 并生成完整的动态库和静态库,确实是一个复杂而详尽的过程,涉及很多不同的步骤与配置选项。以下内容将详细讲解如何在 Ubuntu 上进行 FFmpeg 编译安装,生成所需的动态库和静态库。

woter2019的博客 3455

Ubuntu下FFmpeg的安装方式

Ubuntu下FFmpeg的安装方式详细版

日常记录,挨打要立正! 1万+

【opencv x ffmpeg】一、Linux下安装与编译(Ubuntu18.04)

一、ffmpeg安装和编译 因为opencv和ffmpeg的兼容性问题,所以在安装ffmpeg的时候不能选择高于ffmpeg 4.4版本进行编译,ffmpeg高于4.4版本的,API接口变动太大,无法与opencv兼容,在对opencv进行编译的时候会报错。这里选择的是ffmpeg 4.2.2版本进行安装。 git clone --depth=1 https://git.ffmpeg.org/ffmpeg.git -b n4.2.2 后面的安装步骤本人之前写过,就...

涛涛子的博客 4449

ubuntu配置ffmpeg以及基本使用

ubuntu 基本使用

QG 4098

我想学FFmpeg (一) Ubuntu 编译安装

Ubuntu18.04 编译安装ffmpeg

lucky_tom的专栏 840

在 ubuntu22 中编译安装 ffmpeg

下面是 ffplay 与 ffplay_g 文件的详细信息,可以看到 ffplay 经过 stripped ,ffplay_g 没有经过 stripped 且有 debug_info。注:在以上编译中没有使用 --enable-ffplay 选项,所以没有将 可执行程序 ffplay 编译出来,因此下面添加了 --enable-ffplay。下面是编译成功后 ffmpeg-7.0.1 中的文件,可以看到生成的可执行程序都有两份,如 ffplay 与 ffplay_g。

lzn948055097的博客 1417

Ubuntu20.04 编译安装 FFmpeg 详细教程

本文目录导航0.预备软件包0.1 FFmpeg0.2 SDL21.安装编译所需工具1.1 安装 aptitude1.2 安装 gcc、g++1.3 安装 yasm、nasm2.安装依赖库3.编译 FFmpeg4.配置 FFmpeg4.1 配置环境变量4.2 配置动态链接库 0.预备软件包 0.1 FFmpeg FFmpeg 源码下载地址:http://ffmpeg.org/download.h...

annjeff的博客 2万+

在Ubuntu上编译和使用FFmpeg库

FFmpeg是一个强大的开源多媒体框架,它提供了处理音视频的功能和工具。在Ubuntu操作系统上编译和使用FFmpeg库可以让我们轻松地进行媒体处理和编程。本文将介绍如何在Ubuntu上编译FFmpeg,并提供一些使用示例代码。

ByteWhiz的博客 1053

Ubuntu下编译安装Ffmpeg

1. git clone ffmpeg: git clone https://git.ffmpeg.org/ffmpeg.git 会有一个ffmpeg目录,cd进去后就可看到常用的模块。 2.安装相关依赖库文件: sudo apt install yasm libsdl2-dev libx264-dev libx265-dev libfdk-aac-dev ./config...

手写我对你的温柔 1674

Unbutu 安装FFmpeg的两种方法

本文介绍两种FFmpeg的安装方法,均可以完美安装和使用FFmpeg,首先先介绍第一种方法: 下载源码手动安装,此方法好处是,我们可以选择自己需要的版本的或者比较高的稳定版本的FFmpeg来进行安装。

程序猿老樊的博客 7659

避开这些坑!QMT多因子策略实盘中的5个常见错误及解决方案

本文深入剖析了在QMT平台上实施多因子策略时常见的5个错误,包括因子过拟合、数据延迟处理不当、因子失效、交易成本低估和风险控制缺失,并提供了实用的解决方案。通过优化因子筛选、数据对齐和动态管理,帮助量化交易者提升策略稳健性和实盘表现。

k5l6m的博客 238

ubuntu 编译安装ffmpeg

1.FFmpeg编译 1.1.安装yasm 这里我是直接通过ubuntu包安装的,当然也可以通过编译源码来安装。 sudo apt-get install yasm 1.2.下载FFmpeg git clone https://git.ffmpeg.org/ffmpeg.git 1.3.配置、编译FFMPEG (1) apt-get install yasm    //这儿需要先...

qq_31186123的博客 4459

手把手教你用RoboTwin训练RDT模型:从环境配置到实战微调(避坑指南)

本文提供了一份详尽的避坑指南,手把手教你如何在RoboTwin开源仿真环境中,从零开始配置环境、采集数据并完成RDT视觉语言动作模型的实战微调。文章涵盖了环境搭建、数据流水线构建、模型配置与训练等关键步骤,旨在帮助研究者和开发者高效利用仿真数据,低成本探索具身智能应用。

weixin_29094979的博客 131

Ubuntu20.04 下编译安装 ffmpeg 和 ffplay

SDL(Simple DirectMedia Layer)是一个跨平台的多媒体和游戏开发包,提供2D,音频,事件驱动,多线程和定时器等服务,它使用C语言写成,提供了多种控制图像、声音、输出的函数,让开发者只要用相同或是相似的代码就可以开发出跨多个平台(Linux、Windows、Mac OS X等)的应用软件。编译主要依赖 sdl2环境(针对ffmpeg 3.x版本),未安装sdl2的情况下,不会自动生成关于ffplay的编译选项。为了提高效率使用了汇编指令,如MMX和SSE等。

weixin_43412762的博客 7446

SAR成像处理基本知识2——图像尺寸与回波尺寸的关系

阅读本文前,请先了解上一篇文章(SAR成像处理基本知识1——常用专用名词解释) 1. SAR图像尺寸预估方法 以C波段2m@20km的SAR图像为例,假设天线中心下视角为35° ,说明图像尺寸的估计方法。 1.1 距离向尺寸估计 地距分辨率为2m时,距离向分辨率约为1.15m,则要求信号带宽不小于130MHz,假设信号带宽为150MHz,采样率为180MHz,那么距离向分辨单元为0.833m。 地距幅宽为20km时,距离向幅宽约为20*sind(3...

爱学习的小伟的博客 4954

VS配置RTKLIB(卫星定位开源代码)环境

@RTKlib代码调试教程-Visual Studio 2019 你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Markdown编辑器, 可以仔细阅读这篇文章,了解一下Markdown的基本语法知识。 ##RTKLIB-rtklib_2.4.3 提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 @RTKlib代码调试教程-Visual Studio 2019 提示:这里可以添加本文要记录的大概内容: 例如:随着人工智能的不断发展,机器学习这门技

qq_42209977的博客 4486

ubuntu下ffmpeg编译安装

ubuntu下ffmpeg编译安装 解决库链接不上的问题 ubuntu下ffmpeg编译安装   1、ffmpeg是什么东西?相信很多人第一次接触这个东西,我先在这里做个简单的介绍。 FFmpeg是一套可以用来记录、转换数字音频、视频,并能将其转化为流的开源计算机程序。它包括了目前领先的音/视频编码库libavcodec等。  libavformat :用于各种音视频封

wangpengqi的专栏 998

Apache Hop环境搭建实战:从零到一的下载、安装与配置指南

本文详细介绍了Apache Hop环境搭建的全过程,包括下载、安装与配置指南。从选择正确的JDK17版本到设置关键环境变量,再到启动GUI界面和解决常见问题,提供了全面的实战指导。适合数据工程师和ETL开发者快速上手这一强大的数据集成工具。

weixin_42634811的博客 572

Ubuntu系统下FFmpeg源码编译安装

本文详细记录了在Linux系统中编译安装FFmpeg 6.1.2的全过程。主要步骤包括:下载并解压源码包;修改目录权限;配置编译参数(--enable-shared --prefix指定安装路径);处理编译过程中的权限问题(需多次修改相关目录权限为777);执行make和make install完成编译安装;配置环境变量(~/.bashrc中添加bin和lib路径);最后通过ffmpeg -version验证安装成功。整个过程中,权限问题是主要障碍,通过递归修改整个ffmpeg目录权限最终解决该问题。编译完

wangyongyao1989的博客 1486

适合小白的超详细yolov8环境配置+实例运行教程,从零开始教你如何使用yolov8训练自己的数据集(Windows+conda+pycharm)

yolov8源码下载地址:GitHub - ultralytics/ultralytics: NEW - YOLOv8 🚀 in PyTorch > ONNX > OpenVINO > CoreML > TFLiteyolov8使用文档: Home - Ultralytics YOLOv8 Docs教学视频参考: 包会!YOLOv8训练自己的数据集_哔哩哔哩_bilibili先用conda prompt创建一个虚拟环境,我的叫yolov8, python版本用3.10 源码地址:GitHub - ul

CV在读 25万+

YOLOv5入门实践(2)——手把手教你利用labelimg标注数据集

YOLOv5入门实践第2步,手把手教你使用labelimg标注数据集

路人贾的博客 1万+

Ubuntu安装编译FFmpeg

装了三天都快哭了,做个记录。 前两天用Windows+Cygwin装的,最后失败了,卡在执行ffmpeg时候,报错: error while loading shared libraries: cygswscale-5.dll。 于是切换了虚拟机,版本是Ubuntu 14.04 LTS。 参考文章:http://www.imooc.com/article/247113 https://www.im...

weixin_42326912的博客 370

Python爬虫抓取淘宝商品详情页信息:从入门到高级技术应用

通过本篇博客,我们了解了如何使用Python爬虫抓取淘宝商品详情页的信息,如何使用requests和Selenium抓取静态和动态内容,如何应对淘宝的反爬虫机制,如何将抓取的数据保存到CSV文件等。随着爬虫技术的不断发展,开发者可以根据需要选择合适的工具和技术,如使用分布式爬虫框架提高抓取效率,或者利用OCR技术处理验证码等问题。在进行淘宝爬虫时,需要注意遵循相关法律法规和平台的爬虫政策,避免对平台造成过度的负担或侵犯其合法权益。

2201_76125261的博客 460

【环境搭建】在ubuntu16.04上编译安装ffmpeg和opencv

1.ubuntu16.04上编译安装ffmpeg;2.ubuntu16.04上编译安装opencv

Zhang_Chen_的博客 3021

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

ffmpeg和opencv在Ubuntu16.04上编译安装

​ 由于通过ffmpeg命令行每隔一秒获取jpg图片并通过脚本转发到图片处理服务这种模式,需要运行脚本 ,ffmpeg,图片处理服务,其中一个环节挂了就没法玩了,而且图片处理服务只需要用到bgr24的数据,如果直接通过rtsp流拿到h264解码后再将yuv420p转成bgr24,这样的话就剩了好多环节。 ​ 所以决定研究下linux下的ffmpeg的编程,就从编译安装开始吧,因为opencv也正好...

opeak的博客 1177

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

ffmpeg linux 编译 安装教程,Ubuntu 16.04安装编译FFmpeg

在Ubuntu 16.04环境下安装编译FFmpeg过程步骤,本文主要基于此官方指导编译。1. 安装依赖sudo apt-get updatesudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev libsdl1.2-dev libtheora-dev libtool libva-d...

weixin_30953203的博客 432

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

上一篇: 安卓环境,执行C程序system不生效
下一篇: ffmpeg执行报.so不存在
chrycoder
博客等级 码龄14年 29粉丝 36原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值