Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (111)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Que fait exactement ce script ?

    18 janvier 2011, par

    Ce script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
    Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
    Installation de dépendances de MediaSPIP
    Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
    Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...)

Sur d’autres sites (9548)

  • How to save synthesized audio during streaming distribution

    7 avril 2022, par its-ogawa

    I would like to stream a composite of microphone audio and digital sound sources by ffmpeg and save the delivery to an m3u8 file.

    


    Below are the commands I have actually tried.

    


    ffmpeg -rtbufsize 100M -f dshow -i video=<my webcam="webcam">:audio=<my microphone="microphone"> -re -stream_loop -1 -i <my sound="sound" source="source"> -filter_complex "[0]aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=stereo,adelay=2100|2100,volume@voice=volume=10dB[voice],[1]aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=stereo,azmq,volume@bgm=volume=0.2[bgm],[voice][bgm]amerge=inputs=2[out]" -map 0:v -map [out]:a -f mpegts -flush_packets 0 udp://XXX.XXX.XXX.XXX:XXX?pkt_size=1316 -f hls -hls_time 5 hls.m3u8&#xA;</my></my></my>

    &#xA;

    I have played an m3u8 created this way, but I cannot hear the digital sound source that I am supposed to have synthesized.&#xA;Even though the synthesized audio was audible when streamed.

    &#xA;

    Perhaps you need to set up something like -map 0:v -map [out]:a when saving to the m3u8 file, in which case the Output with label &#x27;out&#x27; does not exist in any defined filter graph, or was already used elsewhere. message appears and does not work.

    &#xA;

  • Python ffmpeg does not save the mp4 clips to file

    30 janvier 2021, par oo92

    I'm using the ffmpeg Python library to save 60 second mp4 clips to file from Twitch livestreams using its API. This is my code :

    &#xA;

    current_dir = os.getcwd()&#xA;&#xA;client = TwitchClient(client_id=&#x27;&#x27;)&#xA;streams_now = client.streams.get_live_streams(limit=100, offset=900)&#xA;epoch = str(math.ceil(time.time()))&#xA;&#xA;if not os.path.exists(current_dir &#x2B; &#x27;/twitch_videos/&#x27;):&#xA;    os.mkdir(current_dir &#x2B; &#x27;/twitch_videos/&#x27;)&#xA;&#xA;for i in range(0, 1):&#xA;    try:&#xA;        username = streams_now[i][&#x27;channel&#x27;][&#x27;name&#x27;]&#xA;        id = streams_now[i][&#x27;id&#x27;]&#xA;        game = streams_now[i][&#x27;game&#x27;]&#xA;        game = game.translate(str.maketrans({&#x27;:&#x27;: &#x27;-&#x27;, &#x27; &#x27;: &#x27;-&#x27;, "&#x27;": &#x27;&#x27;, &#x27;!&#x27;: &#x27;&#x27;, &#x27;&amp;&#x27;: &#x27;_&#x27;, &#x27;.&#x27;: &#x27;&#x27;, &#x27;&#x2B;&#x27;: &#x27;_&#x27;}))&#xA;        streaming = streamlink.streams(&#x27;http://twitch.tv/&#x27; &#x2B; username)&#xA;        stream = streaming["best"].url&#xA;&#xA;        twitch_stream = ffmpeg.input(stream)&#xA;&#xA;        twitch_stream = ffmpeg.filter(twitch_stream,&#xA;                                      &#x27;fps&#x27;,&#xA;                                      fps=1,&#xA;                                      round=&#x27;up&#x27;)&#xA;&#xA;        twitch_stream = ffmpeg.output(twitch_stream,&#xA;                                      current_dir &#x2B; &#x27;/twitch_videos/&#x27; &#x2B; &#x27;%d_&#x27; &#x2B; username &#x2B; &#x27;_&#x27; &#x2B; epoch &#x2B; &#x27;.mp4&#x27;,&#xA;                                      sc_threshold=&#x27;0&#x27;,&#xA;                                      g=&#x27;60&#x27;,&#xA;                                      f=&#x27;segment&#x27;,&#xA;                                      segment_time=&#x27;600&#x27;,&#xA;                                      segment_format_options=&#x27;movflags=&#x2B;faststart&#x27;,&#xA;                                      reset_timestamps=&#x27;1&#x27;)frl3dqgn21bbpp6tajjvg5pdevczac&#xA;        ffmpeg.run(twitch_stream)&#xA;&#xA;&#xA;    except:&#xA;        pass&#xA;

    &#xA;

    I am concatenating the path it should go to, to the name of the file. But the folder is empty after I take a look.

    &#xA;

  • CMD Batch Variable Won't Save FFprobe Output

    15 juillet 2017, par Matt McManis

    I have an CMD Batch Script that will convert a folder of mp4 videos to webm.

    You will need :

    • FFmpeg/FFprobe installed and set in Environment Variables to run from CMD.
    • A folder with an mp4 for FFprobe to parse.

    To make it easy, this is only the first part of the script, showing the Video Bitrate variable.

    Here is a full script, just replace the paths.
    https://pastebin.com/raw/3ng77Exz

    How the Script works :

    • Loops through all videos in folder
    • Has FFprobe parse the Video’s Bitrate and save it to %V and
      %vBitrate%.
    • Has FFmpeg use %V. Such as -b:v %V will become the parsed value
      -b:v 9401k.
    • Converts each video from mp4 to webm using the parsed Bitrate

    Problem

    I can’t get FFprobe’s Output to save to the variable. I’ve come up with a workaround, having it first save the bitrate value to a temp file, then import that to the %vBitrate% variable.

    Example : (%V > tmp_vBitrate) &amp; SET /p vBitrate= &lt; tmp_vBitrate.


    Works

    Temp File Variable

    cd "C:\Users\Matt\Videos\" &amp;&amp; for %f in (*.mp4) do ffprobe -i "C:\Users\Matt\Desktop\Test\%~f" -select_streams v:0 -show_entries stream=bit_rate -v quiet -of csv="p=0" &amp; for /f "tokens=*" %V in ("ffprobe -i "%~f" -select_streams v:0 -show_entries stream=bit_rate -v quiet -of csv=p=0") do (echo ) &amp; (%V > tmp_vBitrate) &amp; SET /p vBitrate= &lt; tmp_vBitrate &amp; del tmp_vBitrate &amp; for /F %V in ('echo %vBitrate%') do (echo %V)

    Does Not Work

    Memory Variable

    cd "C:\Users\Matt\Videos\" &amp;&amp; for %f in (*.mp4) do ffprobe -i "C:\Users\Matt\Desktop\Test\%~f" -select_streams v:0 -show_entries stream=bit_rate -v quiet -of csv="p=0" &amp; for /f "tokens=*" %V in ("ffprobe -i "%~f" -select_streams v:0 -show_entries stream=bit_rate -v quiet -of csv=p=0") do (echo ) &amp; SET vBitrate=%V &amp; for /F %V in ('echo %vBitrate%') do (echo %V)

    Testing It

    Run the first command. When it is finished, type echo %vBitrate% in CMD and press Enter. You’ll see the bitrate of the last mp4 file parsed.

    Do the same for the second command and you’ll see it doesn’t work.


    Solution

    I would like to get rid of the Temp File Variable and get the second command to work.

    (%V > tmp_vBitrate) &amp; SET /p vBitrate= &lt; tmp_vBitrate to just SET vBitrate=%V.

    Maybe this whole thing can be simplified ? Am I using the variables wrong ?