Recherche avancée

Médias (1)

Mot : - Tags -/wave

Autres articles (81)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (4661)

  • Empty audio backends for torchaudio list audio backends, with ffmpeg installed on system libraries [closed]

    28 mars, par Alberto Agudo Dominguez

    I installed torchaudio 2.5.1 and a system install of ffmpeg on Windows and get :

    


    PS C:\Users\> ffmpeg -version
ffmpeg version 2025-01-05-git-19c95ecbff-essentials_build-www.gyan.dev Copyright (c) 2000-2025 the FFmpeg developers
built with gcc 14.2.0 (Rev1, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
libavutil      59. 54.101 / 59. 54.101
libavcodec     61. 31.100 / 61. 31.100
libavfilter    10.  6.101 / 10.  6.101
libswresample   5.  4.100 /  5.  4.100
libpostproc    58.  4.100 / 58.  4.100

PS C:\Users\> python
Python 3.12.5 (tags/v3.12.5:ff3bc82, Aug  6 2024, 20:45:27) [MSC v.1940 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torchaudio
>>> torchaudio.list_audio_backends()
[]


    


    Hence ffmpeg is added to the path and recognized by the console, but not by torchaudio.

    


  • Stream H264 raw data on RTSP server

    1er janvier, par Aitazaz

    I have H264 hex string data saved in a list.
The data is in correct format as it is being received, I am trying to stream it to RTSP server.

    


    I have stream the data in realtime as it is from a dashcam.

    


    The RTSP server is deployed but when I stream frames to it, the connection is created and then ends in an instant (does not last for a second)

    


    The code is mentioned below which performs this streaming task.

    


    def h264_stream_to_rtsp(data_list, rtsp_url):
    try:
        ffmpeg_command = [
            "ffmpeg", 
            "-f", "h264",
            "-i", "-",
            "-vcodec", "libx264",
            "-preset", "fast",
            "-f", "rtsp",
            "-analyzeduration", "5000000",
            "-probesize", "5000000", 
            rtsp_url  # The RTSP URL to stream to
        ]
        
        ffmpeg_process = subprocess.Popen(ffmpeg_command, stdin=subprocess.PIPE)

        for index, hex_data in enumerate(data_list):
            # print(f"Processing hex data {index + 1}/{len(data_list)}...")

            if len(hex_data) % 2 != 0:
                hex_data = '0' + hex_data  # Append a leading zero if length is odd

            binary_data = binascii.unhexlify(hex_data)

            ffmpeg_process.stdin.write(binary_data)

        ffmpeg_process.stdin.close()

        ffmpeg_process.wait()
        print("Stream completed.")

    except KeyboardInterrupt:
        print("Stopping live stream.")
    except Exception as e:
        print(f"Error: {e}")


    


    Logs from the RTSP server are mentioned below :

    


    2025/01/01 10:56:04 INF [RTSP] [conn 20.174.9.78:35474] opened
2025/01/01 10:56:04 INF [RTSP] [session 1d2bb871] created by 20.174.9.78:35474
2025/01/01 10:56:04 INF [RTSP] [session 1d2bb871] is publishing to path 'live', 1 track (H264)
2025/01/01 10:56:04 INF [RTSP] [session 1d2bb871] destroyed: torn down by 20.174.9.78:35474
2025/01/01 10:56:04 INF [RTSP] [conn 20.174.9.78:35474] closed: EOF
2025/01/01 10:56:48 INF [RTSP] [conn 20.174.9.78:54448] opened
2025/01/01 10:56:48 INF [RTSP] [session b6a95e71] created by 20.174.9.78:54448
2025/01/01 10:56:48 INF [RTSP] [session b6a95e71] is publishing to path 'live', 1 track (H264)
2025/01/01 10:56:48 INF [RTSP] [session b6a95e71] destroyed: torn down by 20.174.9.78:54448


    


    How can I stream continuously ?

    


  • Can I use the file buffer or stream as input for fluent-ffmpeg ? I am trying to avoid saving the video locally to get its path before removing

    22 avril 2023, par Moath Thawahreh

    I am receiving the file via an api, I was trying to process the file.buffer as input for FFmpeg but it did not work, I had to save the video locally first and then process the path and remove the saved video later on.
I don't want to believe that there is no other way to solve this and I have been looking for solutions and workarounds but it was all about ffmpeg input as a path.

    


    I would love to find a solution using fluent-ffmpeg because it has some other great features, but I won't mind any suggestions for compressing the video using any different approaches if it's more efficient

    


    Again my code below works fine but I have to save the video and then remove it I am hoping for a more efficient solution :

    


      fs.writeFileSync(&#x27;temp.mp4&#x27;, file.buffer);&#xA;&#xA;    // Resize the temporary file using ffmpeg&#xA;    ffmpeg(&#x27;temp.mp4&#x27;) // here I tried pass file.buffer as readable stream,it receives paths only &#xA;      .format(&#x27;mp4&#x27;)&#xA;      .size(&#x27;50%&#x27;)&#xA;      .save(&#x27;resized.mp4&#x27;)&#xA;      .on(&#x27;end&#x27;, async () => {&#xA;        // Upload the resized file to Firebase&#xA;        const resizedFileStream = bucket.file(`video/${uniqueId}`).createWriteStream();&#xA;        fs.createReadStream(&#x27;resized.mp4&#x27;).pipe(resizedFileStream);&#xA;&#xA;        await new Promise<void>((resolve, reject) => {&#xA;          resizedFileStream&#xA;            .on(&#x27;finish&#x27;, () => {&#xA;              // Remove the local files after they have been uploaded&#xA;              fs.unlinkSync(&#x27;temp.mp4&#x27;);&#xA;              fs.unlinkSync(&#x27;resized.mp4&#x27;);&#xA;              resolve();&#xA;            })&#xA;            .on(&#x27;error&#x27;, reject);&#xA;        });&#xA;&#xA;        // Get the URL of the uploaded resized version&#xA;        const resizedFile = bucket.file(`video/${uniqueId}`);&#xA;        const url = await resizedFile.getSignedUrl({&#xA;          action: &#x27;read&#x27;,&#xA;          expires: &#x27;03-17-2025&#x27;, // Change this to a reasonable expiration date&#xA;        });&#xA;&#xA;        console.log(&#x27;Resized file uploaded successfully.&#x27;);&#xA;      })&#xA;      .on(&#x27;error&#x27;, (err) => {&#xA;        console.log(&#x27;An error occurred: &#x27; &#x2B; err.message);&#xA;      });&#xA;</void>

    &#xA;