ffmpeg

subprocess not creating output file of ffmpeg command

痞子三分冷 提交于 2021-02-17 02:18:28
问题 I am trying to run an ffmpeg command that records my screen and creates an .mp4 file of the recording in python. The command works when I run it in my shell, but is not working when I am running it in a Python script using subprocess. The issue is that when running it with subprocess, the output.mp4 file is not created. Here is the command: timeout 10 ffmpeg -video_size 1920x1080 -framerate 60 -f x11grab -i :0.0+0,0 -f alsa -ac 2 -i pulse -acodec aac -strict experimental output.mp4 Here is

subprocess not creating output file of ffmpeg command

只愿长相守 提交于 2021-02-17 02:18:21
问题 I am trying to run an ffmpeg command that records my screen and creates an .mp4 file of the recording in python. The command works when I run it in my shell, but is not working when I am running it in a Python script using subprocess. The issue is that when running it with subprocess, the output.mp4 file is not created. Here is the command: timeout 10 ffmpeg -video_size 1920x1080 -framerate 60 -f x11grab -i :0.0+0,0 -f alsa -ac 2 -i pulse -acodec aac -strict experimental output.mp4 Here is

【音视频连载-007】基础学习篇-SDL 播放 PCM 音频文件(上)

為{幸葍}努か 提交于 2021-02-16 16:26:34
公众号回复:OpenGL,领取学习资源大礼包 音视频学习入门技术文章连载: 技术开发故事会连载 【音视频连载-001】基础学习篇-SDL 介绍以及工程配置 【音视频连载-002】基础学习篇-SDL 创建窗口并显示颜色 【音视频连载-003】基础学习篇-SDL 消息循环和事件响应 【音视频连载-004】基础学习篇-SDL 加载图片并显示 【音视频连载-005】基础学习篇-SDL 加载 YUV 文件并显示 【音视频连载-006】基础学习篇-SDL 播放 YUV 视频文件 在前面的文章中已经能够利用 SDL 去播放 YUV 视频文件了,接下来要通过 SDL 去播放 PCM 音频文件。 SDL 播放音频文件有两种方法,可以理解成 推(push) 和 拉(pull) 两种模式。 推 就是我们主动向设备缓冲区填充 Buffer ,而 拉 就是由设备拉取 Buffer 填充到缓冲区。 在一些开发模型中,如果数据传递能够抽象成 流 的形式,那么肯定就会有 推 和 拉 两种模式。 本篇文章主要是讲解 SDL 以推的形式播放音频文件。 PCM 文件素材准备 首先还是得准备素材,做音视频相关实验就是这么麻烦~~ 找一个 mp3 文件,使用 FFmpeg 命令将它转换成 pcm 文件,方便的话可以直接使用代码仓库提供的 mp3 文件。 不像在视频播放中准备素材那样简单,音频文件对于参数的信息要求多一点

Pipe output of ffmpeg using nodejs stdout

五迷三道 提交于 2021-02-16 04:14:03
问题 I am not being able to pipe the output of the ffmpeg over a stdout. Following are the block of code what I coded so far. var http = require('http') , fs = require('fs') var child_process = require("child_process") http.createServer(function (req, res) { console.log("Request:", dump_req(req) , "\n") // path of the var path = 'test-mp4.mp4' //test-mp4-long.mp4 , stat = fs.statSync(path) , total = stat.size var range = req.headers.range , parts = range.replace(/bytes=/, "").split("-") ,

Pipe output of ffmpeg using nodejs stdout

断了今生、忘了曾经 提交于 2021-02-16 04:13:30
问题 I am not being able to pipe the output of the ffmpeg over a stdout. Following are the block of code what I coded so far. var http = require('http') , fs = require('fs') var child_process = require("child_process") http.createServer(function (req, res) { console.log("Request:", dump_req(req) , "\n") // path of the var path = 'test-mp4.mp4' //test-mp4-long.mp4 , stat = fs.statSync(path) , total = stat.size var range = req.headers.range , parts = range.replace(/bytes=/, "").split("-") ,

Pipe output of ffmpeg using nodejs stdout

徘徊边缘 提交于 2021-02-16 04:09:33
问题 I am not being able to pipe the output of the ffmpeg over a stdout. Following are the block of code what I coded so far. var http = require('http') , fs = require('fs') var child_process = require("child_process") http.createServer(function (req, res) { console.log("Request:", dump_req(req) , "\n") // path of the var path = 'test-mp4.mp4' //test-mp4-long.mp4 , stat = fs.statSync(path) , total = stat.size var range = req.headers.range , parts = range.replace(/bytes=/, "").split("-") ,

Pipe output of ffmpeg using nodejs stdout

◇◆丶佛笑我妖孽 提交于 2021-02-16 04:08:03
问题 I am not being able to pipe the output of the ffmpeg over a stdout. Following are the block of code what I coded so far. var http = require('http') , fs = require('fs') var child_process = require("child_process") http.createServer(function (req, res) { console.log("Request:", dump_req(req) , "\n") // path of the var path = 'test-mp4.mp4' //test-mp4-long.mp4 , stat = fs.statSync(path) , total = stat.size var range = req.headers.range , parts = range.replace(/bytes=/, "").split("-") ,

Discord bot python: discord.errors.ClientException: ffmpeg was not found

做~自己de王妃 提交于 2021-02-16 03:58:56
问题 I'm trying to make a discord bot that plays music in a voice channel. It connects to the voice channel, but doesn't play anything. It also gives an error in the console. I'm on Windows and I'm using the discord.py rewrite. My code: import discord, random, datetime, asyncio, nacl, ffmpeg TOKEN = 'What token' client = discord.Client() @client.event async def on_message(message): if message.content.lower() == '$play': if message.content.lower() == '$play': channel = client.get_channel

Discord bot python: discord.errors.ClientException: ffmpeg was not found

守給你的承諾、 提交于 2021-02-16 03:54:34
问题 I'm trying to make a discord bot that plays music in a voice channel. It connects to the voice channel, but doesn't play anything. It also gives an error in the console. I'm on Windows and I'm using the discord.py rewrite. My code: import discord, random, datetime, asyncio, nacl, ffmpeg TOKEN = 'What token' client = discord.Client() @client.event async def on_message(message): if message.content.lower() == '$play': if message.content.lower() == '$play': channel = client.get_channel

Discord bot python: discord.errors.ClientException: ffmpeg was not found

馋奶兔 提交于 2021-02-16 03:54:15
问题 I'm trying to make a discord bot that plays music in a voice channel. It connects to the voice channel, but doesn't play anything. It also gives an error in the console. I'm on Windows and I'm using the discord.py rewrite. My code: import discord, random, datetime, asyncio, nacl, ffmpeg TOKEN = 'What token' client = discord.Client() @client.event async def on_message(message): if message.content.lower() == '$play': if message.content.lower() == '$play': channel = client.get_channel