Recherche avancée

Médias (10)

Mot : - Tags -/wav

Autres articles (21)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • 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

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

Sur d’autres sites (4868)

  • How to optimize FFMPEG/ Chromacast video ?

    5 août 2021, par Hasan

    Re-broadcast a live broadcast by chromecasting it. The code below delays 5 seconds.

    


    Server I use :
https://instances.vantage.sh/?selected=c5.2xlarge

    


    Can you help me optimize the code ?

    


    chromakey.sh

    


    
# Combine two files using a chromakey effects
filter_complex(){
  local videoWith="${1:-1920}"  # Video Size
  local videoHeight="${2:-1080}"  # Video Size
  local key="${3:-00FF00}"      # Colorkey colour - default vaue is 0000FF or green
  local colorSim="${4:-0.2}"    # Colorkey similarity level - default value is 0.2
  local colorBlend="${5:-0.1}"  # Colorkey blending level - default value is 0.1

  # Update color variable according to user input
  # This makes the matching case insensitive
  if [[ $3 =~ ^[0-9A-F]{6}$ ]]; then
    key=$3
  elif [[ $(tr "[:upper:]" "[:lower:]" <<<"$1")  = "blue" ]]; then
    key="0000FF"
  elif [[ $(tr "[:upper:]" "[:lower:]" <<<"$1")  = "green" ]]; then
    key="00FF00"
  elif [[ $(tr "[:upper:]" "[:lower:]" <<<"$1")  = "red" ]]; then
    key="FF0000"
  elif [[ $(tr "[:upper:]" "[:lower:]" <<<"$1")  = "purple" ]]; then
    key="0000FF"
  elif [[ $(tr "[:upper:]" "[:lower:]" <<<"$1")  = "orange" ]]; then
    key="ff9900"
  elif [[ $(tr "[:upper:]" "[:lower:]" <<<"$1")  = "yellow" ]]; then
    key="FFFF00"
  fi

  
  filterString="[1:v]scale=$videoWith x $videoHeight,chromakey=0 x $key:$colorSim:$colorBlend[ckout];[0:v]scale=(iw*sar)*max($videoWith/(iw*sar)\,$videoHeight/ih):ih*max($videoWith/(iw*sar)\,$videoHeight/ih), crop=$videoWith:$videoHeight[bg];[bg][ckout]overlay[out]"
  
  printf '%s%s%s%s%s' $filterString
}

ffmpeg -re -stream_loop -1 -i "${1}" -i "${2}" -preset ultrafast -filter_complex "$(filter_complex "${@:4}")" -map '[out]' -c:v libx264 -f flv "${3}"


    


    Usage : ./chromakey.sh mask.mp4 http://example.com/live/broadcast_orj rtmp ://example.com/live/broadcast_greenscreen 1920 1080 green 0.1 0.2

    


  • Curator of the Samples Archive

    13 mai 2011, par Multimedia Mike — General

    Remember how I mirrored the world-famous MPlayerHQ samples archive a few months ago ? Due to a series of events, the original archive is no longer online. However, me and the people who control the mplayerhq.hu domain figured out how to make samples.mplayerhq.hu point to samples.multimedia.cx.

    That means... I’m the current owner and curator of our central multimedia samples repository. Such power ! This should probably be the fulfillment of a decade-long dream for me, having managed swaths of the archive, most notably the game formats section.

    How This Came To Be

    If you pay any attention to the open source multimedia scene, you might have noticed that there has been a smidge of turmoil. Heated words were exchanged, authority was questioned, some people probably said some things they didn’t mean, and the upshot is that, where once there was one project (FFmpeg), there are now 2 projects (also Libav). And to everyone who has wanted me to mention it on my blog— there, I finally broke my silence and formally acknowledged the schism.

    For my part, I was just determined to ensure that the samples archive remained online, preferably at the original samples.mplayerhq.hu address. There are 10 years worth of web links out there pointing into the original repository.

    Better Solution

    I concede that it’s not entirely optimal to host the repository here at multimedia.cx. While I can offer a crazy amount of monthly bandwidth, I can’t offer rsync (invaluable for keeping mirrors in sync), nor can the server provide anonymous FTP or allow me to offer accounts to other admins who can manage the repository.

    The samples archive is also mirrored at samples.libav.org/samples. I understand that service is provided by VideoLAN. Right now, both repositories are known to be static. I’m open to brainstorms about how to improve the situation.

  • How to 'convert' MP3 file to numpy array or list

    30 mai 2021, par Ajayi Olamide

    I'm working on an audio-related project that connects with Django backend via rest api. Part of the front-end requires to display waveforms of associated mp3 files and for this, it in turn requires optimized data of each mp3 file in form of an array, which the front-end (javascript) then processes and converts to a waveform. I can pick the associated mp3 file from backend storage, the problem is converting it into an array which I can serve to the front-end api. I have tried several methods but none seem to be working. I tried this How to read a MP3 audio file into a numpy array / save a numpy array to MP3 ? which leaves my computer hanging until I forced it to restart by holding the power button down. I have a working ffmpeg and so, I have also tried this Trying to convert an mp3 file to a Numpy Array, and ffmpeg just hangs which continues to raise TypeError on np.fromstring(data[data.find("data")+4:], np.int16). I can't actually say what the problem is and I really hope someone can help. Thank you in advance !

    


    EDIT
This is the django view for retrieving the waveform data :

    


    NB : I've only included useful codes as I'm typing with my mobile phone.

    


    def waveform(self, request, ptype, id):
    project = Project.objects.get(pk=id)
    audio = project.audio

    mp3_path = os.path.join(cdn_dir, audio) 
    cmd = ['ffmpeg', '-i', mp3_path, '-f', 'wav', '-']
    p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, creationflags=0x8000000)
    data = p.communicate()[0]
    array = np.fromstring(data[data.find("data")+4:], np.int16)

    return Response(array)


    


    The TypeError I get is this :
TypeError: argument should be integer or bytes-like object, not "str"