Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (58)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (9280)

  • Cut a video in between key frames without re-encoding the full video using ffpmeg ? [closed]

    13 juillet 2024, par bguiz

    I would like to cut a video at the beginning at any particular timestamp, and it need to be precise, so the nearest key frame is not good enough.

    


    Also, these videos are rather long - an hour or longer - so I would like to avoid re-encoding this altogether if possible, or otherwise only re-encode a minimal fraction of the total duration. Thus, would like to maximise the use of -vcodec copy.

    


    How can I accomplish this using ffmpeg ?

    


    NOTE : See scenario, and my own rough idea for a possible solution below.

    



    


    Scenario :

    


      

    • Original video

        

      • Length of 1:00:00
      • 


      • Has a key frame every 10s
      • 


      


    • 


    • Desired cut :

        

      • From 0:01:35 through till the end
      • 


      


    • 


    • Attempt #1 :

        

      • Using -ss 0:01:35 -i blah.mp4 -vcodec copy, what results is a file where :
      • 


      • audio starts at 0:01:30
      • 


      • video also starts at 0:01:30
      • 


      • this starts both the audio and the video too early
      • 


      


    • 


    • using -i blah.mp4 -ss 0:01:35 -vcodec copy, what results is a file where :

        

      • audio starts at 0:01:35,
      • 


      • but the video is blank/ black for the first 5 seconds,

          

        • until 0:01:40, when the video starts
        • 


        


      • 


      • this starts the audio on time,
but the video starts too late
      • 


      


    • 


    



    


    Rough idea

    


      

    • (1) cut 0:01:30 to 0:01:40

        

      • re-encode this to have new key frames,
including one at the target time of 0:01:35
      • 


      • then cut this to get the 5 seconds from 0:01:35 through 0:01:40
      • 


      


    • 


    • (2) cut 0:01:40 through till the end

        

      • without re-encoding, using -vcodec copy
      • 


      


    • 


    • (3) ffmpeg concat the first short clip (the 5 second one)
with the second long clip
    • 


    


    I know/ can work out the commands for (2) and (3), but am unsure about what commands are needed for (1).

    


  • On Heroku I got FFMPEG::Error (Failed encoding.Errors : encoded file is invalid. Full output : )

    8 octobre 2020, par Ruslan Valeev

    The code is :

    


    tempfile = Tempfile.open('content')
tempfile.write(content)
movie = FFMPEG::Movie.new(tempfile.path)
screenshot_temp_file = Tempfile.open('screenshot')
movie.screenshot(screenshot_temp_file.path)


    


    everything works fine locally, but when I try this on Heroku I got error at last row :

    


    irb(main):013:0> movie.screenshot(screenshot_temp_file.path)&#xA;I, [2020-10-07T15:48:27.132114 #7]  INFO -- : Running transcoding...&#xA;["/app/vendor/ffmpeg/ffmpeg", "-y", "-i", "/tmp/content20201007-7-1g1955b", "-vframes", "1", "-f", "image2", "/tmp/screenshot20201007-7-1mmts7s"]&#xA;&#xA;E, [2020-10-07T15:48:27.190572 #7] ERROR -- : Failed encoding...&#xA;["/app/vendor/ffmpeg/ffmpeg", "-y", "-i", "/tmp/content20201007-7-1g1955b", "-vframes", "1", "-f", "image2", "/tmp/screenshot20201007-7-1mmts7s"]&#xA;&#xA;&#xA;Errors: encoded file is invalid. &#xA;&#xA;Traceback (most recent call last):&#xA;        7: from /app/bin/irb:30:in `<main>&#x27;&#xA;        6: from /app/bin/irb:30:in `load&#x27;&#xA;        5: from /app/vendor/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/irb-1.0.0/exe/irb:11:in `<top>&#x27;&#xA;        4: from (irb):13&#xA;        3: from /app/vendor/bundle/ruby/2.6.0/gems/streamio-ffmpeg-3.0.2/lib/ffmpeg/movie.rb:204:in `screenshot&#x27;&#xA;        2: from /app/vendor/bundle/ruby/2.6.0/gems/streamio-ffmpeg-3.0.2/lib/ffmpeg/transcoder.rb:45:in `run&#x27;&#xA;        1: from /app/vendor/bundle/ruby/2.6.0/gems/streamio-ffmpeg-3.0.2/lib/ffmpeg/transcoder.rb:112:in `validate_output_file&#x27;&#xA;FFMPEG::Error (Failed encoding.Errors: encoded file is invalid. Full output: )&#xA;</top></main>

    &#xA;

    I've try to pass some options, like :seek_time and validate: false but nothing changed. What am I doing wrong ? Thank you so much !

    &#xA;

    EDIT :&#xA;After Full output: ) there is nothing.&#xA;I've install FFMPEG buildpack on Heroku, and can see it in ui :

    &#xA;

    enter image description here

    &#xA;

  • swscale/utils : override forced-zero formats back to full range

    10 octobre 2020, par Jan Ekström
    swscale/utils : override forced-zero formats back to full range
    

    Fixes vf_scale outputting RGB AVFrames with limited range flagged
    in case either input or output specifically sets the range.

    This is the reverse of the logic utilized for RGB and PAL8 content
    in sws_setColorspaceDetails.

    • [DH] libswscale/utils.c