Recherche avancée

Médias (91)

Autres articles (32)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

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

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (4655)

  • PIL image save causes FFMPEG to fail

    6 janvier 2023, par Xorgon

    I have been attempting to convert some videos using FFMPEG with image2pipe using PIL. I have found that when the frame is particularly simple (such as all one colour), it causes FFMPEG to fail with the following message :

    


    [image2pipe @ 000001785b599bc0] Could not find codec parameters for stream 0 (Video: none, none): unknown codec&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27; options&#xA;Input #0, image2pipe, from &#x27;pipe:&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;    Stream #0:0: Video: none, none, 24 tbr, 24 tbn, 24 tbc&#xA;Output #0, mp4, to &#x27;<your filepath="filepath" here="here">/test.mp4&#x27;:&#xA;Output file #0 does not contain any stream&#xA;</your>

    &#xA;

    The minimum code I have found to reproduce this is as follows :

    &#xA;

    import numpy as np&#xA;from subprocess import Popen, PIPE&#xA;from PIL import Image&#xA;&#xA;output_file = "<your filepath="filepath" here="here">/test.mp4"&#xA;&#xA;p = Popen([&#x27;ffmpeg&#x27;,&#xA;           &#x27;-y&#x27;,  # Overwrite files&#xA;           &#x27;-f&#x27;, &#x27;image2pipe&#x27;,  # Input format&#xA;           &#x27;-r&#x27;, &#x27;24&#x27;,  # Framerate&#xA;           &#x27;-i&#x27;, &#x27;-&#x27;,  # stdin&#xA;           &#x27;-c:v&#x27;, &#x27;libx264&#x27;,  # Codec&#xA;           &#x27;-preset&#x27;, &#x27;slow&#x27;,&#xA;           &#x27;-crf&#x27;, f&#x27;18&#x27;,  # H264 Constant Rate Factor (quality, lower is better)&#xA;           output_file], stdin=PIPE)&#xA;&#xA;# This one works&#xA;# vid = np.random.randint(0, 255, (10, 64, 64))  # Create a 64x64 &#x27;video&#x27; with 10 frames of random noise&#xA;&#xA;# This one does not&#xA;vid = np.full((10, 64, 64), 129)  # Create a 64x64 &#x27;video&#x27; with 10 frames of pure grey&#xA;&#xA;for frame in vid:&#xA;    im = Image.fromarray(np.uint8(frame))&#xA;    im.save(p.stdin, &#x27;JPEG&#x27;)&#xA;&#xA;p.stdin.close()&#xA;p.wait()&#xA;</your>

    &#xA;

    Notably, if I do the same thing with a randomly generated series of frames (commented as "This one works" in the script above), it will output fine.

    &#xA;

    One workaround I have found so far is to replace 'JPEG' with 'PNG' in the im.save(...) call. However, I would be interested in understanding what causes it to fail with JPEG.

    &#xA;

  • Is there a way to save a matplotlib animation as a video (with ffmpeg) so that the last frame is held for N seconds ?

    2 décembre 2020, par janluke

    I'm using FFMpegWriter to save a matplotlib animation as a video. I'd like to hold the last frame for some seconds at the end of the video.

    &#xA;

    As a workaround, one could modify the animation itself by repeating the last frame for a number of extra steps. This number of steps can be computed as a function of the desired "hold duration" and the interval/fps of the animation.

    &#xA;

    Nonetheless, I'd like to know if there's a cleaner way to do the same without artificially modifying the animation itself and using instead some extra arguments for the writer (which uses ffmpeg in my case). Unfortunately I don't know much of ffmpeg so I'd like to have some help.

    &#xA;

    Thank you.

    &#xA;

  • I want to get the data of the MPEG2ts data stream

    26 juin 2020, par 夏目たかし

    I want to get the data of the MPEG2ts data stream using FFMPEG.

    &#xA;

    Delivery side :

    &#xA;

    ffmpeg -re -i hoge.ts -map 0 -c copy -f mpegts udp://127.0.0.1:5004&#xA;

    &#xA;

    Receiver :

    &#xA;

    ffmpeg -i udp://127.0.0.1:5004 -map 0:1 -codec copy -f data stream.txt&#xA;

    &#xA;

    I started two command prompts and both were running on one PC.

    &#xA;

    disp Delivery side message :

    &#xA;

    Input #0, mpegts, from &#x27;E:/Day_Flight.mpg&#x27;:&#xA;  Duration: 00:03:14.88, start: 10.000000, bitrate: 4187 kb/s&#xA;  Program 1&#xA;    Stream #0:0[0x1e1]: Video: h264 (Main) ([27][0][0][0] / 0x001B), &#xA;yuv420p(progressive), 1280x720, 60 fps, 60 tbr, 90k tbn, 180k tbc&#xA;    Stream #0:1[0x1f1]: Data: klv (KLVA / 0x41564C4B)&#xA;Output #0, mpegts, to &#x27;udp://127.0.0.1:5004&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.47.100&#xA;    Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x720, q=2-31, 60 fps, 60 tbr, 90k tbn, 90k tbc&#xA;    Stream #0:1: Data: klv (KLVA / 0x41564C4B)&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (copy)&#xA;  Stream #0:1 -> #0:1 (copy)&#xA;

    &#xA;

    disp Receiver message :

    &#xA;

    Input #0, mpegts, from &#x27;udp://127.0.0.1:5004&#x27;:&#xA;  Duration: N/A, start: 1.400000, bitrate: N/A&#xA;  Program 1&#xA;    Metadata:&#xA;      service_name    : Service01&#xA;      service_provider: FFmpeg&#xA;    Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), &#xA;yuv420p(progressive), 1280x720, 60 fps, 60 tbr, 90k tbn, 180k tbc&#xA;    Stream #0:1[0x101]: Data: klv (KLVA / 0x41564C4B)&#xA;Output #0, data, to &#x27;stream.txt&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.47.100&#xA;    Stream #0:0: Data: klv (KLVA / 0x41564C4B)&#xA;Stream mapping:&#xA;  Stream #0:1 -> #0:0 (copy)&#xA;

    &#xA;

    However, the contents of steram.txt are empty.&#xA;Please give me some advice.

    &#xA;