Recherche avancée

Médias (1)

Mot : - Tags -/iphone

Autres articles (19)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (7102)

  • Using PyAV to encode mono audio to file, params match docs, but still causes Errno 22

    20 février 2023, par andrew8088

    While trying to use PyAV to encode live mono audio from a microphone to a compressed audio stream (using mp2 or flac as encoder), the program kept raising an exception ValueError: [Errno 22] Invalid argument.

    


    To remove the live microphone source as a cause of the problem, and to make the problematic code easier for others to run/test, I have removed the mic source and now just generate a pure tone as a sequence of input buffers.

    


    All attempts to figure out the missing or mismatched or incorrect argument have just resulted in seeing documentation and examples that are the same as my code.

    


    I would like to know from someone who has used PyAV successfully for mono audio what the correct method and parameters are for encoding mono frames into the mono stream.

    


    The package used is av 10.0.0 installed with
pip3 install av --no-binary av
so it uses my package-manager provided ffmpeg library, which is version 4.2.7.

    


    The problematic python code is :

    


    #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Recreating an error 22 when encoding sound with PyAV.

Created on Sun Feb 19 08:10:29 2023
@author: andrewm
"""
import typing
import sys
import math
import fractions

import av
from av import AudioFrame

""" Ensure some PyAudio constants are still defined without changing 
    the PyAudio recording callback function and without depending 
    on PyAudio simply for reproducing the PyAV bug [Errno 22] thrown in 
    File "av/filter/context.pyx", line 89, in av.filter.context.FilterContext.push
"""
class PA_Stub():
    paContinue = True
    paComplete= False

pyaudio = PA_Stub()


"""Generate pure tone at given frequency with amplitude 0...1.0 at 
   sampling frewuency fs and beginning at phase offset 'phase'.
   Returns the new phase after the sinusoid has cycled over the 
   sampling window length.
"""
def generate_tone(
        freq:int, phase:float, amp:float, fs, samp_fmt, buffer:bytearray
) -> float:
    assert samp_fmt == "s16", "Only s16 supported atm"
    samp_size_bytes = 2
    n_samples = int(len(buffer)/samp_size_bytes)
    window = [int(0) for i in range(n_samples)]
    theta = phase
    phase_inc = 2*math.pi * freq / fs
    for i in range(n_samples):
        v = amp * math.sin(theta)
        theta += phase_inc
        s = int((2**15-1)*v)
        window[i] = s
    for sample_i in range(len(window)):
        byte_i = sample_i * samp_size_bytes
        enc = window[sample_i].to_bytes(
                2, byteorder=sys.byteorder, signed=True
        )
        buffer[byte_i] = enc[0]
        buffer[byte_i+1] = enc[1]
    return theta


channels = 1
fs = 44100  # Record at 44100 samples per second
fft_size_samps = 256
chunk_samps = fft_size_samps * 10  # Record in chunks that are multiples of fft windows.

# print(f"fft_size_samps={fft_size_samps}\nchunk_samps={chunk_samps}")

seconds = 3.0
out_filename = "testoutput.wav"

# Store data in chunks for 3 seconds
sample_limit = int(fs * seconds)
sample_len = 0
frames = []  # Initialize array to store frames

ffmpeg_codec_name = 'mp2'  # flac, mp3, or libvorbis make same error.

sample_size_bytes = 2
buffer = bytearray(int(chunk_samps*sample_size_bytes))
chunkperiod = chunk_samps / fs
total_chunks = int(math.ceil(seconds / chunkperiod))
phase = 0.0

### uncomment if you want to see the synthetic data being used as a mic input.
# with open("test.raw","wb") as raw_out:
#     for ci in range(total_chunks):
#         phase = generate_tone(2600, phase, 0.8, fs, "s16", buffer)
#         raw_out.write(buffer)
# print("finished gen test")
# sys.exit(0)
# #---- 

# Using mp2 or mkv as the container format gets the same error.
with av.open(out_filename+'.mp2', "w", format="mp2") as output_con:
    output_con.metadata["title"] = "My title"
    output_con.metadata["key"] = "value"
    channel_layout = "mono"
    sample_fmt = "s16p"

    ostream = output_con.add_stream(ffmpeg_codec_name, fs, layout=channel_layout)
    assert ostream is not None, "No stream!"
    cctx = ostream.codec_context
    cctx.sample_rate = fs
    cctx.time_base = fractions.Fraction(numerator=1,denominator=fs)
    cctx.format = sample_fmt
    cctx.channels = channels
    cctx.layout = channel_layout
    print(cctx, f"layout#{cctx.channel_layout}")
    
    # Define PyAudio-style callback for recording plus PyAV transcoding.
    def rec_callback(in_data, frame_count, time_info, status):
        global sample_len
        global ostream
        frames.append(in_data)
        nsamples = int(len(in_data) / (channels*sample_size_bytes))
        
        frame = AudioFrame(format=sample_fmt, layout=channel_layout, samples=nsamples)
        frame.sample_rate = fs
        frame.time_base = fractions.Fraction(numerator=1,denominator=fs)
        frame.pts = sample_len
        frame.planes[0].update(in_data)
        print(frame, len(in_data))
        
        for out_packet in ostream.encode(frame):
            output_con.mux(out_packet)
        for out_packet in ostream.encode(None):
            output_con.mux(out_packet)
        
        sample_len += nsamples
        retflag = pyaudio.paContinue if sample_lencode>

    


    If you uncomment the RAW output part you will find the generated data can be imported as PCM s16 Mono 44100Hz into Audacity and plays the expected tone, so the generated audio data does not seem to be the problem.

    


    The normal program console output up until the exception is :

    


    mp2 at 0x7f8e38202cf0> layout#4
Beginning
 5120
. 5120


    


    The stack trace is :

    


    Traceback (most recent call last):&#xA;&#xA;  File "Dev/multichan_recording/av_encode.py", line 147, in <module>&#xA;    ret_data, ret_flag = rec_callback(buffer, ci, {}, 1)&#xA;&#xA;  File "Dev/multichan_recording/av_encode.py", line 121, in rec_callback&#xA;    for out_packet in ostream.encode(frame):&#xA;&#xA;  File "av/stream.pyx", line 153, in av.stream.Stream.encode&#xA;&#xA;  File "av/codec/context.pyx", line 484, in av.codec.context.CodecContext.encode&#xA;&#xA;  File "av/audio/codeccontext.pyx", line 42, in av.audio.codeccontext.AudioCodecContext._prepare_frames_for_encode&#xA;&#xA;  File "av/audio/resampler.pyx", line 101, in av.audio.resampler.AudioResampler.resample&#xA;&#xA;  File "av/filter/graph.pyx", line 211, in av.filter.graph.Graph.push&#xA;&#xA;  File "av/filter/context.pyx", line 89, in av.filter.context.FilterContext.push&#xA;&#xA;  File "av/error.pyx", line 336, in av.error.err_check&#xA;&#xA;ValueError: [Errno 22] Invalid argument&#xA;&#xA;</module>

    &#xA;

    edit : It's interesting that the error happens on the 2nd AudioFrame, as apparently the first one was encoded okay, because they are given the same attribute values aside from the Presentation Time Stamp (pts), but leaving this out and letting PyAV/ffmpeg generate the PTS by itself does not fix the error, so an incorrect PTS does not seem the cause.

    &#xA;

    After a brief glance in av/filter/context.pyx the exception must come from a bad return value from res = lib.av_buffersrc_write_frame(self.ptr, frame.ptr)
    &#xA;Trying to dig into av_buffersrc_write_frame from the ffmpeg source it is not clear what could be causing this error. The only obvious one is a mismatch between channel layouts, but my code is setting the layout the same in the Stream and the Frame. That problem had been found by an old question pyav - cannot save stream as mono and their answer (that one parameter required is undocumented) is the only reason the code now has the layout='mono' argument when making the stream.

    &#xA;

    The program output shows layout #4 is being used, and from https://github.com/FFmpeg/FFmpeg/blob/release/4.2/libavutil/channel_layout.h you can see this is the value for symbol AV_CH_FRONT_CENTER which is the only channel in the MONO layout.

    &#xA;

    The mismatch is surely some other object property or an undocumented parameter requirement.

    &#xA;

    How do you encode mono audio to a compressed stream with PyAV ?

    &#xA;

  • What permission ffmpeg-static need in AWS Lambda ?

    17 février 2023, par János

    I have this code. It download a image, made a video from it and upload it to S3. It runs on Lambda. Added packages, intalled, zipped, uploaded.

    &#xA;

    npm install --production&#xA;zip -r my-lambda-function.zip ./&#xA;

    &#xA;

    But get an error code 126

    &#xA;

    2023-02-17T09:27:55.236Z    5c845bb6-02c1-41b0-8759-4459591b57b0    INFO    Error: ffmpeg exited with code 126&#xA;    at ChildProcess.<anonymous> (/var/task/node_modules/fluent-ffmpeg/lib/processor.js:182:22)&#xA;    at ChildProcess.emit (node:events:513:28)&#xA;    at ChildProcess._handle.onexit (node:internal/child_process:291:12)&#xA;2023-02-17T09:27:55.236Z 5c845bb6-02c1-41b0-8759-4459591b57b0 INFO Error: ffmpeg exited with code 126 at ChildProcess.<anonymous> (/var/task/node_modules/fluent-ffmpeg/lib/processor.js:182:22) at ChildProcess.emit (node:events:513:28) at ChildProcess._handle.onexit (node:internal/child_process:291:12)&#xA;</anonymous></anonymous>

    &#xA;

    Do I need to set a specific premission for ffmpeg ?

    &#xA;

    import { PutObjectCommand, S3Client } from &#x27;@aws-sdk/client-s3&#x27;&#xA;import { fromNodeProviderChain } from &#x27;@aws-sdk/credential-providers&#x27;&#xA;import axios from &#x27;axios&#x27;&#xA;import pathToFfmpeg from &#x27;ffmpeg-static&#x27;&#xA;import ffmpeg from &#x27;fluent-ffmpeg&#x27;&#xA;import fs from &#x27;fs&#x27;&#xA;ffmpeg.setFfmpegPath(pathToFfmpeg)&#xA;const credentials = fromNodeProviderChain({&#xA;    clientConfig: {&#xA;        region: &#x27;eu-central-1&#x27;,&#xA;    },&#xA;})&#xA;const client = new S3Client({ credentials })&#xA;&#xA;export const handler = async (event, context) => {&#xA;    try {&#xA;        let body&#xA;        let statusCode = 200&#xA;        const query = event?.queryStringParameters&#xA;        if (!query?.imgId &amp;&amp; !query?.video1Id &amp;&amp; !query?.video2Id) {&#xA;            return&#xA;        }&#xA;&#xA;        const imgId = query?.imgId&#xA;        const video1Id = query?.video1Id&#xA;        const video2Id = query?.video2Id&#xA;        console.log(&#xA;            `Parameters received, imgId: ${imgId}, video1Id: ${video1Id}, video2Id: ${video2Id}`&#xA;        )&#xA;        const imgURL = getFileURL(imgId)&#xA;        const video1URL = getFileURL(`${video1Id}.mp4`)&#xA;        const video2URL = getFileURL(`${video2Id}.mp4`)&#xA;        const imagePath = `/tmp/${imgId}`&#xA;        const video1Path = `/tmp/${video1Id}.mp4`&#xA;        const video2Path = `/tmp/${video2Id}.mp4`&#xA;        const outputPath = `/tmp/${imgId}.mp4`&#xA;        await Promise.all([&#xA;            downloadFile(imgURL, imagePath),&#xA;            downloadFile(video1URL, video1Path),&#xA;            downloadFile(video2URL, video2Path),&#xA;        ])&#xA;        await new Promise((resolve, reject) => {&#xA;            console.log(&#x27;Input files downloaded&#x27;)&#xA;            ffmpeg()&#xA;                .input(imagePath)&#xA;                .inputFormat(&#x27;image2&#x27;)&#xA;                .inputFPS(30)&#xA;                .loop(1)&#xA;                .size(&#x27;1080x1080&#x27;)&#xA;                .videoCodec(&#x27;libx264&#x27;)&#xA;                .format(&#x27;mp4&#x27;)&#xA;                .outputOptions([&#xA;                    &#x27;-tune animation&#x27;,&#xA;                    &#x27;-pix_fmt yuv420p&#x27;,&#xA;                    &#x27;-profile:v baseline&#x27;,&#xA;                    &#x27;-level 3.0&#x27;,&#xA;                    &#x27;-preset medium&#x27;,&#xA;                    &#x27;-crf 23&#x27;,&#xA;                    &#x27;-movflags &#x2B;faststart&#x27;,&#xA;                    &#x27;-y&#x27;,&#xA;                ])&#xA;                .output(outputPath)&#xA;                .on(&#x27;end&#x27;, () => {&#xA;                    console.log(&#x27;Output file generated&#x27;)&#xA;                    resolve()&#xA;                })&#xA;                .on(&#x27;error&#x27;, (e) => {&#xA;                    console.log(e)&#xA;                    reject()&#xA;                })&#xA;                .run()&#xA;            &#xA;        })&#xA;        await uploadFile(outputPath, imgId &#x2B; &#x27;.mp4&#x27;)&#xA;            .then((url) => {&#xA;                body = JSON.stringify({&#xA;                    url,&#xA;                })&#xA;            })&#xA;            .catch((error) => {&#xA;                console.error(error)&#xA;                statusCode = 400&#xA;                body = error?.message ?? error&#xA;            })&#xA;        console.log(`File uploaded to S3`)&#xA;        const headers = {&#xA;            &#x27;Content-Type&#x27;: &#x27;application/json&#x27;,&#xA;            &#x27;Access-Control-Allow-Headers&#x27;: &#x27;Content-Type&#x27;,&#xA;            &#x27;Access-Control-Allow-Origin&#x27;: &#x27;https://tikex.com, https://borespiac.hu&#x27;,&#xA;            &#x27;Access-Control-Allow-Methods&#x27;: &#x27;GET&#x27;,&#xA;        }&#xA;        return {&#xA;            statusCode,&#xA;            body,&#xA;            headers,&#xA;        }&#xA;    } catch (error) {&#xA;        console.error(error)&#xA;        return {&#xA;            statusCode: 500,&#xA;            body: JSON.stringify(&#x27;Error fetching data&#x27;),&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;const downloadFile = async (url, path) => {&#xA;    try {&#xA;        console.log(`Download will start: ${url}`)&#xA;        const response = await axios(url, {&#xA;            responseType: &#x27;stream&#x27;,&#xA;        })&#xA;        if (response.status !== 200) {&#xA;            throw new Error(&#xA;                `Failed to download file, status code: ${response.status}`&#xA;            )&#xA;        }&#xA;        response.data&#xA;            .pipe(fs.createWriteStream(path))&#xA;            .on(&#x27;finish&#x27;, () => console.log(`File downloaded to ${path}`))&#xA;            .on(&#x27;error&#x27;, (e) => {&#xA;                throw new Error(`Failed to save file: ${e}`)&#xA;            })&#xA;    } catch (e) {&#xA;        console.error(`Error downloading file: ${e}`)&#xA;    }&#xA;}&#xA;const uploadFile = async (path, id) => {&#xA;    const buffer = fs.readFileSync(path)&#xA;    const params = {&#xA;        Bucket: &#x27;t44-post-cover&#x27;,&#xA;        ACL: &#x27;public-read&#x27;,&#xA;        Key: id,&#xA;        ContentType: &#x27;video/mp4&#x27;,&#xA;        Body: buffer,&#xA;    }&#xA;    await client.send(new PutObjectCommand(params))&#xA;    return getFileURL(id)&#xA;}&#xA;const getFileURL = (id) => {&#xA;    const bucket = &#x27;t44-post-cover&#x27;&#xA;    const url = `https://${bucket}.s3.eu-central-1.amazonaws.com/${id}`&#xA;    return url&#xA;}&#xA;

    &#xA;

    Added AWSLambdaBasicExecutionRole-16e770c8-05fa-4c42-9819-12c468cb5b49 permission, with policy :

    &#xA;

    {&#xA;    "Version": "2012-10-17",&#xA;    "Statement": [&#xA;        {&#xA;            "Effect": "Allow",&#xA;            "Action": "logs:CreateLogGroup",&#xA;            "Resource": "arn:aws:logs:eu-central-1:634617701827:*"&#xA;        },&#xA;        {&#xA;            "Effect": "Allow",&#xA;            "Action": [&#xA;                "logs:CreateLogStream",&#xA;                "logs:PutLogEvents"&#xA;            ],&#xA;            "Resource": [&#xA;                "arn:aws:logs:eu-central-1:634617701827:log-group:/aws/lambda/promo-video-composer-2:*"&#xA;            ]&#xA;        },&#xA;        {&#xA;            "Effect": "Allow",&#xA;            "Action": [&#xA;                "s3:GetObject",&#xA;                "s3:PutObject",&#xA;                "s3:ListBucket"&#xA;            ],&#xA;            "Resource": [&#xA;                "arn:aws:s3:::example-bucket",&#xA;                "arn:aws:s3:::example-bucket/*"&#xA;            ]&#xA;        },&#xA;        {&#xA;            "Effect": "Allow",&#xA;            "Action": [&#xA;                "logs:CreateLogGroup",&#xA;                "logs:CreateLogStream",&#xA;                "logs:PutLogEvents"&#xA;            ],&#xA;            "Resource": [&#xA;                "arn:aws:logs:*:*:*"&#xA;            ]&#xA;        },&#xA;        {&#xA;            "Effect": "Allow",&#xA;            "Action": [&#xA;                "ec2:DescribeNetworkInterfaces"&#xA;            ],&#xA;            "Resource": [&#xA;                "*"&#xA;            ]&#xA;        },&#xA;        {&#xA;            "Effect": "Allow",&#xA;            "Action": [&#xA;                "sns:*"&#xA;            ],&#xA;            "Resource": [&#xA;                "*"&#xA;            ]&#xA;        },&#xA;        {&#xA;            "Effect": "Allow",&#xA;            "Action": [&#xA;                "cloudwatch:*"&#xA;            ],&#xA;            "Resource": [&#xA;                "*"&#xA;            ]&#xA;        },&#xA;        {&#xA;            "Effect": "Allow",&#xA;            "Action": [&#xA;                "kms:Decrypt"&#xA;            ],&#xA;            "Resource": [&#xA;                "*"&#xA;            ]&#xA;        }&#xA;    ]&#xA;}&#xA;

    &#xA;

    What do I miss ?

    &#xA;

    janoskukoda@Janoss-MacBook-Pro promo-video-composer-2 % ls -l $(which ffmpeg)&#xA;lrwxr-xr-x  1 janoskukoda  admin  35 Feb 10 12:50 /opt/homebrew/bin/ffmpeg -> ../Cellar/ffmpeg/5.1.2_4/bin/ffmpeg&#xA;

    &#xA;

  • FFmpegAudio object has no attribute _process

    28 janvier 2023, par Benjamin Tsoumagas

    I'm trying to make a Discord music bot that is remotely hosted and to do that I need ffmpeg to work. I was able to add it using my Dockerfile but upon trying to play music with the bot I get the following errors. For context, I am hosting on Fly.io and using python with the Nextcord library. Below is my relevant code and the error message. Please let me know if any more information is required.

    &#xA;

    import nextcord, os, json, re, youtube_dl&#xA;from nextcord import Interaction, application_checks&#xA;from nextcord.ext import commands&#xA;&#xA;youtube_dl.utils.bug_reports_message = lambda: &#x27;&#x27;&#xA;&#xA;ytdl_format_options = {&#xA;    "format": "bestaudio/best",&#xA;    &#x27;outtmpl&#x27;: &#x27;%(extractor)s-%(id)s-%(title)s.%(ext)s&#x27;,&#xA;    &#x27;restrictfilenames&#x27;: True,&#xA;    &#x27;noplaylist&#x27;: True,&#xA;    &#x27;nocheckcertificate&#x27;: True,&#xA;    &#x27;ignoreerrors&#x27;: False,&#xA;    &#x27;logtostderr&#x27;: False,&#xA;    &#x27;quiet&#x27;: True,&#xA;    &#x27;no_warnings&#x27;: True,&#xA;    &#x27;default_search&#x27;: &#x27;auto&#x27;,&#xA;    &#x27;source_address&#x27;: &#x27;0.0.0.0&#x27;,&#xA;}&#xA;&#xA;ffmpeg_options = {"options": "-vn"}&#xA;&#xA;ytdl = youtube_dl.YoutubeDL(ytdl_format_options)&#xA;&#xA;class YTDLSource(nextcord.PCMVolumeTransformer):&#xA;    def __init__(self, source, *, data, volume=0.5):&#xA;        super().__init__(source, volume)&#xA;        self.data = data&#xA;        self.title = data.get("title")&#xA;        self.url = data.get("url")&#xA;&#xA;    @classmethod&#xA;    async def from_url(cls, url, *, loop=None, stream=False):&#xA;        loop = loop or asyncio.get_event_loop()&#xA;        data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download=not stream))&#xA;&#xA;        if "entries" in data:&#xA;            data = data["entries"][0]&#xA;        &#xA;        filename = data["url"] if stream else ytdl.prepare_filename(data)&#xA;        return cls(nextcord.FFmpegAudio(filename, *ffmpeg_options), data=data)&#xA;&#xA;async def ensure_voice(interaction: Interaction):&#xA;    if interaction.guild.voice_client is None:&#xA;        if interaction.user.voice:&#xA;            await interaction.user.voice.channel.connect()&#xA;        else:&#xA;            await interaction.send("You are not connected to a voice channel.")&#xA;            raise commands.CommandError("Author not connected to a voice channel.")&#xA;    elif interaction.guild.voice_client.is_playing():&#xA;        interaction.guild.voice_client.stop()&#xA;&#xA;class Music(commands.Cog, name="Music"):&#xA;    """Commands for playing music in voice channels"""&#xA;&#xA;    COG_EMOJI = "&#127925;"&#xA;&#xA;    def __init__(self, bot):&#xA;        self.bot = bot&#xA;    &#xA;    @application_checks.application_command_before_invoke(ensure_voice)&#xA;    @nextcord.slash_command()&#xA;    async def play(self, interaction: Interaction, *, query):&#xA;        """Plays a file from the local filesystem"""&#xA;&#xA;        source = nextcord.PCMVolumeTransformer(nextcord.FFmpegPCMAudio(query))&#xA;        interaction.guild.voice_client.play(source, after=lambda e: print(f"Player error: {e}") if e else None)&#xA;&#xA;        await interaction.send(f"Now playing: {query}")&#xA;&#xA;    @application_checks.application_command_before_invoke(ensure_voice)&#xA;    @nextcord.slash_command()&#xA;    async def yt(self, interaction: Interaction, *, url):&#xA;        """Plays from a URL (almost anything youtube_dl supports)"""&#xA;&#xA;        async with interaction.channel.typing():&#xA;            player = await YTDLSource.from_url(url, loop=self.bot.loop)&#xA;            interaction.guild.voice_client.play(&#xA;                player, after=lambda e: print(f"Player error: {e}") if e else None&#xA;            )&#xA;&#xA;        await interaction.send(f"Now playing: {player.title}")&#xA;&#xA;    @application_checks.application_command_before_invoke(ensure_voice)&#xA;    @nextcord.slash_command()&#xA;    async def stream(self, interaction: Interaction, *, url):&#xA;        """Streams from a URL (same as yt, but doesn&#x27;t predownload)"""&#xA;&#xA;        async with interaction.channel.typing():&#xA;            player = await YTDLSource.from_url(url, loop=self.bot.loop, stream=True)&#xA;            interaction.voice_client.play(&#xA;                player, after=lambda e: print(f"Player error: {e}") if e else None&#xA;            )&#xA;&#xA;        await interaction.send(f"Now playing: {player.title}")&#xA;&#xA;def setup(bot):&#xA;    bot.add_cog(Music(bot))&#xA;

    &#xA;

    2023-01-28T23:16:15Z app[7d3b734a] yyz [info]Exception ignored in: <function at="at" 0x7fa78ea61fc0="0x7fa78ea61fc0">&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]Traceback (most recent call last):&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]  File "/usr/local/lib/python3.10/site-packages/nextcord/player.py", line 116, in __del__&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]    self.cleanup()&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]  File "/usr/local/lib/python3.10/site-packages/nextcord/player.py", line 235, in cleanup&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]    self._kill_process()&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]  File "/usr/local/lib/python3.10/site-packages/nextcord/player.py", line 191, in _kill_process&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]AttributeError: &#x27;FFmpegA&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]AttributeError: &#x27;FFmpegA&#xA;dio&#x27; object has no attribute &#x27;_process&#x27;&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]Ignoring exception in command :&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]Traceback (most recent call last):&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]  File "/usr/local/lib/python3.10/site-packages/nextcord/application_command.py", line 863, in invoke_callback_with_hooks&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]    await self(interaction, *args, **kwargs)&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]  File "/main/cogs/music.py", line 153, in yt&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]    player = await YTDLSource.from_url(url, loop=self.bot.loop)&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]  File "/main/cogs/music.py", line 71, in from_url    &#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]    return cls(nextcord.FFmpegAudio(filename, *ffmpeg_options), data=data)&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]&#xA;The above exception was the direct cause of the following exception:&#xA;&#xA;re given&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]The above exception was the direct cause of the following exception:&#xA;2023-01-28T23:16:15Z app[7d3b734a] yyz [info]nextcord.errors.ApplicationInvokeError: Command raised an exception: TypeError: FFmpegAudio.__init__() takes 2 positional arguments but 3 were given     &#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]Exception ignored in: <function at="at" 0x7fa78ea61fc0="0x7fa78ea61fc0">&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]Traceback (most recent call last):&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]  File "/usr/local/lib/python3.10/site-packages/nextcord/player.py", line 116, in __del__&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]    self.cleanup()&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]  File "/usr/local/lib/python3.10/site-packages/nextcord/player.py", line 235, in cleanup&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]    self._kill_process()&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]  File "/usr/local/lib/python3.10/site-packages/nextcord/player.py", line 191, in _kill_process&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]    proc = self._process&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]AttributeError: &#x27;FFmpegAudio&#x27; object has no attribute &#xA;&#x27;_process&#x27;&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]Ignoring exception in command :&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]Traceback (most recent call last):&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]  File "/usr/local/lib/python3.10/site-packages/nextcord/application_command.py", line 863, in invoke_callback_with_hooks&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]    await self(interaction, *args, **kwargs)&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]  File "/main/cogs/music.py", line 153, in yt&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]    player = await YTDLSource.from_url(url, loop=self.bot.loop)&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]  File "/main/cogs/music.py", line 71, in from_url    &#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]    return cls(nextcord.FFmpegAudio(filename, *ffmpeg_options), data=data)&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]TypeError: FFmpegAudio.__init__() takes 2 positional arguments but 3 were given&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]The above exception was the direct cause of the following exception:&#xA;2023-01-28T23:16:19Z app[7d3b734a] yyz [info]nextcord.errors.ApplicationInvokeError: Command raised an exception: TypeError: FFmpegAudio.__init__() takes 2 positional arguments but 3 were given&#xA;</function></function>

    &#xA;

    Similar posts have been made but their issues were typos in changing 'option' : '-vn' to 'options' : '-vn'. I've combed through for any other errors but I can't find any. I was hoping to see I made a similar mistake, but this is the template I was following from the Nextcord developers and I had no luck :

    &#xA;