Recherche avancée

Médias (91)

Autres articles (32)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • 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

Sur d’autres sites (3878)

  • Output a video file from ffmpeg directly to google cloud storage

    24 juin 2021, par Anup Sedhain

    Background on the problem

    


    We are trying to compress a video using FFmpeg in our server that is hosted in the Google App Engine (GAE). The input file is in Google Cloud Storage (GCS) which can be easily passed as an input to FFmpeg and the processing is done, however, I wanted to output the file directly to GCS. I have referred to the documentation here https://ffmpeg.org/ffmpeg-protocols.html#http that they provided and used the correct headers and method to upload the file using a signed URL, but it doesn't seem to work. As of now, I am not even sure whether this is possible.

    


    Current Implementation

    


    Currently, we are first saving the output file in the GAE workspace and then uploading the file to the bucket. This flow worked fine until we faced another problem. Whenever the file is too big, the processing takes more than 10 mins which seems to be the threshold for Automatically Scaled Instances in the Flexible environment. To get around this problem we could use basic_scaling in a Standard environment but there we cannot seem to write files in the GAE workspace. I could choose to write in the /tmp directory but that uses RAM and we can have many files being uploaded at a time, so it's not an option.

    


    Possible Future

    


    Right now one solution I have seen is to use a Flexible environment with manual scaling, but this is a bad idea when it comes to scaling and cost-effectiveness. Another, which I am not so sure about would be to use Google Compute Engine but I am yet to try this.

    


    Conclusion

    


    The problem that arose from not being able to make a PUT request to Google Cloud Storage from FFmpeg led me to go through tens of problems surrounding GAE and its weird combination of instances and feature set.

    


    Would really appreciate suggestions or possible solutions if I am missing anything. If only we could make the FFmpeg output the file to GCS.

    


  • FFMediaElement : How to stream from CamLink 4K ?

    15 janvier 2021, par Pedro

    I would like to use Unosquare's FFME library (v4.2.330) to show a live stream from a Cam Link 4K hdmi grabber.Using the following code, however, the media element remains black, even though the media has successfully been opened and no exceptions are raised.

    


        


    private void OnLoaded(object sender, RoutedEventArgs e)
    {
        this.media.Open(new Uri("device://dshow/?video=Cam Link 4K"));
    }

    private void media_MediaInitializing(object sender, Unosquare.FFME.Common.MediaInitializingEventArgs e)
    {
        e.Configuration.PrivateOptions["framerate"] = "50";
        e.Configuration.PrivateOptions["video_size"] = "1920x1080";
        e.Configuration.PrivateOptions["vcodec"] = "rawvideo"; //also tried mjpeg
        e.Configuration.PrivateOptions["pixel_format"] = "yuyv422"; //also tried yuv420p
    }
    
    private void media_MediaFailed(object sender, Unosquare.FFME.Common.MediaFailedEventArgs e)
    {
        log.Error(e.ErrorException);
    }


    


    Using VLC player everything works fine, so I suppose it has something to do with parameters set during MediaInitializing. In order to get the correct parameters I ran ffmpeg -f dshow -i video="Cam Link 4K" which outputs

    


    Input #0, dshow, from 'video=Cam Link 4K':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 50 fps, 50 tbr, 10000k tbn, 10000k tbc


    


    By running ffmpeg -f dshow -pix_fmt yuv420p -i video="Cam Link 4K" -framerate 50 -vcodec mjpeg test.mkv I am able to record everthing into the file.

    


    During startup I am setting Unosquare.FFME.Library.FFmpegDirectory = @"C:\ffmpeg";, where I put the prebuilt binaries and shared libraries for ffmpeg 4.2.1 (win64). Also I made sure my project is targeting x64. Since MediaElement works with regular mp4 files, I am not sure which parameters/settings I am missing.

    


  • FFMPEG - Width/ Height Not Divisible by 2 (Scaling to Generate MBR Output)

    15 avril 2020, par Sanjeev Pandey

    I am trying to generate multilple variants of videos in my library (Mp4 formats) and have renditions planned ranging from 1080p to 240p and popular sizes in between. For that I am taking a video with a AxB resolution and then running through a code (on bash) which scales them to desired following sizes - 
426x240
640x360
842x480
1280x720
1920x1080, with different bitrates of course, and then saves as Mp4 again.

    



    Now, this works just fine if source video has height and width divisible by 2, but code breaks on the following line for the videos with odd width and height :
-vf scale=w=${width}:h=${height}:force_original_aspect_ratio=decrease"

    



    Where 'width' and 'height' are the desired (and hardcoded) for every iteration : E.g. "426x240", and "640x360"

    



    The Error :
[libx264 @ 00000187da2a1580] width not divisible by 2 (639x360)
Error initializing output stream 1:0 -- Error while opening encoder for output stream #1:0 - maybe incorrect parameters such as bit_rate, rate, width or height

    



    Now approaches those are explained in this one doesn't work for me since I am scaling - FFMPEG (libx264) "height not divisible by 2"

    



    And, I tried this one too but it seems all qualities are getting the same size -ffmpeg : width not divisible by 2 (when keep proportions)

    



    

      

    • This is how I tried to use this one : scale='bitand(oh*dar,65534)':'min(${height},ih)'
    • 


    


    



    Kindly suggest how to solve this, keeping in view that :
1. I have a very large library and I can't do manual change for every video
2. I need to scale the video and keep the aspect ratio

    



    Thanks !

    



    PS : [Edit] One way that I can see is padding all of the odd height/ weight videos using a second script in advance. This however doubles my work time and load. I would prefer to keep it in single script. This is the script I see that I can use for padding :
```ffmpeg -r 24 -i -vcodec libx264 -y -an -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2"`` (from : FFMPEG (libx264) "height not divisible by 2")