Recherche avancée

Médias (0)

Mot : - Tags -/content

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (53)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (3951)

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