Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (68)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

Sur d’autres sites (6075)

  • How to convert an mp3 file to raw audio format using javascript

    4 octobre 2022, par Lord Bee

    I'm working on a project that involves song matching, so I am integrating with rapidApi's shazam endpoints. But the thing is, the song matching endpoint needs the audio snippet to be a base64 string of the audio in raw audio format. I know the API works. I downloaded a 3rd party application to do the conversion from mp3 to .raw, and converted it to base64 before making the request with it.

    


    Now, I need to integrate this flow programmatically. How do I convert an mp3 or any audio source really to a .raw file ? I've done a lot of searching but I can't find any solution.

    


  • How to take metadata from .mp3 file and put it to a video as a text using FFmpeg ?

    6 décembre 2020, par Grrzly

    In my previously opened topic :

    


    How to make FFmpeg automatically inject mp3 audio tracks in the single cycled muted video


    


    I've got detailed explanation from @llogan how to broadcast looped short muted video on youtube automatically injecting audio tracks in it without interrupting a translation.

    


    I plan to enhance the flow and the next question I faced with is how to dynamically put an additional text to the broadcast.

    


    Prerequisites :

    


      

    1. youtube broadcast is up and running by ffmpeg
    2. 


    3. short 3 min video is paying in infinity loop
    4. 


    5. audio tracks from playlist are automatically taken by "ffmpeg concat" and injected in the video one by one
    6. 


    


    this is a basic command to start translation :

    


    


    ffmpeg -re -fflags +genpts -stream_loop -1 -i video.mp4 -re -f concat
-i input.txt -map 0:v -map 1:a -c:v libx264 -tune stillimage -vf format=yuv420p -c:a copy -g 20 -b:v 2000k -maxrate 2000k -bufsize
8000k -f flv rtmp ://a.rtmp.youtube.com/live2/my-key

    


    


    Improvements I want to bring

    


      

    1. I plan to store some metadata in audio files (basically it's an artist name and a song name)
    2. 


    3. At the moment a particular song starts playing artist/song name should be taken from metadata and displayed on the video as text during the whole song is playing.
    4. 


    5. When the current song finishes and a new one starts playing the previous artist/song text should be replaced with the new one etc
    6. 


    


    My question is how to properly take metadata and add it to the existing broadcast config using ffmpeg ?

    


  • MediaPlayer miscalculates audio duration. getCurrentPosition() goes back when audio reaches the end

    26 mars 2017, par Kacy

    I’m streaming .ogg files from my server. The MediaPlayer plays the song to completion, but when it reaches the end of the song, getCurrentPosition() returns a time less than the actual duration of the song. For 1 song it’s only off by a second, but for another song it’s off by 13 seconds.

    I have a SeekBar that’s updated every second by calling getCurrentPosition(), and once the bar reaches the end, it actually jumps back a few seconds. And I can no longer use seekTo() into the segment of the song that’s past the miscalculated duration because I receive the error : Attempt to seek to past end of file.

    Chrome’s html video element simply displays the songs with the incorrect durations.

    Other tools like ffmpeg or this app on Windows 10 called PowerMediaPlayer both calculate the songs’ durations perfectly.

    I believe this problem is related to this answer, but the solution assumes ffmpeg also miscalculates the duration, which is not the case here. Using the -vn flag when converting audio files to ogg didn’t change anything.

    What are my options ? Is there a way to get the MediaPlayer to calculate the correct duration ?

    Update :

    Converting to mp3 has no issues (although I used audioBitrate('96k')instead of audioQuality(2), but I require a solution to get ogg files working. Below is how I’m using ffmpeg to perform the conversion. Another thing worth noting is that when I used 'vorbis' instead of 'libvorbis' for the codec the durations were off by less than a second, if at all. However, I must use 'libvorbis' because 'vorbis' is experimental and results in significanlty inconsistent bitrates across different files given the same audio quality parameter. (And it ignores audioBitrate() entirely.)

    ffmpeg( filepath )
       .toFormat( 'ogg' )
       .audioCodec( 'libvorbis' )
       .audioQuality( 2 )
       .output( destination )
       .run();