Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (85)

  • 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

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (9482)

  • C# Windows Forms Using FFMPEG to change video format got no response

    21 mai 2023, par TSLee

    I am trying to make an exe program to change a video format by using FFMPEG instead of doing it in the terminal. The formatted video will be saved in the download folder. I have tried my code below and got no output response. I wonder if I used process() and StartInfo correctly, as examples I found and the documentation just confused me. I have double-checked the ffmpeg.exe is in the bin folder and the StartInfo() is just for getting information, which is under Process(). This is why Process() can access the information and use Start() to start the process. Please help and correct my understanding.
Below is part of my code :

    


    private void convertButton_Click(object sender, EventArgs e)
    {
        String input = filepathTextBox.Text;
        String outputResolution = resolutionLabel.Text;
        String output;
        String outputFileType;
        int inputLength = input.Length;
        int l = 0;
        for (int i = (inputLength - 1); inputLength > -1; i--)
        {
            if (input[i] == '.')
            {
                l = i;
                break;
            }
        }
        output = input.Substring(0, l - 1);
        outputFileType = input.Substring(l + 1, inputLength - 1);
        Process process = new Process();
        process.StartInfo.UseShellExecute = true;
        process.StartInfo.FileName = "ffmpeg.exe";
        process.StartInfo.WorkingDirectory = @"C:\Users\User\Downloads\ffmpeg-2023-05-15-git-2953ebe7b6-full_build\bin";
        process.StartInfo.Arguments = "ffmpeg -i" + @"C:\Users\User\Downloads\file_example_MP4_640_3MG.mp4" + "-s 320x240 -r 25 -b:v 500000 -pix_fmt yuv420p -c:v libx264     -vprofile baseline -level  2.1 -x264opts  stitchable=1:level=3.0:keyint=15:ref=1:merange=16:mvrange=32 -acodec pcm_s16le -ar 16000 -ac 1" + @"C:\Users\User\Downloads\440.mp4";
        process.Start();
    }


    


    Output :
"myprogram.exe(CoreCLR : clrhost) : Loaded 'C :\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.15\System.Diagnostics.Process.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled."
The thread 0x79e0 has exited with code 0 (0x0).

    


  • /bin/sh : ffmpeg : command not found while merge audio with with using ffmpeg aws lamda [duplicate]

    1er mai 2023, par bhavesh kaila

    I am trying to merge audio with video using the below command in AWS lambda using Python but the getting and below error.

    


    ffmpeg Command

    


    cmd = 'ffmpeg  -stream_loop -1 -i mayur.mp4 -i audio.mp3 -shortest -map 0:v:0 -map 1:a:0 -y out/output.mp4'
subprocess.call(cmd, shell=True) 


    


    Aws Lambda Error

    


    2023-05-01T16:08:18.591+05:30   INIT_START Runtime Version: python:3.10.v2 Runtime Version ARN: arn:aws:lambda:eu-north-1::runtime:7764dc7f3ff1fc45718f596be4cd03d7bca223f0586f3bfa5fe6584d6af81cd8

2023-05-01T16:08:19.631+05:30   START RequestId: 4557a174-e12c-4924-971a-ef8f852b106b Version: $LATEST

2023-05-01T16:08:22.286+05:30

Copy
/bin/sh: ffmpeg: command not found
/bin/sh: ffmpeg: command not found

2023-05-01T16:08:23.926+05:30   [ERROR] FileNotFoundError: [Errno 2] No such file or directory: '/tmp/output.mp4' Traceback (most recent call last):   File "/var/task/lambda_function.py", line 65, in lambda_handler     s3_upload_response = s3.put_object(Bucket=bucket, Body=open('/tmp/output.mp4', 'rb'), Key =filename)

2023-05-01T16:08:23.929+05:30   END RequestId: 4557a174-e12c-4924-971a-ef8f852b106b


    


    Full Code snippet

    


    import json
from gtts import gTTS
import openpyxl
import boto3
import base64
import openai
import os
import random
import ffmpeg
import subprocess

# os.system("cp -ra bin/ffmpeg /tmp/")
# os.system("chmod -R 775 /tmp")

#from botocore.vendored import requests
language = 'en'
def lambda_handler(event, context):
    input1 = event["queryStringParameters"]['question']
    outputText=""
    
    # Define variable to load the dataframe
    dataframe = openpyxl.load_workbook('QNA/Book1.xlsx')
    
      #accesskey and secretkey for the S3 bucket
    accesskey = os.getenv("access_key")
    secretkey = os.getenv("secret_key")
    
    # Define variable to read sheet
    ws = dataframe['Sheet1']
    
    for row in ws.iter_rows(0,dataframe.active.max_row):
        for cell in row:
          #print(cell.value)
          if input1 in str(cell.value):
            outputText=row[1].value
  
    
    
      #Save Audio File
    audio = gTTS(text=outputText, lang=language, slow=False)
    audio.save("/tmp/audio.mp3")
    
    cmd='ffmpeg -stream_loop -1 -i QNA/mayur.mp4 -i tmp/audio.mp3 -shortest -map 0:v:0 -map 1:a:0 -y tmp/output.mp4'
    subprocess.run(cmd, shell=True)


    


    Note : I Download the static library from Here and added it to the python folder and generate python.zip with other dependencies and upload it on the aws layer and the AWS layer is linked with the python function.

    


    Note : Above code is working fine with google codelab and is able to generate a merged video working fine.

    


    Any help would be appriciated

    


  • Python : FFmpeg Input/output error using discord.py

    29 mai 2023, par PeeblYweeb

    here is my code :

    


       async def direct(self, interaction: discord.Interaction, link: str):
        voice_client = get(self.bot.voice_clients, guild=interaction.guild)
        if voice_client is None:
            return await interaction.response.send_message("❌ Connect to a channel first.")

        await interaction.response.send_message("Using direct link.")
        voice_client.play(discord.FFmpegPCMAudio(link))
        return


    


    here is my error :

    


    [tls @ 0x557c73a19d00] Error in the pull function.
https://cdn.discordapp.com/attachments/1109998398150545410/1112473248505004142/portradio-_1_.ogg: Input/output error
2023-05-28 13:29:11 INFO     discord.player ffmpeg process 1458408 successfully terminated with return code of 0.


    


    this happens usually around half-way through whatever im playing consistently

    


    i've tried setting arguments like :

    


    ffmpeg_options = {'options': '-vn -dn -sn -ignore_unknown -fflags +discardcorrupt'}


    


    from this other post
’corrupt input packet in stream 1’ error in FFMPEG
which fixed the error corrupt input packet but im still having trouble any ideas ?

    


    goal is to get the audio playing to discord without having to store the file locally then playing it from there then discarding it after.