ffmpeg

Resampling audio using libswresample from 48000 to 44100

旧时模样 提交于 2020-12-12 06:22:12
问题 I'm trying to resample a decoded audio frame from 48KHz to 44.1KHz using the libswresample API. The code I have is the following: // 'frame' is the original decoded audio frame AVFrame *output_frame = av_frame_alloc(); // Without this, there is no sound at all at the output (PTS stuff I guess) av_frame_copy_props(output_frame, frame); output_frame->channel_layout = audioStream->codec->channel_layout; output_frame->sample_rate = audioStream->codec->sample_rate; output_frame->format =

What ffmpeg command to use to convert a list of unsigned integers into an audio file?

感情迁移 提交于 2020-12-12 06:16:10
问题 I have a file that contains a list of about forty thousand integers that are space delimited, with each integer between the value of 0 and 255. It is this file here: https://github.com/johnlai2004/sound-project/blob/master/integers.txt If you connect a speaker to an ESP32 breakout board, then run this list of integers through the digital to analog converter at a frequency of 24kHz, you will hear the sentence, "That's not the post that you missed." What I want to know is how do you use FFMPEG

What ffmpeg command to use to convert a list of unsigned integers into an audio file?

末鹿安然 提交于 2020-12-12 06:12:27
问题 I have a file that contains a list of about forty thousand integers that are space delimited, with each integer between the value of 0 and 255. It is this file here: https://github.com/johnlai2004/sound-project/blob/master/integers.txt If you connect a speaker to an ESP32 breakout board, then run this list of integers through the digital to analog converter at a frequency of 24kHz, you will hear the sentence, "That's not the post that you missed." What I want to know is how do you use FFMPEG

[转载-声网]18个实时音视频开发中会用到开源项目

早过忘川 提交于 2020-12-12 05:00:46
原文链接: https://mp.weixin.qq.com/s/RCefMEXY-lx7RTu0zq5LLw 实时音视频的开发学习有很多可以参考的开源项目。一个实时音视频应用共包括几个环节:采集、编码、前后处理、传输、解码、缓冲、渲染等很多环节。每一个细分环节,还有更细分的技术模块。比如,前后处理环节有美颜、滤镜、回声消除、噪声抑制等,采集有麦克风阵列等,编解码有VP8、VP9、H.264、H.265等。 我们今天汇总了一些能帮助到正在学习或进行音视频开发的实时音视频开发者们的开源项目与几个也在为开源社区贡献力量的商业服务。这些项目分为几类:音视频编解码类、视频前后处理、服务端类等。 音视频编解码类开源项目 视频编解码的作用,就是在设备的摄像头采集画面和前处理后,将图像进行压缩,进行数字编码,用于传输。编解码器的优劣基本在于:压缩效率的高低,速度和功耗。 目前,主流的视频编码器分为3个系列:VPx(VP8,VP9),H.26x(H.264,H.265),AVS(AVS1.0,AVS2.0)。VPx系列是由Google开源的视频编解码标准。在保证相同质量情况下,VP9相比VP8码率减少约50%。H.26x系列在硬件支持上比较广泛,H.265的编码效率能比上一代提高了30-50%,但是复杂度和功耗会比上一代大很多,所以纯软件编码实现的话有一定瓶颈,现有的技术下

ffmpeg: “Referenced QT chapter track not found”

冷暖自知 提交于 2020-12-12 01:05:12
问题 Using ffmpeg to replace audio in a QuickTime with audio from a WAV. Anyone know why I'm getting Referenced QT chapter track not found ? Command: $ ffmpeg \ -i "$video" -t 25 \ -i "$audio" -map 0:v -c:v copy -map 1:a -c:a pcm_s24le -ar 48000 \ -hide_banner "$output" Output: [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7faf62010600] Referenced QT chapter track not found Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt creation_time

ffmpeg: “Referenced QT chapter track not found”

孤者浪人 提交于 2020-12-12 01:04:00
问题 Using ffmpeg to replace audio in a QuickTime with audio from a WAV. Anyone know why I'm getting Referenced QT chapter track not found ? Command: $ ffmpeg \ -i "$video" -t 25 \ -i "$audio" -map 0:v -c:v copy -map 1:a -c:a pcm_s24le -ar 48000 \ -hide_banner "$output" Output: [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7faf62010600] Referenced QT chapter track not found Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt creation_time

linux多线程下的fwrite和write使用详解

ぃ、小莉子 提交于 2020-12-11 23:59:25
Linux下的文件操作,有人喜欢用C库的文件流操作,有人喜欢用Linux的原生的系统调用。一般来说,C库的文件操作会更高效一些,因为C库自己做了文件缓存的处理。今天,主要研究多线程下的fwrite与write,每个线程都对相同的FILE*或者fd进行写操作,看看结果是否为预期行为。 第一种情况:使用C库的fwrite,其线程的实现如下: 第二种情况:使用系统调用write,其线程的实现如下: 下面看主线程的实现: 其中LOOPS定义为1000000。也就是说,线程1~3分别写入"aaaaaa\n",“bbbbbb\n”,和"cccccc\n"各一百万次。如果写入文件的操作是“线程安全”的,那么最终的文件行数应该是3百万行,且每行只可能是"aaaaaa"、“bbbbbb”、和"cccccc"的一种。 【文章福利】需要C/C++ Linux服务器架构师学习资料加群812855908(资料包括C/C++,Linux,golang技术,Nginx,ZeroMQ,MySQL,Redis,fastdfs,MongoDB,ZK,流媒体,CDN,P2P,K8S,Docker,TCP/IP,协程,DPDK,ffmpeg等) 接下来看测试结果: 1、定义了宏USE_CLIB,即使用C库的fwrite,其结果如下: 2、注释掉红USE_CLIB,即直接使用系统调用write,其结果如下:

北邮计算机网络实验-用开源代码实现一个SIP客户端

我们两清 提交于 2020-12-11 11:52:22
文章目录 一、背景知识 1.1 VOIP 1.2 SIP协议 1.3 实验要求 二、实验准备 2.1实验环境 2.2 PJSIP开源项目下载 2.3 Visual Studio安装 2.4 QT下载安装(实现视频通话) 2.5 下载SDL(实现视频通话) 2.6下载FFmpeg(实现视频通话) 三、 实现在呼叫中心的注册 3.1 项目编译 3.2 呼叫中心注册 3.2.1 呼叫IVP 3.2.2 注册组号 3.2.3 登录 四、实现视频电话 4.1 编译pjsip的底层支持 4.1.1 文件准备 4.1.2 建立链接 4.2 编译pjsip的图形界面 4.3 发布可执行文件并跨机通话测试 4.3.1 添加依赖库 4.3.2 通话测试 总结 提示:以下是本篇文章正文内容,下面案例可供参考 一、背景知识 1.1 VOIP VOIP:基于IP的语音传输(英语:Voice over Internet Protocol,缩写为VoIP)是一种语音通话技术,经由网际协议(IP)来达成语音通话与多媒体会议,也就是经由互联网来进行通信。也被称为IP电话(IP telephony)、互联网电话(Internet telephony)、宽带电话(broadband telephony)以及宽带电话服务(broadband phone service)等。 优势

Very slow writes on MySQL 8 - waiting for handler commit

自闭症网瘾萝莉.ら 提交于 2020-12-10 16:07:02
问题 I have MySQL 8 docker installation installed on an edge device which has the following two tables to write to video_paths | CREATE TABLE `video_paths` ( `entry` int(11) NOT NULL AUTO_INCREMENT, `timestamp` bigint(20) NOT NULL, `duration` int(11) NOT NULL, `path` varchar(255) NOT NULL, `motion` int(11) NOT NULL DEFAULT '0', `cam_id` varchar(255) NOT NULL DEFAULT '', `hd` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`entry`), KEY `cam_id` (`cam_id`), KEY `timestamp` (`timestamp`) ) ENGINE

Very slow writes on MySQL 8 - waiting for handler commit

拈花ヽ惹草 提交于 2020-12-10 16:06:06
问题 I have MySQL 8 docker installation installed on an edge device which has the following two tables to write to video_paths | CREATE TABLE `video_paths` ( `entry` int(11) NOT NULL AUTO_INCREMENT, `timestamp` bigint(20) NOT NULL, `duration` int(11) NOT NULL, `path` varchar(255) NOT NULL, `motion` int(11) NOT NULL DEFAULT '0', `cam_id` varchar(255) NOT NULL DEFAULT '', `hd` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`entry`), KEY `cam_id` (`cam_id`), KEY `timestamp` (`timestamp`) ) ENGINE