Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (43)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (5691)

  • FFmpeg error Unable to load FFMpeg during parallel encoding

    1er janvier 2021, par DrJohn

    I'd like to build web service on the Laravel platform which allows users upload some videos on a server. During uploading video files I use ffmpeg to encode them and compress.
I can't install ffmpeg on my hosting and so I have downloaded packages and executable files from https://ffmpeg.org/download.html and locate them on my web directory. Then I make all steps to install ffmpeg in my Laravel project.
I try to upload a video file and it's OK. The time to upload and encode is about 20 seconds. During encoding of the first video file I try to upload the second. And the second video file falls with the error "Unable to load FFMpeg". But the first video file is encoded successfully. When the first encoding is completed and I repeat uploading the second file it encoded successfully as well.
So I think that ffmpeg can work only with only one file at the time and I can't build multi-user service.
Please help me to find solution.

    


    Here is a peace of code which use to encode files :

    


        try {&#xA;                            $pub_path = Storage::disk(&#x27;public&#x27;)->getAdapter()->getPathPrefix();&#xA;                            $videopath =$pub_path . $myusertheme->public_reference.&#x27;/&#x27;.$this->random_filename(25,&#x27;&#x27;,&#x27;mp4&#x27;);&#xA;                            //echo (Storage::disk(&#x27;public&#x27;)->getAdapter()->getPathPrefix().&#x27;<br />&#x27;);&#xA;                            echo ($videopath);&#xA;                            $ffmpeg = \FFMpeg\FFMpeg::create([&#xA;                                &#x27;ffmpeg.binaries&#x27;  => "./usr/bin/ffmpeg",&#xA;                                &#x27;ffprobe.binaries&#x27; => "./usr/bin/ffprobe",&#xA;                                &#x27;timeout&#x27;          => 3600, // The timeout for the underlying process&#xA;                                &#x27;ffmpeg.threads&#x27;   => 12,   // The number of threads that FFMpeg should use&#xA;                                &#x27;set_command_and_error_output_on_exception&#x27; => true,&#xA;                            ]);&#xA;                            $vid=$ffmpeg->open($request->file(&#x27;videofile&#x27;)->getRealPath());&#xA;                            $vid->save(new \FFMpeg\Format\Video\X264(&#x27;libmp3lame&#x27;, &#x27;libx264&#x27;), $videopath);&#xA;&#xA;/*&#xA;                            $videopath = $myusertheme->public_reference.&#x27;/&#x27;.$this->random_filename(25,&#x27;&#x27;,&#x27;mp4&#x27;);&#xA;                            //FFMpeg::fromDisk(&#x27;local_root&#x27;)&#xA;                            $ffmpeg&#xA;                            ->open($request->file(&#x27;videofile&#x27;)->getRealPath())&#xA;                            ->export()&#xA;                            ->onProgress(function ($percentage) {&#xA;                                    //echo ($percentage.&#x27;/n&#x27;);&#xA;                                    if ($percentage===100)&#xA;                                    {&#xA;&#xA;                                        $videopath = $this->random_filename(25,&#x27;&#x27;,&#x27;mp4&#x27;);&#xA;                                    }})&#xA;                            ->inFormat(new \FFMpeg\Format\Video\X264(&#x27;libmp3lame&#x27;, &#x27;libx264&#x27;))&#xA;                            ->toDisk(&#x27;public&#x27;)&#xA;                            ->save($videopath);&#xA;&#xA;*/&#xA;&#xA;                        } catch (EncodingException $exception) {&#xA;                            $videopath = null;&#xA;                            $command = $exception->getCommand();&#xA;                            $errorLog = $exception->getErrorOutput();&#xA;                            echo $errorLog;&#xA;                            return \Response::json(&#x27;Ошибка кодировки файла&#x27;, 500);&#xA;&#xA;                        }&#xA;

    &#xA;

  • How to remove a flickering background image from a video using ffmpeg ?

    25 janvier 2021, par Ari

    I recorded lectures using OBS and uploaded them to Youtube. Later I found that the recorded videos flicker and show the underlying desktop image. The flickering really disturbs but it would be a huge effort to record everything from scratch.

    &#xA;

    I can extract the unwanted image from the video. Is there a way to identify this image (or parts of it) in the recorded videos and remove them ? Or somehow reduce the flickering ?&#xA;Here is an example of a flickering video.

    &#xA;

    I'm not very good with ffmpeg. I've tried to reduce the flicker with this

    &#xA;

    ffmpeg -i in.mp4 -vf "tblend=average,framestep=2,setpts=1*PTS" -r 10 out.mp4&#xA;

    &#xA;

    It reduces the disco effect but leaves heavy shadows of the background image.

    &#xA;

    I also tried to identify the corrupted frames with something like this

    &#xA;

    ffmpeg -i in.mp4 -r 1 -loop 1 -i background.png -filter_complex "blend=difference:shortest=1,blackframe=30:20" -f null -&#xA;

    &#xA;

    but I'm not sure if it is the right approach and how to continue from this.

    &#xA;

    I believe that my command reports the frames that match the image. I thought that it would be possible to replace those frames with white and then use blending to fill in the missing bits. Ideally I'd like to do all that with a single command. Any help is much appreciated !

    &#xA;

  • ffmpeg : adding a stream non-muxed stream with correct codec type tagging

    13 janvier 2021, par Hamish

    In common use, I believe ffmpeg requires inputs to be in a specified muxer format which contains one or more data streams which can be decoded with a codec supported by the demuxer associated with the format. I have a data stream (not audio or video) which is already encoded with a codec but is not muxed. How can I get this stream into the ffmpeg pipeline with the correct codec type assigned so that the muxer knows what to do with it ?

    &#xA;

    I have tried streaming the data over UDP and specifying the data demuxer. With some combinations I get get it to say it's streaming, I can never get a player to connect, presumable because the output of mpegts is either null or invalid. Command line :

    &#xA;

    ffmpeg -v verbose ^&#xA;-f flv -listen 1 -i rtmp://127.0.0.1:1101 ^&#xA;-f data -i udp://127.0.0.1:1300 ^&#xA;    -map 0:v -vcodec mpeg2video -map 1:d -f mpegts -mpegts_m2ts_mode 1  udp://localhost:1200&#xA;

    &#xA;

    Result (partial) :

    &#xA;

    Input #0, flv, from &#x27;rtmp://127.0.0.1:1101&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.29.100&#xA;  Duration: 00:00:00.00, start: 0.000000, bitrate: N/A&#xA;    Stream #0:0: Video: h264 (Constrained Baseline), 1 reference frame, yuv420p(progressive, left), 5760x1080 (5760x1088), 30 fps, 30 tbr, 1k tbn, 60 tbc&#xA;    Stream #0:1: Audio: mp3, 48000 Hz, stereo, fltp, 128 kb/s&#xA;Input #1, data, from &#x27;udp://127.0.0.1:1300&#x27;:&#xA;  Duration: N/A, start: 0.000000, bitrate: N/A&#xA;    Stream #1:0: Data: none&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> mpeg2video (native))&#xA;  Stream #1:0 -> #0:1 (copy)&#xA;Press [q] to stop, [?] for help&#xA;[h264 @ 00000180d48ae700] Reinit context to 5760x1088, pix_fmt: yuv420p&#xA;[graph 0 input from stream 0:0 @ 00000180d489dcc0] w:5760 h:1080 pixfmt:yuv420p tb:1/1000 fr:30/1 sar:0/1&#xA;[mpegts @ 00000180d5f64040] Cannot automatically assign PID for stream 1&#xA;Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument&#xA;Error initializing output stream 0:0 --&#xA;[AVIOContext @ 00000180d48b83c0] Statistics: 0 seeks, 0 writeouts&#xA;[AVIOContext @ 00000180d4882080] Statistics: 185593 bytes read, 0 seeks&#xA;[AVIOContext @ 00000180d5f469c0] Statistics: 204 bytes read, 0 seeks&#xA;Conversion failed!&#xA;

    &#xA;

    The codec type name is klv, which has the tag KLVA. It is only supported by the mpegts and mxf (de)muxers. I presume there must be a way of getting into the pipeline without having a valid mpegts or mxf stream in the first place otherwise we have a kind of paradox.

    &#xA;

    I've tried specifying the codec on the input, but it fails validation, I guess because the data demuxer does not support it.

    &#xA;

    Somehow mp4 files can be muxed from elemental streams (h264 and aac files), but I guess there must be some special case in the code to force the codec type based on the file extension.

    &#xA;

    I would really love to do this from the command line with a public build but if this is absolutely not possible, I would also welcome some advice about it could be achieved from C++ code.

    &#xA;