Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (108)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Qualité du média après traitement

    21 juin 2013, par

    Le bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
    Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

Sur d’autres sites (6721)

  • Progress with rtc.io

    12 août 2014, par silvia

    At the end of July, I gave a presentation about WebRTC and rtc.io at the WDCNZ Web Dev Conference in beautiful Wellington, NZ.

    webrtc_talk

    Putting that talk together reminded me about how far we have come in the last year both with the progress of WebRTC, its standards and browser implementations, as well as with our own small team at NICTA and our rtc.io WebRTC toolbox.

    WDCNZ presentation page5

    One of the most exciting opportunities is still under-exploited : the data channel. When I talked about the above slide and pointed out Bananabread, PeerCDN, Copay, PubNub and also later WebTorrent, that’s where I really started to get Web Developers excited about WebRTC. They can totally see the shift in paradigm to peer-to-peer applications away from the Server-based architecture of the current Web.

    Many were also excited to learn more about rtc.io, our own npm nodules based approach to a JavaScript API for WebRTC.

    rtcio_modules

    We believe that the World of JavaScript has reached a critical stage where we can no longer code by copy-and-paste of JavaScript snippets from all over the Web universe. We need a more structured module reuse approach to JavaScript. Node with JavaScript on the back end really only motivated this development. However, we’ve needed it for a long time on the front end, too. One big library (jquery anyone ?) that does everything that anyone could ever need on the front-end isn’t going to work any longer with the amount of functionality that we now expect Web applications to support. Just look at the insane growth of npm compared to other module collections :

    Packages per day across popular platforms (Shamelessly copied from : http://blog.nodejitsu.com/npm-innovation-through-modularity/)

    For those that – like myself – found it difficult to understand how to tap into the sheer power of npm modules as a font end developer, simply use browserify. npm modules are prepared following the CommonJS module definition spec. Browserify works natively with that and “compiles” all the dependencies of a npm modules into a single bundle.js file that you can use on the front end through a script tag as you would in plain HTML. You can learn more about browserify and module definitions and how to use browserify.

    For those of you not quite ready to dive in with browserify we have prepared prepared the rtc module, which exposes the most commonly used packages of rtc.io through an “RTC” object from a browserified JavaScript file. You can also directly download the JavaScript file from GitHub.

    Using rtc.io rtc JS library
    Using rtc.io rtc JS library

    So, I hope you enjoy rtc.io and I hope you enjoy my slides and large collection of interesting links inside the deck, and of course : enjoy WebRTC ! Thanks to Damon, JEeff, Cathy, Pete and Nathan – you’re an awesome team !

    On a side note, I was really excited to meet the author of browserify, James Halliday (@substack) at WDCNZ, whose talk on “building your own tools” seemed to take me back to the times where everything was done on the command-line. I think James is using Node and the Web in a way that would appeal to a Linux Kernel developer. Fascinating !!

  • Ffmpeg set duration using node-fluent-ffmpeg

    23 mai 2013, par Vprnl

    I'm really new to the world of ffmpeg so please excuses me if this is a stupid queston.

    I'm using the module Node-fluent-ffmpeg to stream a movie and convert it from avi to webm.
    So far so good (it plays the video), but I'm having trouble parsing the duration to the player. My ultimate goal is to be able to skip ahead in the movie. But first the player needs to know how long the video is.

    my code is as followed :

    var stat = fs.statSync(movie);

    var start = 0;
    var end = 0;
    var range = req.header('Range');
    if (range != null) {
    start = parseInt(range.slice(range.indexOf('bytes=')+6,
     range.indexOf('-')));
    end = parseInt(range.slice(range.indexOf('-')+1,
     range.length));
    }
    if (isNaN(end) || end == 0) end = stat.size-1;
    if (start > end) return;

    res.writeHead(206, { // NOTE: a partial http response
       'Connection':'close',
       'Content-Type':'video/webm',
       'Content-Length':end - start,
       'Content-Range':'bytes '+start+'-'+end+'/'+stat.size,
       'Transfer-Encoding':'chunked'
    });

    var  proc = new ffmpeg({ source: movie, nolog: true, priority: 1, timeout:15000})
       .toFormat('webm')
       .withVideoBitrate('1024k')
       .addOptions(['-probesize 900000', '-analyzeduration 0', '-bufsize 14000'])
       .writeToStream(res, function(retcode, error){
       if (!error){
           console.log('file has been converted succesfully',retcode);
       }else{
           console.log('file conversion error',error);
       }
    });

    I tried to set the header with a start and a end based on this article : http://delog.wordpress.com/2011/04/25/stream-webm-file-to-chrome-using-node-js/

    I also looked in the FFmpeg documentation and found -f duration and -ss.
    But I don't quite know how to convert the byte range to seconds.

    I feel like I'm pretty close to a solution but my inexperience with the subject matter prohibits me from getting it to work. If I'm unclear in any way please let me know. (I have a tendency of explaining things fuzzy.)

    Thanks in advance !

  • Traceback error with Python when using ffmpeg to convert a video

    16 mai 2013, par TheMickeyNick

    The simple way my script runs is the user provides a folder location and a filetype and glob.glob() finds the files with the filetype provided and adds them to a list. It then uses a for loop and goes through the list and converts each video. But it doesn't like when I try to run my ffmpeg command. Any help would be awesome. I'm also using Win 7 64 bit with 64 bit ffmpeg and Python 3.3
    Here's the error :

    OS Error
    Traceback (most recent call last):
     File "C:\Python33\lib\subprocess.py", line 1106, in _execute_child
       startupinfo)
    FileNotFoundError: [WinError 2] The system cannot find the file specified

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
     File "C:\Users\user\Workspace\PythonConverter\HTMLandPythonConverter\Converter.py", line 77, in <module>
       massConvert(fileNames)
     File "C:\Users\user\Workspace\PythonConverter\HTMLandPythonConverter\Converter.py", line 47, in massConvert
       convertVideotoNewFormat(&#39;.mp4&#39;, x)
     File "C:\Users\user\Workspace\PythonConverter\HTMLandPythonConverter\Converter.py", line 61, in convertVideotoNewFormat
       myFile = subprocess.Popen(ffmpegString)#, stdout=subprocess.PIPE, stderr=subprocess.PIPE
     File "C:\Python33\lib\subprocess.py", line 820, in __init__
       restore_signals, start_new_session)
     File "C:\Python33\lib\subprocess.py", line 1112, in _execute_child
       raise WindowsError(*e.args)
    FileNotFoundError: [WinError 2] The system cannot find the file specified
    </module>

    Here is my code :

    import subprocess
    from subprocess import call
    import glob

    fileNames = []
    fileLocation = {}
    filetype = {}
    def convertString(location):
       s = list(location)
       for i in range(len(s)):
           if s[i] in &#39;\\&#39;:
               s[i] = &#39;/&#39;

       if s[len(s)-1] != &#39;/&#39;:
           s.append(&#39;/&#39;)
       location = "".join(s)
       return location

    def convertStringBack(stringTo):
       s = list(stringTo)
       for i in range(len(s)):
           if s[i] in &#39;/&#39;:
               s[i] = &#39;\\&#39;
       stringTo = "".join(s)
       return stringTo

    def fileTypeTester():
       FieldType = &#39;*&#39; + input(&#39;What\&#39;s the file type we are converting from?&#39;)
       typeSplit = list(FieldType)
       if typeSplit[1] != &#39;.&#39;:
           typeSplit.insert(1,&#39;.&#39;)
       FieldType = "".join(typeSplit)
       if FieldType not in [&#39;*.flv&#39;,&#39;*.kdb&#39;]:
           print(&#39;Not a valid file type&#39;)
       else:
           return FieldType
       return None

    def massConvert(listOfFiles):
       print(&#39;Starting Conversion&#39;)
       for x in listOfFiles:
           #x = convertStringBack(x)
           print(&#39;Converting &#39; + x + &#39; to .mp4&#39;)
           convertVideotoNewFormat(&#39;.mp4&#39;, x)
       print(&#39;Finished File Conversion&#39;)


    def convertVideotoNewFormat(newFormat, fileLoc):
       newFilePath = fileLoc[0:len(fileLoc)-4]
       ffmpegString = ["ffmpeg64","-i", fileLoc,"-qscale","0","-ar","22050","-vcodec","libx264",newFilePath,newFormat]
       try:
           subprocess.check_call(newFilePath)
       except OSError:
           print(&#39;OS Error&#39;)
       except subprocess.CalledProcessError:
           print(&#39;Subprocess Error&#39;)
       myFile = subprocess.Popen(ffmpegString)
       print(myFile)

    #This will replace old HTML flv object tag with new video tag, but it is yet to be implemented
    def replaceHTML():
       pass

    fileLocation = input(&#39;What is the path of the files you\&#39;d like to convert?&#39;)
    fileLocation = convertString(fileLocation)
    fileType = fileTypeTester()
    fileNames = glob.glob(fileLocation + fileType)
    massConvert(fileNames)

    I've looked around and most of the tutorials are in 2.7 the code is 3.3 and I can't find a tutorial to use ffmpeg for 3.3. My ffmpeg is set to 'ffmpeg64' on my PATH.

    Thanks !