Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (84)

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

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

Sur d’autres sites (8375)

  • Concatenate / Join MP4 files using ffmpeg and windows command line batch NOT LINUX

    17 juillet 2014, par julesverne

    I’ve written a batch script that attempts to take a generic introductory title video (MP4) that runs for 12 seconds and attaches it to the beginning of 4 other MP4 videos (same video but each has a different language audio track)

    According to ffmpeg syntax here : http://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20concatenate%20%28join,%20merge%29%20media%20files the concat demuxer needs to be run from a text file that looks like this :

    # this is a comment
    file '/path/to/file1'
    file '/path/to/file2'
    file '/path/to/file3'

    I believe everything in my script up until the point of joining the files appears to be working correctly. But I get this error :

    [concat @ 04177d00] Line 2: unknown keyword ''C:\Users\Joe\1May\session3\readyforfinalconversion\frenchfile.mp4'
    filelistFrench.txt: Invalid data found when processing input
    [concat @ 03b70a80] Line 2: unknown keyword ''C:\Users\Joe\1May\session3\readyforfinalconversion\spanishfile.mp4'
    filelistSpanish.txt: Invalid data found when processing input
    [concat @ 0211b960] Line 2: unknown keyword ''C:\Users\Joe\1May\session3\readyforfinalconversion\basquefile.mp4'
    filelistBasque.txt: Invalid data found when processing input
    [concat @ 03a20a80] Line 2: unknown keyword ''C:\Users\Joe\1May\session3\readyforfinalconversion\Englishfile.mp4'
    filelistEnglish.txt: Invalid data found when processing input

    I believe the issue lies in the text file I’m creating. Please excuse my n00b ignorance, but sometimes new script makers like myself get confused about developer jargon and may take things literally.

    So when I look at that example text file they gave, am I correct in thinking THIS is what my text file should look like ?

    # this is a comment
    Titlefile.mp4 'C:\Users\Joe\1May\session3\readyforfinalconversion\Titlefile.mp4'
    Englishfile.mp4 'C:\Users\Joe\1May\session3\readyforfinalconversion\Englishfile.mp4'

    Again, am I being too literal ? are the quotations correct ? Are the slashes correct ? In the example they provide the slashes in the path are / instead of normal windows \ . I’ll provide the entire script in case it helps.

    @echo off

    setlocal EnableDelayedExpansion

    rem Create an array of languages
    set i=0
    for %%a in (French Spanish Basque English) do (
      set /A i+=1
      set term[!i!]=%%a
    )

    rem Get the title video file name from user

    set /p titlevideofilename=What is the title video file

    name?

    rem create a path variable for the title video file

    set pathtotitlevideo=%~dp0%titlevideofilename%

    rem Get the names of the different language video files to append to the title video
    rem create a path variable for each different language video files

    for /L %%i in (1,1,4) do (
      set /p language[%%i]=what is the name of the !term

    [%%i]! file you want to append after the title video?
      set pathtofile[%%i]=%~dp0!language[%%i]!
    )

    rem create data file for ffmpeg based on variable data

    for /L %%i in (1,1,4) do (
       echo # this is a comment>>filelist!term[%

    %i]!.txt
       echo file '%pathtotitlevideo%'>>filelist!term[%

    %i]!.txt
       echo file '!pathtofile[%%i]!'>>filelist!term[%

    %i]!.txt
    )

    cls

    rem join files using ffmpeg concat option

    for /L %%i in (1,1,4) do (
      c:\ffmpeg\ffmpeg\bin\ffmpeg.exe -loglevel error -f

    concat -i filelist!term[%%i]!.txt -c copy !language[%

    %i]!.!term[%%i]!.withtitle.mp4
    )

    endlocal

    :eof
    exit

    EDIT
    Thanks to @foxidrive making me look at the simplicity of it... it occurred to me that Apparently I wasn’t being literal enough. I made these 3 changes and script works perfectly now
    1 : "file" in there example literally meant the word "file"
    2 : needed the use of single quotes not double quotes as it shows in there example.
    3 : Used "\" instead of "/" as they have in there example.

    So NOW my code to create the text files looks like this :

    rem create data file for ffmpeg based on variable data

    for /L %%i in (1,1,4) do (
       echo # this is a comment>>filelist!term[%

    %i]!.txt
       echo file '%pathtotitlevideo%'>>filelist!term[%

    %i]!.txt
       echo file '!pathtofile[%%i]!'>>filelist!term[%

    %i]!.txt
    )

    So NOW my text file looks like this :

    # this is a comment    
    file 'C:\Users\Joe\1May\session3\readyforfinalconversion\Titlefile.mp4'
    file 'C:\Users\Joe\1May\session3\readyforfinalconversion\Englishfile.mp4'
  • Concatenate / Join MP4 files using ffmpeg and windows command line batch NOT LINUX

    10 septembre 2022, par julesverne

    I've written a batch script that attempts to take a generic introductory title video (MP4) that runs for 12 seconds and attaches it to the beginning of 4 other MP4 videos (same video but each has a different language audio track)

    



    According to ffmpeg syntax here : http://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20concatenate%20%28join,%20merge%29%20media%20files the concat demuxer needs to be run from a text file that looks like this :

    



    # this is a comment
file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'


    



    I believe everything in my script up until the point of joining the files appears to be working correctly. But I get this error :

    



    [concat @ 04177d00] Line 2: unknown keyword ''C:\Users\Joe\1May\session3\readyforfinalconversion\frenchfile.mp4'
filelistFrench.txt: Invalid data found when processing input
[concat @ 03b70a80] Line 2: unknown keyword ''C:\Users\Joe\1May\session3\readyforfinalconversion\spanishfile.mp4'
filelistSpanish.txt: Invalid data found when processing input
[concat @ 0211b960] Line 2: unknown keyword ''C:\Users\Joe\1May\session3\readyforfinalconversion\basquefile.mp4'
filelistBasque.txt: Invalid data found when processing input
[concat @ 03a20a80] Line 2: unknown keyword ''C:\Users\Joe\1May\session3\readyforfinalconversion\Englishfile.mp4'
filelistEnglish.txt: Invalid data found when processing input


    



    I believe the issue lies in the text file I'm creating. Please excuse my n00b ignorance, but sometimes new script makers like myself get confused about developer jargon and may take things literally.

    



    So when I look at that example text file they gave, am I correct in thinking THIS is what my text file should look like ?

    



    # this is a comment
Titlefile.mp4 'C:\Users\Joe\1May\session3\readyforfinalconversion\Titlefile.mp4'
Englishfile.mp4 'C:\Users\Joe\1May\session3\readyforfinalconversion\Englishfile.mp4'


    



    Again, am I being too literal ? are the quotations correct ? Are the slashes correct ? In the example they provide the slashes in the path are / instead of normal windows \ . I'll provide the entire script in case it helps.

    



    @echo off

setlocal EnableDelayedExpansion

rem Create an array of languages
set i=0
for %%a in (French Spanish Basque English) do (
   set /A i+=1
   set term[!i!]=%%a
)

rem Get the title video file name from user

set /p titlevideofilename=What is the title video file 

name?

rem create a path variable for the title video file

set pathtotitlevideo=%~dp0%titlevideofilename%

rem Get the names of the different language video files to append to the title video
rem create a path variable for each different language video files

for /L %%i in (1,1,4) do (
   set /p language[%%i]=what is the name of the !term

[%%i]! file you want to append after the title video?
   set pathtofile[%%i]=%~dp0!language[%%i]!
)

rem create data file for ffmpeg based on variable data

for /L %%i in (1,1,4) do (
    echo # this is a comment>>filelist!term[%

%i]!.txt
    echo file '%pathtotitlevideo%'>>filelist!term[%

%i]!.txt
    echo file '!pathtofile[%%i]!'>>filelist!term[%

%i]!.txt
)

cls

rem join files using ffmpeg concat option

for /L %%i in (1,1,4) do (
   c:\ffmpeg\ffmpeg\bin\ffmpeg.exe -loglevel error -f 

concat -i filelist!term[%%i]!.txt -c copy !language[%

%i]!.!term[%%i]!.withtitle.mp4
)

endlocal

:eof
exit


    



    EDIT
    
Thanks to @foxidrive making me look at the simplicity of it... it occurred to me that Apparently I wasn't being literal enough. I made these 3 changes and script works perfectly now
1 : "file" in there example literally meant the word "file" 
2 : needed the use of single quotes not double quotes as it shows in there example. 
3 : Used "\" instead of "/" as they have in there example.

    



    So NOW my code to create the text files looks like this :

    



    rem create data file for ffmpeg based on variable data

for /L %%i in (1,1,4) do (
    echo # this is a comment>>filelist!term[%

%i]!.txt
    echo file '%pathtotitlevideo%'>>filelist!term[%

%i]!.txt
    echo file '!pathtofile[%%i]!'>>filelist!term[%

%i]!.txt
)


    



    So NOW my text file looks like this :

    



    # this is a comment    
file 'C:\Users\Joe\1May\session3\readyforfinalconversion\Titlefile.mp4'
file 'C:\Users\Joe\1May\session3\readyforfinalconversion\Englishfile.mp4'


    


  • HTML5 Video/Audio to Nodejs via Socket.io but with a twist - FFMPEG

    9 janvier 2014, par user1840958

    I'm writing this very simple "skype clone". I tried a variety of other languages, python and layering over Node.js with Meteor, WebRTC, but Node.js+socket.io seems to be working the best and cleanest however I've hit a road block and I can't get it all to work correctly.

    I have two issues,
    1. I think I'm sending real data from the HTML5 getUserMedia, but I might not, and I don't know how to test or find out. I think that using, "video.src = window.URL.createObjectURL(stream) ;" makes the Blob stream an actual Data stream... but I don't know.

    This is my Broadcast.html
    It's a very simple getUserMedia grab the camera and microphone... Then I connect to the Socket and on click of the Broadcast button, fires off the Emit to 'Join' and sends over the 'webcamstream' data.

    <video autoplay="autoplay" height="280"></video>
    <button class="recordbutton">Broadcast</button>


    <code class="echappe-js">&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;<br />
    var socket = io.connect(&amp;#39;http://video.domain.com:3031&amp;#39;);<br />
    socket.on(&amp;#39;connect&amp;#39;, function() {<br />
     $(&amp;#39;#conversation&amp;#39;).append(&amp;#39;Connected &lt;br /&gt;&amp;#39;);<br />
    });<br />
    <br />
    function onVideoFail(e) {<br />
     console.log(&amp;#39;webcam fail!&amp;#39;, e);<br />
    };<br />
    <br />
    function hasGetUserMedia() {<br />
     return !!(navigator.getUserMedia || <br />
       navigator.webkitGetUserMedia || <br />
       navigator.mozGetUserMedia || <br />
       navigator.msGetUserMedia);<br />
    }<br />
    <br />
    if (hasGetUserMedia()) {<br />
     alert(&amp;#39;It is working...&amp;#39;);<br />
    } else {<br />
     alert(&amp;#39;getUserMedia() is not supported in your browser&amp;#39;);<br />
    }<br />
    <br />
    window.URL = window.URL || window.webkitURL;<br />
    navigator.getUserMedia  = navigator.getUserMedia || <br />
                            navigator.webkitGetUserMedia ||<br />
                             navigator.mozGetUserMedia || <br />
                              navigator.msGetUserMedia;<br />
    <br />
    var video = document.querySelector(&amp;#39;video&amp;#39;);<br />
    var streamRecorder;<br />
    var webcamstream;<br />
    <br />
    if (navigator.getUserMedia) {<br />
           navigator.getUserMedia({audio: true, video: true}, function(stream) {<br />
               video.src = window.URL.createObjectURL(stream);<br />
               webcamstream = stream;<br />
           }, onVideoFail);<br />
    } else {<br />
      alert (&amp;#39;failed&amp;#39;);<br />
    }<br />
    <br />
    function startBroadcasting() {<br />
       alert(&amp;#39;Broadcast Now Clicked&amp;#39;);<br />
       console.log(webcamstream);<br />
       socket.emit(&amp;#39;join&amp;#39;, webcamstream);<br />
       socket.emit(&amp;#39;echo&amp;#39;, &amp;#39;echo1 echo2 echo3 &lt;br /&gt;&amp;#39;);<br />
    }<br />
    <br />
    socket.on(&amp;#39;echo&amp;#39;, function(data) {<br />
       $(&amp;#39;#conversation&amp;#39;).append(data);<br />
    }); <br />
    &lt;/code&gt;&lt;/pre&gt;<br />
    <br />
    &lt;p&gt;&lt;/p&gt;<br />
    <br />
    &lt;p&gt;This is the app.js<br />
    2. What I&amp;#39;m trying to do here is consume in the &amp;#39;stream&amp;#39; from the socket, but in it&amp;#39;s place I have a test video to see if the FFMPEG is actually working. I&amp;#39;m using &lt;a href=&quot;https://github.com/schaermu/node-fluent-ffmpeg&quot; rel=&quot;nofollow&quot;&gt;https://github.com/schaermu/node-fluent-ffmpeg&lt;/a&gt;.&lt;/p&gt;<br />
    <br />
    &lt;p&gt;When I run this test with my myth.mp4 file, I do get an out.avi however it&amp;#39;s 0 bytes ??&lt;/p&gt;<br />
    <br />
    &lt;pre&gt;&lt;code&gt;var express = require(&amp;#39;express&amp;#39;);<br />
    var socket = require(&amp;#39;socket.io&amp;#39;);<br />
    var ffmpeg = require(&amp;#39;fluent-ffmpeg&amp;#39;);<br />
    var fs = require(&amp;#39;fs&amp;#39;);<br />
    <br />
    var app = express();<br />
    <br />
    app.configure(function(req, res){<br />
       app.use(express.static(__dirname + &amp;#39;/&amp;#39;));<br />
    });<br />
    <br />
    var server = app.listen(3031);<br />
    var io = socket.listen(server);<br />
    <br />
    io.sockets.on(&amp;#39;connection&amp;#39;, function(socket) {<br />
       socket.on(&amp;#39;join&amp;#39;, function(stream) {<br />
           socket.stream = stream;<br />
           socket.emit(&amp;#39;echo&amp;#39;, socket.stream + &amp;#39;&lt;br /&gt;&amp;#39;);<br />
           var proc = new ffmpeg({source:&amp;#39;/srv/www/domain.com/video/red/myth.mp4&amp;#39;})<br />
               .withAspect(&amp;#39;4:3&amp;#39;)<br />
               .withSize(&amp;#39;640x480&amp;#39;)<br />
               .applyAutopadding(true, &amp;#39;white&amp;#39;)<br />
               .saveToFile(&amp;#39;/srv/www/domain.com/video/red/out.avi&amp;#39;, function(retcode, error){<br />
                   socket.emit(&amp;#39;echo&amp;#39;, &amp;#39;file has been converted succesfully &lt;br /&gt;&amp;#39;);<br />
               });<br />
       });<br />
       socket.on(&amp;#39;echo&amp;#39;, function(data) {<br />
           socket.emit(&amp;#39;echo&amp;#39;, data);<br />
       });<br />
    });<br />
    &lt;/code&gt;&lt;/pre&gt;<br />
    <br />
    &lt;p&gt;I get no errors on Node Start up, I get no Errors on running.  I do get a 0 Byte out.avi file freshly created every time I run this.&lt;/p&gt;<br />
    <br />
    &lt;p&gt;I have a linode VPS with CentOS/Nginx&lt;/p&gt;<br />
    <br />
    &lt;p&gt;node -v<br />
    v0.10.21&lt;/p&gt;<br />
    <br />
    &lt;p&gt;FFMPEG<br />
    ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers<br />
     built on Nov 23 2013 17:43:13 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)<br />
     configuration: --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libvo-aacenc --enable-libxvid --disable-ffplay --enable-shared --enable-gpl --enable-postproc --enable-nonfree --enable-avfilter --enable-pthreads --extra-cflags=-fPIC<br />
     libavutil      52. 18.100 / 52. 18.100<br />
     libavcodec     54. 92.100 / 54. 92.100<br />
     libavformat    54. 63.104 / 54. 63.104<br />
     libavdevice    54.  3.103 / 54.  3.103<br />
     libavfilter     3. 42.103 /  3. 42.103<br />
     libswscale      2.  2.100 /  2.  2.100<br />
     libswresample   0. 17.102 /  0. 17.102<br />
     libpostproc    52.  2.100 / 52.  2.100<br />
    Hyper fast Audio and Video encoder<br />
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...&lt;/p&gt;<br />
    <br />
    &lt;p&gt;Thanks in advance for your help.&lt;/p&gt;