Recherche avancée

Médias (91)

Autres articles (56)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (9927)

  • Transition between FFMpeg streams

    25 juillet 2021, par spectacularbob

    I have been running a Youtube livestream for a while and I am developing a solution so that I can run the stream remotely through a browser. My plan is to have an ASP.net core web api project running a background service that when I send the streaming information to it, it launches FFMpeg to stream a USB webcam. I also need to be able to press a button to "mute" the stream so it shows a blank video with some text overlay (i.e. "Technical Difficulties").

    


    My solution so far is to use two instances of FFMpeg. When I switch modes, I kill one process and start the other one. I have gotten it working somewhat, but when I switch back and forth between "mute mode" and "streaming mode", Youtube seems to choke on the stream being changed. I suspect it's because when I go from mute mode back to stream mode, youtube doesn't recognize that the mute mode has ended. Also, mute mode displays the text like I want, but it causes the Youtube player to stop being "live" so that if I do get the regular stream going again, the user has to click the "Live" button to be up to date.

    


    Here's the command line for both modes :

    


    Stream Mode :

    


    ffmpeg.exe -f dshow -i video="<webcam>" -f dshow -i audio="<microphone>" -vcodec libx264 -pix_fmt yuv420p -preset veryfast -r 30 -g 60 -b:v 3500k -f flv rtmp://a.rtmp.youtube.com/live2/<stream key="key">&#xA;</stream></microphone></webcam>

    &#xA;

    Mute Mode (blank.mp4 is a 3 second long blank video) :

    &#xA;

    ffmpeg.exe -stream_loop -1 -i ./FFMpeg/blankvid.mp4 -vf "drawtext=fontfile=C\\\\:/Windows/Fonts/Arial.ttf:text=&#x27;Technical Difficulties&#x27;:fontcolor=white:fontsize=60:box=1:boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/2" -vcodec libx264 -pix_fmt yuv420p -preset veryfast -r 30 -g 60 -b:v 3500k -f flv -flvflags no_duration_filesize rtmp://a.rtmp.youtube.com/live2/<stream key="key">&#xA;</stream>

    &#xA;

    Last note : I know that there may be a way using a color filter to create the black video, rather than having a blankvid.mp4. If you also know how to get the parameters for that, it would be very helpful.

    &#xA;

  • Adding album cover art to FLAC audio files using `ffmpeg`

    27 décembre 2022, par user5395338

    I have ripped files from an audio CD I just bought. I ripped using the Music app on my Macbook Pro, Catalina 10.15.6 - output format was .wav as there was no option for FLAC. My plan was to change format using ffmpeg :

    &#xA;

    % ffmpeg -v&#xA;ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers&#xA;

    &#xA;

    Except for the "album cover artwork" addition, the .wav-to-.flac conversion implemented in the short bash script below seems to have worked as expected :

    &#xA;

    #!/bin/bash&#xA;for file in *.wav&#xA;do&#xA;echo $file &#xA;ffmpeg -loglevel quiet -i "$file" -ar 48000 -c:a flac -disposition:v AnotherLand.png -vsync 0 -c:v png "${file/%.wav/.flac}"&#xA;done&#xA;

    &#xA;

    A script very similar to this one worked some time ago on a series of FLAC-to-FLAC conversions I had to do to reduce the bit depth. However, in that case, the original FLAC files already had the artwork embedded. Since this script produced usable audio files, I decided that I would try adding the artwork with a second ffmpeg command.

    &#xA;

    I did some research, which informed me that there have been issues with ffmpeg (1, 2, 3, 4) on adding album artwork to FLAC files.

    &#xA;

    I have tried several commands given in the references above, but still have not found a way to add album artwork to my FLAC files. The following command was a highly upvoted answer, which I felt would work, but didn't :

    &#xA;

    % ffmpeg -i "01 Grave Walker.flac" -i ./AnotherLand.png -map 0:0 -map 1:0 -codec copy -id3v2_version 3 -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (front)" output.flac&#xA;&#xA;...&#xA;&#xA;&#xA;Input #0, flac, from &#x27;01 Grave Walker.flac&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.76.100&#xA;  Duration: 00:06:59.93, start: 0.000000, bitrate: 746 kb/s&#xA;  Stream #0:0: Audio: flac, 48000 Hz, stereo, s16&#xA;Input #1, png_pipe, from &#x27;./AnotherLand.png&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;  Stream #1:0: Video: png, rgba(pc), 522x522, 25 fps, 25 tbr, 25 tbn, 25 tbc&#xA;File &#x27;output.flac&#x27; already exists. Overwrite? [y/N] y&#xA;[flac @ 0x7fb4d701e800] Video stream #1 is not an attached picture. Ignoring&#xA;Output #0, flac, to &#x27;output.flac&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.76.100&#xA;  Stream #0:0: Audio: flac, 48000 Hz, stereo, s16&#xA;  Stream #0:1: Video: png, rgba(pc), 522x522, q=2-31, 25 fps, 25 tbr, 25 tbn, 25 tbc&#xA;    Metadata:&#xA;      title           : Album cover&#xA;      comment         : Cover (front)&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (copy)&#xA;  Stream #1:0 -> #0:1 (copy)&#xA;&#xA;...&#xA;&#xA;

    &#xA;

    I don't understand the error message : Video stream #1 is not an attached picture. It seems to imply that that the artwork is "attached" (embedded ???) in the input file, but as I've specified the artwork is a separate file, this makes no sense to me.

    &#xA;

  • FFMPEG/NVDEC Fails When Under 7 Frames

    13 août 2021, par Meme Machine

    I was looking the examples from NVIDIA's repository, specifically their Encoding and Decoding projects. I downloaded the desktop duplication project, which allows you to capture a certain number of frames from the desktop as raw h264. I also got AppDecode, which decodes and displays frames from an input file. I noticed that if I try and capture only a single frame, it fails to decode the input file.

    &#xA;

    Here is the output

    &#xA;

    C:\Users\Admin>C:\Users\Admin\source\repos\video-sdk-samples\Samples\x64.Debug\AppDecD3d -d3d 11 -i C:\Users\Admin\source\repos\video-sdk-samples\nvEncDXGIOutputDuplicationSample\x64\Debug\ddatest_0.h264&#xA;GPU in use: NVIDIA GeForce RTX 2080 Super with Max-Q Design&#xA;Display with D3D11.&#xA;[INFO ][17:59:47] Media format: raw H.264 video (h264)&#xA;Session Initialization Time: 39 ms&#xA;[INFO ][17:59:47] Video Input Information&#xA;        Codec        : AVC/H.264&#xA;        Frame rate   : 30000/1000 = 30 fps&#xA;        Sequence     : Progressive&#xA;        Coded size   : [1920, 1088]&#xA;        Display area : [0, 0, 1920, 1080]&#xA;        Chroma       : YUV 420&#xA;        Bit depth    : 8&#xA;Video Decoding Params:&#xA;        Num Surfaces : 20&#xA;        Crop         : [0, 0, 0, 0]&#xA;        Resize       : 1920x1088&#xA;        Deinterlace  : Weave&#xA;&#xA;Total frame decoded: 7&#xA;Session Deinitialization Time: 10 ms&#xA;&#xA;C:\Users\Admin>C:\Users\Admin\source\repos\video-sdk-samples\Samples\x64.Debug\AppDecD3d -d3d 11 -i C:\Users\Admin\source\repos\video-sdk-samples\nvEncDXGIOutputDuplicationSample\x64\Debug\ddatest_0.h264&#xA;GPU in use: NVIDIA GeForce RTX 2080 Super with Max-Q Design&#xA;Display with D3D11.&#xA;[INFO ][17:59:54] Media format: raw H.264 video (h264)&#xA;[h264 @ 0000023B8AB5C3A0] decoding for stream 0 failed&#xA;Session Initialization Time: 42 ms&#xA;[INFO ][17:59:54] Video Input Information&#xA;        Codec        : AVC/H.264&#xA;        Frame rate   : 30000/1000 = 30 fps&#xA;        Sequence     : Progressive&#xA;        Coded size   : [1920, 1088]&#xA;        Display area : [0, 0, 1920, 1080]&#xA;        Chroma       : YUV 420&#xA;        Bit depth    : 8&#xA;Video Decoding Params:&#xA;        Num Surfaces : 20&#xA;        Crop         : [0, 0, 0, 0]&#xA;        Resize       : 1920x1088&#xA;        Deinterlace  : Weave&#xA;&#xA;Total frame decoded: 6&#xA;Session Deinitialization Time: 10 ms&#xA;

    &#xA;

    I started from 10 frames and counted down to 6 where it eventually failed. It is important for me to know why this happens, because I plan to implement this decoder into my project, and will be feeding it single frames from a stream.

    &#xA;

    Oh, and also I noticed the coded size is 1088 by 1920 instead of 1080 according to the output log. Not sure why that is occurring or if it is relevant

    &#xA;