Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (34)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

Sur d’autres sites (7112)

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

  • DirectShow Encryption and Decryption Filters incorrect path leading to wrong decoding ?

    11 mai 2016, par Michael Chi Lam

    Situation : I’m creating two DirectShow Filters cryptography. I’ve written them as In place transformations however it’s not working as planned, I believe it has something to do my encoding and decoding paths. My source is an AVI and my output a encrypted MP4. (Encryption Filter) for my decryption filter I take in a mp4 and render the video. However when I attempt to render the video, the play back is a black screen.

    AVI to MP4 on GraphStudioNext :
    enter image description here

    MP4 to Video Renderer :
    enter image description here

    Both of them works, however when I insert my Cryptography(This is the encryption, I got lazy and didn’t rename it properly) and Decryption filter respectively it doesn’t work

    I placed my Encrypt and Decrypt side by side (See below) and it generates an mp4 that I can play back.
    enter image description here

    Question : Is there a filter I am missing on the decoding path ? (Mp4 to Render)

  • Problems with modifying encoder metadata with FFMPEG

    19 avril 2024, par yrcje

    I'm trying to change FFMPEG encoder writing application with FFMPEG -metadata and for whatever reason, it's reading the input but not actually writing anything out.

    



    -map_metadata -metadata:s:v:0 -metadata writing_application, basically every single stack overflow and stack exchange thread, but they all won't write to the file at all.

    



    ffmpeg -i x.mp4 -s 1920x1080 -r 59.94 -c:v h264_nvenc -b:v 6000k -vf yadif=1 -preset fast -fflags +bitexact -flags:v +bitexact -flags:a +bitexact -ac 2 x.mp4
ffmpeg -i x.mp4 -c:v copy -c:a copy -metadata Encoder="TeXT Encoder" -fflags +bitexact -flags:v +bitexact -flags:a +bitexact test.mp4
ffmpeg -i x.mp4 -vcodec copy -acodec copy -map_metadata out.mp4
ffmpeg -i x.mp4 -vcodec copy -acodec copy -metadata encoder="Encoder" -metadata comment="XX" testmeta.mp4
ffmpeg -i x.ts -c:v copy -c:a copy -metadata:s:v:0 h264 ISFT='TeXT' x.mp4
ffmpeg -i x.mp4 -i FFMETADATAFILE -map_metadata 1 -codec copy testcopy.mp4
ffmpeg -i x.ts -f ffmetadata FF


    



    METADATAFILE

    



    I tried to extracting the data and rewrite it back with FFMETADATAFILE but it doesn't show up. Tried forcing ffmpeg to write without any emtadata and write it back but doesn't work. Was wondering if I can write my own encoder that writes the specific encoder name, like how Handbrake/Lavf writes the encoder application into the METADATA of the video file. Or just use FFMPEG and modify the METADATA natively.