Recherche avancée

Médias (91)

Autres articles (66)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • 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

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

  • python 3 using ffmpeg in a subprocess getting stderr decoding error

    4 mai 2024, par jdauthre

    I am running ffmpeg as a subprocess and using the stderr to get various bits of data like the subtitles stream Id's. It works fine for most videos, but one with japanese subtitles results in an error :

    


    'charmap' codec can't decode byte in position xxx : character maps to

    


    Much googling suggests the problem is that the japanese requires unicode, whereas English does not. Solutions offered refer to problems with files, and I cannot find a way of doing the same with the stderr. Relevent Code is below :

    


    command = [ffmpeg,"-y","-i",fileSelected,"-acodec","pcm_s16le",
                  "-vn","-t","3", "-f",            "null","-"]
print(command)   
proc = subprocess.Popen(command,stderr=PIPE,Jstdin=subprocess.PIPE,
                            universal_newlines=True,startupinfo=startupinfo)
  
stream = ""    
for line in proc.stderr:
    try:
        print("line",line)
    except exception as error:
        print("print",error)
        line = line[:-1]
        if "Stream #" in line:
            estream = line.split("#",1)[1]
            estream =estream.split(" (",1)[0]
            print("estream",estream)
            stream = stream + estream +"\n"  #.split("(",1)[0] 
            stream = stream + estream +"\n"


    


  • Revision 17501 : only generate a random serial number for one stream, and increment it ...

    10 octobre 2010, par oggk — Log

    only generate a random serial number for one stream, and increment it for
    the subsequent streams, to avoid a possible (though unlikely) collision
    OK’d by j.

  • ffmpeg - overlay a video with rounded corners

    4 novembre 2019, par asi

    I am successfully using overlaying a scaled (smaller) video on top of a larger one but am struggling to understand how could I give the small video a rounded corners mask.

    Edit

    thanks to @loogan comment I’ve managed to get a working command that created applies a circular mask :

    ffmpeg
       -i main.mp4
       -i vignette.mp4
       -filter_complex
         [1:v]scale=300:-1[scaled];
         [scaled]split [scaled0][scaled11];
         [scaled0]trim=end_frame=1,geq='st(3,pow(X-(W/2),2)+pow(Y-(H/2),2));if(lte(ld(3),780*780),255,0)':3:3,loop=-1:1,setpts=N/FRAME_RATE/TB[mask];
       [scaled1][mask]alphamerge[cutout];
       [0][cutout]overlay=x=W-w:y=0[v];
       -map [v]
       -map [a]  
       output.mp4

    but how to get from a circle to a rounded rect still eludes me. cant quite get what are the params that geq expects and the math to generate them.

    assuming that the video that needs masking is 200 * 300 and the corners should have a 5px radius, is there a geq command that can create this mask ? maybe en ellipse ?

    or maybe a better way would be to use a pre-made png as a mask ?

    any insights welcome