Recherche avancée

Médias (1)

Mot : - Tags -/3GS

Autres articles (48)

  • 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 (...)

  • Initialisation de MediaSPIP (préconfiguration)

    20 février 2010, par

    Lors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
    Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
    Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
    Dans un premier temps il active ou désactive des options de SPIP qui ne 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 (8069)

  • Using FFmpeg to detect alpha channel in PR4444 file [closed]

    8 décembre 2023, par Justin Myers

    I wanted to comment on a thread that already exists on this topic in general, but I just signed up to SO and have not earned my contribution credits yet ! If anyone has advice on how to better handle that in the future, I am all ears !!

    


    None-the-less, here is that thread :

    


    A good way to detect alpha channel in a video using ffmpeg/ffprobe

    


    I tried both the answers listed in that post to detect the presence of an alpha channel in a PR4444 video file.

    


    For Gyan's answer, I get the following pixel format from any PR4444 file (regardless if encoded with alpha or no alpha), when running part 1 :

    


    yuva444p12le

    


    As you will see in Gyan's notes, even if a FFprobe returns an "a" in the return string (for the call for pixel format), that does not equate to the presence of an alpha channel. Hence their note for the subsequent (part 2) call...

    


    I then plugged that into the part 2 of Gyan's answer, but that produced an empty from FFmpeg, and a message providing valid arguments to pair with grep. It seems as though -oP is not a valid arg for grep ? Because it wasn't listed in the returned list of options. This is the template I used (pulled verbatim from Gyan's posted solution) :

    


    ffprobe -v 0 -show_entries pixel_format=name:flags=alpha -of compact=p=0 | grep "$PIX_FMT|" | grep -oP "(?<=alpha=)\d"

    &#xA;

    Where $PIX_FMT is to be replaced with yuva444p121e (per Gyan's instructions).

    &#xA;

    I then tried Benji's solution for part 2, but that just returns the following :

    &#xA;

    pix_fmt=yuva444p12le

    &#xA;

    Of course, this isn't any more useful than part 1...

    &#xA;

    I suspect Gyan is on the right track as he mentions part 2 should produce a boolean result for the presence of an alpha channel. However, either I am misunderstanding the syntax of his template, or something has changed in FFprobe since. There is so limited information out there for this specific task. Hoping someone with more experience and knowledge can help shed some light for me ??

    &#xA;

  • Matplotlib animation error : Requested MovieWriter (ffmpeg) not available, while ffmpeg is installed

    3 juillet 2020, par Vivien Bonnot

    I'm trying to animate colormapping representations of parametric complex fonctions using Python.&#xA;I gradually put some things together, and checked that they worked properly. But I can't get the animation to be saved.

    &#xA;

    I encountered this error :

    &#xA;

    Requested MovieWriter (ffmpeg) not available

    &#xA;

    However, ffmpeg is indeed installed on my system,&#xA;on Windows console ffmpeg -version returns all sorts of informations about ffmpeg. Additionnaly, I also installed ffmpeg in Python scripts directory using pip pip install ffmpeg, which was successfull. I also set up ffmepg path in my code : plt.rcParams[&#x27;animation.ffmpeg_path&#x27;] = "C:\FFmpeg\bin\ffmpeg.exe"

    &#xA;

    I'm runing out of ideas.

    &#xA;

    Here is my code.&#xA;Thank you for reading.

    &#xA;

    import numpy as np&#xA;import math&#xA;import matplotlib&#xA;import matplotlib.pyplot as plt&#xA;import matplotlib.animation as animation&#xA;pi=math.pi&#xA;plt.rcParams[&#x27;animation.ffmpeg_path&#x27;] = "C:\FFmpeg\bin\ffmpeg.exe"&#xA;fig = plt.figure()&#xA;&#xA;def complex_array_to_rgb(X, theme=&#x27;dark&#x27;, rmax=None):&#xA;  absmax = rmax or np.abs(X).max()&#xA;  Y = np.zeros(X.shape &#x2B; (3,), dtype=&#x27;float&#x27;)&#xA;  Y[..., 0] = np.angle(X) / (2 * pi) % 1&#xA;  if theme == &#x27;light&#x27;:&#xA;    Y[..., 1] = np.clip(np.abs(X) / absmax, 0, 1)&#xA;    Y[..., 2] = 1&#xA;  elif theme == &#x27;dark&#x27;:&#xA;    Y[..., 1] = 1&#xA;    Y[..., 2] = np.clip(np.abs(X) / absmax, 0, 1)&#xA;  Y = matplotlib.colors.hsv_to_rgb(Y)&#xA;  return Y&#xA;&#xA;# Set up formatting for the movie files&#xA;Writer = animation.writers[&#x27;ffmpeg&#x27;]&#xA;writer = Writer(fps=15, metadata=dict(artist=&#x27;Me&#x27;), bitrate=1800)&#xA;&#xA;fps = 10&#xA;nSeconds = 1&#xA;snapshots = [ complex_array_to_rgb(np.array([[3*(x &#x2B; 1j*y)**(2.9&#x2B;p/300) &#x2B; 1/(x &#x2B; 1j*y)**2 for x in np.arange(-1,1,0.05)] for y in np.arange(-1,1,0.05)])) for p in range( nSeconds * fps ) ]&#xA;&#xA;fig = plt.figure( figsize=(3,3) )&#xA;&#xA;Z2=snapshots[0]&#xA;im=plt.imshow(Z2, extent=(-1,1,-1,1))&#xA;&#xA;def animate_func(i):&#xA;    if i % fps == 0:&#xA;        print( &#x27;.&#x27;)&#xA;&#xA;    im.set_array(snapshots[i])&#xA;    return [im]&#xA;    &#xA;anim = animation.FuncAnimation(&#xA;                               fig, &#xA;                               animate_func, &#xA;                               frames = nSeconds * fps,&#xA;                               interval = 1000 / fps, # in ms&#xA;                               )&#xA;&#xA;anim.save(&#x27;test_anim.mp4&#x27;, writer=writer)&#xA;

    &#xA;

  • Problem updating drawtext with file using ffmpeg [duplicate]

    17 novembre 2020, par drmobbins

    I have a shell script that runs to combine a 24/7 AAC audio stream with a 720p HD picture/background and streams that output live to YouTube. This is for an internet radio station. The script works perfectly except for the drawtext option. The drawtext option references a file that is updated every 15 seconds (using Python and Cron) with the correct song metadata (from the radio automation suite) and is supposed to print the contents of the metadata file to the screen. This happens one time when the ffmpeg command is run in the script, but doesn't update after a song change.

    &#xA;

    I would assume that since the metadata file is changing every 15 seconds on the server that it would update the song details in the output video that could be seen on YouTube...but it doesn't.

    &#xA;

    #!/bin/bash&#xA;&#xA;#Quality settings&#xA;VBR="1500k"&#xA;FPS="30"&#xA;QUAL="ultrafast"&#xA;AUDIO_ENCODER="aac"&#xA;&#xA;#Youtube settings&#xA;YOUTUBE_URL=" rtmp://a.rtmp.youtube.com/live2"&#xA;YOUTUBE_KEY="xxxx-xxxx-xxxx-xxxx-xxxx"&#xA;&#xA;#Sources&#xA;VIDEO_SOURCE="bg720p.jpg"&#xA;AUDIO_SOURCE="http://stream.url"&#xA;&#xA;#Metadata settings&#xA;TRACK_METADATA=$(cat metadata.txt)&#xA;&#xA;ffmpeg \&#xA; -loop 1 \&#xA; -re \&#xA; -framerate $FPS \&#xA; -i "$VIDEO_SOURCE" \&#xA; -thread_queue_size 512 \&#xA; -i "$AUDIO_SOURCE" \&#xA; -vf "drawtext=fontfile=OpenSans-Light.ttf:text=$TRACK_METADATA:x=10:y=680:fontsize=20:fontcolor=white" \&#xA; -c:v libx264 -tune stillimage -pix_fmt yuv420p -preset $QUAL -r $FPS -g $(($FPS *2)) -b:v $VBR \&#xA; -c:a $AUDIO_ENCODER -threads 6 -ar 44100 -b:a 64k -bufsize 512k -pix_fmt yuv420p \&#xA; -f flv $YOUTUBE_URL/$YOUTUBE_KEY&#xA;

    &#xA;

    What am I missing that will make the output continually check for file changes and use drawtext to display the contents. Thanks in advance !

    &#xA;