Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (95)

  • 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

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (8196)

  • PHP-FFMpeg : How to properly concatenate two videos ?

    4 octobre 2018, par FrancescoMussi

    THE SITUATION :

    I need it to concatenate multiple videos into one single video.
    I am using the library PHP-FFMpeg.
    But I don’t manage to make it working.

    THE VIDEOS :

    The videos are recordings made with the MediaRecorder Web API.
    The video format is : video/webm;codecs=h264
    The audio format is opus.

    recorder = new MediaRecorder(this.stream, {
     mimeType: 'video/webm;codecs=h264'
    })

    CONCAT USING PHP-FFMPEG (using saveFromSameCodecs) :

    This is how I try to concat them using saveFromSameCodecs :
    (I have checked the paths and are correct)

    $video = $ffmpeg->open( $path1 );
    $video
       ->concat([$path1, $path2])
       ->saveFromSameCodecs($path_output, TRUE);

    But it failed with the following error message :

    ffmpeg failed to execute command ’/usr/local/bin/ffmpeg’ ’-f’ ’concat’ ’-safe’ ’0’ ’-i’ ’/private/var/folders/dw/919v2nds7s78pz_qhp7z9rcm0000gn/T/ffmpeg-concath1kHiX’ ’-c’ ’copy’ ’/Users/francescomussi/Desktop/Apps/cameraProject/back-end/camera-laravel/storage/app/public/videos/output.mp4’

    CONCAT USING FFMPEG COMMAND LINE :

    On suggestion on @RolandStarke and @LordNeckbeard I have tried using the ffmpeg command line to get a better insight on what is going on.

    If I use the following command line :

    ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4

    I get the following error, related to the audio opus codec.

    enter image description here

    If I use the following command line, converting the audio coded to acc :

    ffmpeg -f concat -safe 0 -i mylist.txt -c:v copy -c:a aac output.mp4

    The final video is properly created, as a concatenation of the other videos.

    CONCAT USING PHP-FFMPEG : (using saveFromDifferentCodecs)

    It seems the problem is ONLY related to the codec.
    So I have tried using saveFromDifferentCodecs :

    $format = new FFMpeg\Format\Video\X264('libfdk_aac', 'libx264');

    $result = $video1
       ->concat([$path1, $path2])
       ->saveFromDifferentCodecs($format, $output_path);

    But I still get an error :

    ffmpeg failed to execute command ’/usr/local/bin/ffmpeg’ ’-i’ ’/Users/francescomussi/Desktop/Apps/cameraProject/back-end/camera-laravel/storage/app/public/videos/test1.mp4’ ’-i’ ’/Users/francescomussi/Desktop/Apps/cameraProject/back-end/camera-laravel/storage/app/public/videos/test2.mp4’ ’-filter_complex’ ’[0:v:0] [0:a:0] [1:v:0] [1:a:0] concat=n=2:v=1:a=1 [v] [a]’ ’-map’ ’[v]’ ’-map’ ’[a]’ ’-b:a’ ’128k’ ’/Users/francescomussi/Desktop/Apps/cameraProject/back-end/camera-laravel/storage/app/public/videos/output.mp4’

    CONCAT USING PHPFFMPEG (but with different videos) :

    If the problem is only related to the codec, then using two different videos with
    video codec : h264 and audio codec aac,
    it should work, but it doesn’t :

    ffmpeg failed to execute command '/usr/local/bin/ffmpeg' '-f' 'concat' '-safe' '0' '-i' '/private/var/folders/dw/919v2nds7s78pz_qhp7z9rcm0000gn/T/ffmpeg-concatoJGhLt' '-c' 'copy' '/Users/francescomussi/Desktop/Apps/cameraProject/back-end/camera-laravel/storage/app/public/videos/output.mp4'

    But using the command line it works smoothly : ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4

    CONCAT USING shell_exec :

    I have tried using shell_exec, with the first two videos (opus codec) :

    echo shell_exec("/usr/local/bin/ffmpeg -f concat -safe 0 -i /Users/francescomussi/Desktop/Apps/cameraProject/back-end/camera-laravel/mylist.txt -c:v copy -c:a aac /Users/francescomussi/Desktop/Apps/cameraProject/back-end/camera-laravel/output.mp4 2>&1");

    And it works smoothly.
    The final output is created, and with the acc audio codec.

    TESTING THE LIBRARY :

    To see if php-mpeg was actually working, I test it by making a basic resize of a video and it worked correctly.

    RESUME :

    • Using ffmpeg command lines everything works fine
    • Using shell_exec everything works fine
    • Using php-ffmpeg I always get the error ffmpeg failed to execute command

    QUESTION :

    How can I concat videos using php-ffmpeg ?

    Is the issue caused by wrong encoding ?

    Thanks !

  • FFMPEG RTP UBUNTU NETWORK issue

    14 août 2015, par Иван Колесников

    I’m want to copy a bunch of SD sources from mpegts transported with RTP on local files. (VBR mpeg2video, mp2 audio). It works fine for one multicast source with following command : ffmpeg -i rtp ://@IP1:PORT -c copy video1.mpg. But when I run a second ffmpeg instance with following command :
    ffmpeg -i rtp ://@IP2:PORT -c copy video2.mpg then I’m start to getting errors from both ffmpeg instance ("RTP : dropping old packet received too late") and in both files (video1.mpg and video2.mpg) start to recording video from second source (rtp ://@IP2:PORT). This issue is only under Linux (Ubuntu 15.04). I have no problems under Windows and when try the same actions from files to files. Under Ubuntu even two ffplay instances tuned to different sources play back the same content (from source which was opened second). I tried playing back with vlc and there is no such problem.
    I can resolve this issue when using ffmpeg with -f key : ffmpeg -f mpegts -i rtp ://@IP1:PORT -c copy video1.mpg and ffmpeg -f mpegts -i rtp ://@IP2:PORT -c copy video2.mpg, but then I getting following errors : "[mpegts @ 0x306e240] PES packet size mismatch" and receive both files (video1.mpg and video2.mpg) with artifacts and freeze effects. This issue appears for both operation systems. How can I recording video from few RTP streams contemporaneously under Ubuntu without errors and artifacts ? Please give advice.

  • Getting the file name of downloaded video using yt-dlp

    31 décembre 2024, par LT_Orange

    I'm intending to use yt-dlp to download a video and then cut the video down afterward using ffmpeg. But to be able to use ffmpeg I am going to have to know the name of the file that yt-dlp produces. I have read through their documentation but I can't seem to find a way of getting the file name back into my program.