Recherche avancée

Médias (1)

Mot : - Tags -/illustrator

Autres articles (82)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • 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

Sur d’autres sites (5722)

  • FFmpeg_frame toGDImage produces messed up thumbs

    27 juin 2013, par user2526873

    I have written a script in PHP that uploads a movie, converts it to FFmpeg movie and gets the thumb. Everything is working ok, but my thumbs have some sort of blue overlay. My code is :

    $movie = new ffmpeg_movie($uploadFile);
    $frame = $movie->getFrame(15)->toGDimage();

    $width = imagesx($frame);
    $height = imagesy($frame);

    $framecrop = imagecreatetruecolor(100, 80);
    imagecopyresampled($framecrop, $frame, 0, 0, 0, 0, 100, 80, $width, $height);
    imagejpeg($framecrop,"file.jpg");

    What am I doing wrong ? I have this problem with all the movies I upload.

    Thanks in advance for your answers !

  • Watson NarrowBand Speech to Text not accepting ogg file

    19 janvier 2017, par Bob Dill

    NodeJS app using ffmpeg to create ogg files from mp3 & mp4. If the source file is broadband, Watson Speech to Text accepts the file with no issues. If the source file is narrow band, Watson Speech to Text fails to read the ogg file. I’ve tested the output from ffmpeg and the narrowband ogg file has the same audio content (e.g. I can listen to it and hear the same people) as the mp3 file. Yes, in advance, I am changing the call to Watson to correctly specify the model and content_type. Code follows :

    exports.createTranscript = function(req, res, next)
    { var _name = getNameBase(req.body.movie);
     var _type = getType(req.body.movie);
     var _voice = (_type == "mp4") ? "en-US_BroadbandModel" : "en-US_NarrowbandModel" ;
     var _contentType = (_type == "mp4") ? "audio/ogg" : "audio/basic" ;
     var _audio = process.cwd()+"/HTML/movies/"+_name+'ogg';
     var transcriptFile = process.cwd()+"/HTML/movies/"+_name+'json';

     speech_to_text.createSession({model: _voice}, function(error, session) {
       if (error) {console.log('error:', error);}
       else
         {
           var params = { content_type: _contentType, continuous: true,
            audio: fs.createReadStream(_audio),
             session_id: session.session_id
             };
             speech_to_text.recognize(params, function(error, transcript) {
               if (error) {console.log('error:', error);}
               else
                 { fs.writeFile(transcriptFile, JSON.stringify(transcript), function(err) {if (err) {console.log(err);}});
                   res.send(transcript);
                 }
             });
         }
     });
    }

    _type is either mp3 (narrowband from phone recording) or mp4 (broadband)
    model: _voice has been traced to ensure correct setting
    content_type: _contentType has been traced to ensure correct setting

    Any ogg file submitted to Speech to Text with narrowband settings fails with Error: No speech detected for 30s. Tested with both real narrowband files and asking Watson to read a broadband ogg file (created from mp4) as narrowband. Same error message. What am I missing ?

  • is there a faster way to extract various video clips from different sources and concatenate them, using moviepy ?

    27 août 2019, par user2627082

    So I’ve made a small script using moviepy to help me with my video editing process. It basically scans a bunch of subtitle files for specified words and the time duration when it occurs. With that it extracts that particular time duration from video files corresponding to the subtitle files. The extracted mp4 clips are all concatenated and written into one big composition.

    So it’s all running fine but it’s very slow. Can someone tell me it’s possible to make it faster. Am I doing something wrong ? Or is it normal for the process to be slow.

    import os,re
    from pathlib import Path
    from moviepy.editor import *
    import datetime


    def search(words_list, sub_list):

       for x in range(len(words_list)):
           print(words_list[x])
           clips = []
           clips.clear()
           for y in range(len(sub_list)):
               print(sub_list[y])
               stamps = []
               stamps.clear()


               with open(sub_list[y]) as f:
                   paragraphs = (paragraph.split("\n") for paragraph in
               f.read().split("\n\n"))

               for paragraph in paragraphs:
                   if any(words_list[x] in line.lower() for line in paragraph):
                       stamps.append(f"[{paragraph[1].strip()}]")

               videopath = str(sub_list[y]).replace("srt", "mp4").replace(":\\",
               ":\\\\")
               my_clip = VideoFileClip(videopath)


               for stamp in stamps:
                   print(stamp)
                   pre_stamp =  stamp[1:9]
                   post_stamp = stamp[18:26]
                   format = '%H:%M:%S'

                   pre_stamp  = str(datetime.datetime.strptime(pre_stamp, format)
                   -   datetime.timedelta(seconds=4))[11:19]
                   post_stamp = str(datetime.datetime.strptime(post_stamp,format)
                   + datetime.timedelta(seconds=4))[11:19]

                   trim_clip = my_clip.subclip(pre_stamp,post_stamp)
                   clips.append(trim_clip)
                   conc = concatenate_videoclips(clips)
           print(clips)
           conc.write_videofile("C:\\Users\Sri\PycharmProjects\subscrape\movies\\" + words_list[x] + "-comp.mp4")




    words = ["does what","spins","size"]

    subs = list(Path('C:\\Users\Sri\PycharmProjects\subscrape\movies').glob('**/*.srt'))

    search(words,subs)