Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (101)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

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

  • lavfi/delogo : band width must be at least 1

    5 juillet 2013, par Jean Delvare
    lavfi/delogo : band width must be at least 1
    

    We need at least one pixel around the logo to use as known points to
    interpolate from. So properly declare the band/t attribute has having
    a minimum value of 1.

    Signed-off-by : Jean Delvare <khali@linux-fr.org>
    Reviewed-by : Stefano Sabatini <stefasab@gmail.com>
    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavfilter/version.h
    • [DH] libavfilter/vf_delogo.c
  • movenc : add video_track_timescale option

    16 mai 2013, par Jean First
    movenc : add video_track_timescale option
    

    Signed-off-by : Jean First <jeanfirst@gmail.com>
    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavformat/movenc.c
    • [DH] libavformat/movenc.h
  • local.ERROR : ffmpeg failed to execute command

    20 août 2024, par AMNA IQBAL

    I am trying to draw points on a video.

    &#xA;

    The Video is 12 seconds long and for one second there are 17 data points which needs to be plotted on the video of one frame (1 second).
    &#xA;It works for 6 seconds but not for 12 seconds.

    &#xA;

    Why it's not working for longer videos ? Is there any limitations of commands in ffmpeg ?

    &#xA;

    public function overlayCoordinates(Request $request)&#xA;{&#xA;Log::info(&#x27;Received request to overlay coordinates on video.&#x27;);&#xA;&#xA;    set_time_limit(600); // 600 seconds = 10 minutes&#xA;    try {&#xA;&#xA;        $request->validate([&#xA;            &#x27;video&#x27; => &#x27;required|file|mimes:mp4,avi,mkv,webm|max:102400&#x27;, // Video max size 100MB&#xA;            &#x27;coordinates&#x27; => &#x27;required|file|mimes:txt|max:5120&#x27;, // Coordinates text file max size 5MB&#xA;        ]);&#xA;&#xA;        $videoFile = $request->file(&#x27;video&#x27;);&#xA;        $coordinatesFile = $request->file(&#x27;coordinates&#x27;);&#xA;&#xA;        $videoFilePath = $videoFile->getRealPath();&#xA;        $videoFileName = $videoFile->getClientOriginalName();&#xA;&#xA;        // Move the video file to the desired location if needed&#xA;        $storedVideoPath = $videoFile->storeAs(&#x27;public/videos&#x27;, $videoFileName);&#xA;&#xA;        // Open the video file using Laravel FFmpeg&#xA;        $media = FFMpeg::fromDisk(&#x27;public&#x27;)->open(&#x27;videos/&#x27; . $videoFileName);&#xA;        $duration = $media->getDurationInSeconds();&#xA;&#xA;        Log::info(&#x27;Duration: &#x27; . $duration);&#xA;&#xA;        $coordinatesJson = file_get_contents($coordinatesFile->getPathname());&#xA;        $coordinatesArray = json_decode($coordinatesJson, true);&#xA;&#xA;        $frameRate = 30; // Assuming a frame rate of 30 fps&#xA;        $visibilityDuration = 0.5; // Set duration to 0.5 second&#xA;&#xA;        for ($currentTime = 0; $currentTime &lt; 7; $currentTime&#x2B;&#x2B;) {&#xA;            $filterString = ""; // Reset filter string for each frame&#xA;            $frameIndex = intval($currentTime * $frameRate); // Convert current time to an index&#xA;&#xA;            if (isset($coordinatesArray[&#x27;graphics&#x27;][$frameIndex])) {&#xA;                // Loop through the first 5 keypoints (or fewer if not available)&#xA;                $keypoints = $coordinatesArray[&#x27;graphics&#x27;][$frameIndex][&#x27;kpts&#x27;];&#xA;                for ($i = 0; $i &lt; min(12, count($keypoints)); $i&#x2B;&#x2B;) {&#xA;                    $keypoint = $keypoints[$i];&#xA;&#xA;                    $x = $keypoint[&#x27;p&#x27;][0] * 1920; // Scale x coordinate to video width&#xA;                    $y = $keypoint[&#x27;p&#x27;][1] * 1080; // Scale y coordinate to video height&#xA;&#xA;                    $startTime = $frameIndex / $frameRate; // Calculate start time&#xA;                    $endTime = $startTime &#x2B; $visibilityDuration; // Set end time for 0.5 second duration&#xA;&#xA;                    // Add drawbox filter for the current keypoint&#xA;                    $filterString .= "drawbox=x={$x}:y={$y}:w=10:h=10:color=red@0.5:t=fill:enable=&#x27;between(t,{$startTime},{$endTime})&#x27;,";&#xA;                }&#xA;                   Log::info("Processing frame index: {$frameIndex}, Drawing first 5 keypoints.");&#xA;        }&#xA;&#xA;            $filterString = rtrim($filterString, &#x27;,&#x27;);&#xA;            &#xA;            // Apply the filter for the current frame&#xA;            if (!empty($filterString)) {&#xA;                $media->addFilter(function ($filters) use ($filterString) {&#xA;                    $filters->custom($filterString);&#xA;                });&#xA;            }&#xA;        }&#xA;&#xA;        $filename = uniqid() . &#x27;_overlayed.mp4&#x27;;&#xA;        $destinationPath = &#x27;videos/&#x27; . $filename;&#xA;&#xA;        $format = new \FFMpeg\Format\Video\X264(&#x27;aac&#x27;);&#xA;        $format->setKiloBitrate(5000) // Increase bitrate for better quality&#xA;               ->setAdditionalParameters([&#x27;-profile:v&#x27;, &#x27;high&#x27;, &#x27;-preset&#x27;, &#x27;veryslow&#x27;, &#x27;-crf&#x27;, &#x27;18&#x27;]) // High profile, very slow preset, and CRF of 18 for better quality&#xA;               ->setAudioCodec(&#x27;aac&#x27;)&#xA;               ->setAudioKiloBitrate(192); // Higher audio bitrate&#xA;        &#xA;&#xA;        // Export the video in one pass to a specific disk and directory&#xA;        $media->export()&#xA;              ->toDisk(&#x27;public&#x27;)&#xA;              ->inFormat($format)&#xA;              ->save($destinationPath);&#xA;&#xA;        return response()->json([&#xA;            &#x27;message&#x27; => &#x27;Video processed successfully with overlays.&#x27;,&#xA;            &#x27;path&#x27; => Storage::url($destinationPath)&#xA;        ]);&#xA;    } catch (\Exception $e) {&#xA;        Log::error(&#x27;Overlay process failed: &#x27; . $e->getMessage());&#xA;        return response()->json([&#x27;error&#x27; => &#x27;Overlay process failed. Please check logs for details.&#x27;], 500);&#xA;    }&#xA;}&#xA;

    &#xA;