Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (56)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (8539)

  • python for loop result in ffmpeg command

    6 août 2020, par madiha bout

    hi im trying to insert for loop results in a ffmpeg command i tried some code but all i get is first text with no sound and it glitches and freezes i tried many modification but no success i appreciate if you have any ideas that would be great, the imported text from api should display only the duration of audio file here is my code :

    


    
import requests
import json
import os
import requests
import http.client
import io
import subprocess


response = requests.get('http://api.quran.com:3000/api/v3/chapters/2/verses?text_type=image&language=ar&recitation=10')

json = json.loads(response.content)

data= json['verses']
#print(data)

for i in data:
    input_text = i['text_madani'] 
    input_duration = i['audio']['duration'] 
    input_mp3 = i['audio']['url']
    input_img = i['image']['url']
 #   print(input_duration)
    command = f'''ffmpeg -re -stream_loop -1 \
                    -i img2.jpeg \
                    -i {input_mp3} \
                    -vf 'pad=ceil(iw/2)*2:ceil(ih/2)*2,drawtext=enable='between(t, n, {input_duration})':text={input_text}:fontsize=90:x=50:y=50:fontcolor=black@0.8' \
                    -c:v libx264 -preset veryfast -b:v 3000k \
                    -maxrate 3000k -bufsize 6000k -pix_fmt yuv420p -g 50 \
                    -c:a aac -b:a 160k \
                    -ac 2 -ar 44100 \
                    -y -f flv rtmp://localhost/hls/test''' 
    print(command)
    os.system(command)


    


  • How to Use FFmpeg to Fetch an Audio From Local Network and Decode it to PCM ?

    26 mai 2020, par Yousef Alaqra

    Currently, I have a node js server which is connected to a specific IP address on the local network (the source of the audio), to receive the audio using VBAN protocol. VBAN protocol, basically uses UDP to send audio over the local network.

    



    Node js implementation :

    



    http.listen(3000, () => {
  console.log("Server running on port 3000");
});

let PORT = 6980;
let HOST = "192.168.1.244";

io.on("connection", (socket) => {
  console.log("a user connected");
  socket.on("disconnect", () => {
    console.log("user disconnected");
  });
});

io.on("connection", () => {

  let dgram = require("dgram");
  let server = dgram.createSocket("udp4");

  server.on("listening", () => {
    let address = server.address();
    console.log("server host", address.address);
    console.log("server port", address.port);
  });

  server.on("message", function (message, remote) {
    let audioData = vban.ProcessPacket(message);
    io.emit("audio", audioData); // // console.log(`Received packet: ${remote.address}:${remote.port}`)
  });
  server.bind({
    address: "192.168.1.230",
    port: PORT,
    exclusive: false,
  });
});


    



    once the server receives a package from the local network, it processes the package, then, using socket.io it emits the processed data to the client.

    



    An example of the processed audio data that's being emitted from the socket, and received in the angular :

    



         audio {&#xA;      format: {&#xA;        channels: 2,&#xA;        sampleRate: 44100,&#xA;        interleaved: true,&#xA;        float: false,&#xA;        signed: true,&#xA;        bitDepth: 16,&#xA;        byteOrder: &#x27;LE&#x27;&#xA;      },&#xA;      sampleRate: 44100,&#xA;      buffer: <buffer 2e="2e" 00="00" ce="ce" ff="ff" 3d="3d" bd="bd" 44="44" b6="b6" 48="48" c3="c3" 32="32" d3="d3" 31="31" d4="d4" 30="30" dd="dd" 38="38" 34="34" e5="e5" 1d="1d" c6="c6" 25="25" 974="974" more="more" bytes="bytes">,&#xA;      channels: 2,&#xA;}&#xA;</buffer>

    &#xA;&#xA;

    In the client-side (Angular), after receiving a package using socket.io.clinet, AudioConetext is used to decode the audio and play it :

    &#xA;&#xA;

       playAudio(audioData) {&#xA;    let audioCtx = new AudioContext();&#xA;    let count = 0;&#xA;    let offset = 0;&#xA;    let msInput = 1000;&#xA;    let msToBuffer = Math.max(50, msInput);&#xA;    let bufferX = 0;&#xA;    let audioBuffer;&#xA;    let prevFormat = {};&#xA;    let source;&#xA;&#xA;    if (!audioBuffer || Object.keys(audioData.format).some((key) => prevFormat[key] !== audioData.format[key])) {&#xA;      prevFormat = audioData.format;&#xA;      bufferX = Math.ceil(((msToBuffer / 1000) * audioData.sampleRate) / audioData.samples);&#xA;      if (bufferX &lt; 3) {&#xA;        bufferX = 3;&#xA;      }&#xA;      audioBuffer = audioCtx.createBuffer(audioData.channels, audioData.samples * bufferX, audioData.sampleRate);&#xA;      if (source) {&#xA;        source.disconnect();&#xA;      }&#xA;      source = audioCtx.createBufferSource();&#xA;      console.log("source", source);&#xA;      source.connect(audioCtx.destination);&#xA;      source.loop = true;&#xA;      source.buffer = audioBuffer;&#xA;      source.start();&#xA;    }&#xA;  }&#xA;

    &#xA;&#xA;

    Regardless that audio isn't playing in the client-side, and there is something wrong, this isn't the correct implementation.

    &#xA;&#xA;

    Brad, mentioned in the comments below, that I can implement this correctly and less complexity using FFmpeg child-process. And I'm very interested to know how to fetch the audio locally using FFmpeg.

    &#xA;

  • How do I formate spaces in terminal for FFMPEG metadata

    22 juillet 2020, par pbendevis

    I can't get FFMPEG to accept any spaces when I try to assign it to the metadata. Below is the command I am using in Terminal on MacOS. It gives me an error : [NULL @ 0x7fce76026600] Unable to find a suitable output format for &#x27;World&#x27; World: Invalid argument

    &#xA;

    ffmpeg -hide_banner \&#xA;-i Trolls.World.Tour.2020.Bluray-2160p.m2ts \&#xA;-ss 00:10:00 -t 00:1:00 \&#xA;-pix_fmt yuv420p10le \&#xA;-map_chapters 0 \&#xA;-metadata:s:t:0 filename="" -metadata:s:t:0 mimetype="image/jpeg" \&#xA;-metadata title=“Trolls World Tour” \&#xA;-map 0:0 -metadata:s:v:0 language=eng -metadata:s:v:0 title=“Trolls World Tour” \&#xA;-map 0:2 -metadata:s:a:0 language=eng -metadata:s:a:0 title=“Dolby TrueHD 7.1 Atmos” \&#xA;-map 0:6 -metadata:s:a:0 language=eng -metadata:s:a:1 title=“AC-3 2.0” \&#xA;-c:v libx265 -preset slow -crf 16 \&#xA;-x265-params keyint=60:bframes=3:vbv-bufsize=75000:vbv-maxrate=75000:hdr-opt=1:repeat-headers=1:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:master-display="G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,500)" \&#xA;-c:a copy \&#xA;Trolls.World.Tour.2020.2160p.BluRay.REMUX.HEVC.TrueHD.7.1.Atmos.mkv&#xA;

    &#xA;

    I have tried &#x27;title="Trolls World Tour"&#x27; title=Trolls" "World" "Tour to no luck.

    &#xA;

    Using title="Trolls\ World\ Tour" works but then the title includes the backslashes.

    &#xA;

    Any thoughts ?

    &#xA;