Recherche avancée

Médias (91)

Autres articles (20)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (4749)

  • Why does moviepy complain about bitrate while generating audiofile ?

    11 janvier 2017, par Roman

    I have just try to use moviepy library for the first time. Generation of movies from numpy arrays was really simple, intuitive and worked out of box. This is what I tried :

    from moviepy.editor import VideoClip
    import numpy as np

    def make_frame(t):

       val = int(255.0*(t/3.0))

       ls = []
       for height in range(100):
           row = []
           for width in range(300):
               row.append([val,0,0])
           ls.append(row)
       frame = np.array(ls)
       return frame

    animation = VideoClip(make_frame, duration = 3)

    animation.write_gif('first_try.gif', fps=24)
    animation.write_videofile('first_try.mp4', fps=24)

    Then I wanted to use moviepy to generate sound. In theory it should work in a very similar way. Here is what I tried :

    from moviepy.editor import AudioClip
    import numpy as np

    make_frame = lambda t : 2*[ np.sin(404 * 2 * np.pi * t) ]
    clip = AudioClip(make_frame, duration=5)

    clip.write_audiofile('sound.mp4')

    However, I got an error message :

    [MoviePy] Writing audio in sound.mp4
    |----------| 0/111   0% [elapsed: 00:00 left: ?, ? iters/sec]Traceback (most recent call last):
     File "sound.py", line 9, in <module>
       clip.write_audiofile('sound.mp4')
     File "<string>", line 2, in write_audiofile
     File "/usr/local/lib/python2.7/dist-packages/moviepy/decorators.py", line 54, in requires_duration
       return f(clip, *a, **k)
     File "/usr/local/lib/python2.7/dist-packages/moviepy/audio/AudioClip.py", line 204, in write_audiofile
       verbose=verbose, ffmpeg_params=ffmpeg_params)
     File "<string>", line 2, in ffmpeg_audiowrite
     File "/usr/local/lib/python2.7/dist-packages/moviepy/decorators.py", line 54, in requires_duration
       return f(clip, *a, **k)
     File "/usr/local/lib/python2.7/dist-packages/moviepy/audio/io/ffmpeg_audiowriter.py", line 162, in ffmpeg_audiowrite
       writer.write_frames(chunk)
     File "/usr/local/lib/python2.7/dist-packages/moviepy/audio/io/ffmpeg_audiowriter.py", line 122, in write_frames
       raise IOError(error)
    IOError: [Errno 32] Broken pipe

    MoviePy error: FFMPEG encountered the following error while writing file sound.mp4:

    Invalid encoder type 'libx264'


    The audio export failed, possily because the bitrate you specified was two high or too low for the video codec.
    </string></string></module>

    Does anybody know what this error means and how this problem can be resolved ?

  • How to stream to a element using fluent-ffmpeg

    19 mai 2017, par Lukas

    I am writing on an electron application and I am trying to use fluent-ffmpeg to create a streaming server and use a <video></video> element to consume that stream. I wonder how to set up fluent-ffmpeg and the <video></video> using flowplayer like this :

    Server :

    const express = require('express');
    const ffmpeg = require('fluent-ffmpeg');

    const app = express();

    app.use(express.static(__dirname + '/flowplayer'));

    app.get('/', function(req, res) {
       res.send('index.html');
    });

    app.get('/video/:filename', function(req, res) {
       res.contentType('flv');
       // make sure you set the correct path to your video file storage
       const pathToMovie = '/Users/luke/Movies/' + req.params.filename;
       const proc = ffmpeg(pathToMovie)
       // use the 'flashvideo' preset (located in /lib/presets/flashvideo.js)
           .preset('divx')
           // setup event handlers
           .on('end', function() {
               console.log('file has been converted succesfully');
           })
           .on('error', function(err) {
               console.log('an error happened: ' + err.message);
           })
           // save to stream
           .pipe(res, {end:true});
    });

    app.listen(4000);

    Webseite with <video></video> element :

     
       
       <code class="echappe-js">&lt;script src=&quot;https://code.jquery.com/jquery-1.11.2.min.js&quot;&gt;&lt;/script&gt;

    &lt;script src='http://stackoverflow.com/feeds/tag/flowplayer-7.0.4/flowplayer.min.js'&gt;&lt;/script&gt;

    &lt;script&gt;<br />
       require('./ffmpeg-server.js');<br />
     &lt;/script&gt;

    The main problem I see right now is to find a way to set up the right settings for ffmpeg (currently I am using the divx preset together with the video type video/mpeg4 in the HTML which (of course) does not work.

  • ffmpeg mp4 file is not valid

    10 mars 2014, par Flash Thunder

    I was looking for answer on Internet but, didn't find any...

    Got 3 movies, all made by ffmpeg from separate frames in png files with command :

    ffmpeg -r 100 -qscale 2 -i input/%06d.png output/movie.mp4

    Two of them work perfectly... Windows Media Player and all others see it as correct format..., but one of them not. Only VLC can play it, all other players say that it is unknown format. It probably has something to do with size of images. Would like to know what are the criteria... what size should it have... why one is working and other is not...

    Sizes are :

    1. 1600x1570 - works fine
    2. 1880x616 - works fine
    3. 1891x725 - doesn't work...

    This is really weird, because fullhd has width of 1920, so all above are lower...

    All images are made by PHP with gdlib, all saved the same method... it is not the problem of count, because no matter if I get only first 100 frames, or whole movie, it still doesn't work... only the last one. Any ideas what could possibly be wrong ?

    Complete FFMPEG output (for 200 frames) :

    FFmpeg version SVN-r0.5.10-4:0.5.10-1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
     configuration: --extra-version=4:0.5.10-1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libfaad --enable-libdc1394 --enable-shared --disable-static
     libavutil     49.15. 0 / 49.15. 0
     libavcodec    52.20. 1 / 52.20. 1
     libavformat   52.31. 0 / 52.31. 0
     libavdevice   52. 1. 0 / 52. 1. 0
     libavfilter    0. 4. 0 /  0. 4. 0
     libswscale     0. 7. 1 /  0. 7. 1
     libpostproc   51. 2. 0 / 51. 2. 0
     built on Feb 16 2013 09:22:58, gcc: 4.4.5
    Input #0, image2, from &#39;input/%06d.png&#39;:
     Duration: 00:00:02.01, start: 0.000000, bitrate: N/A
       Stream #0.0: Video: png, rgb24, 1891x725, 100 tbr, 100 tbn, 100 tbc
    Output #0, mp4, to &#39;output/movie.mp4&#39;:
       Stream #0.0: Video: mpeg4, yuv420p, 1891x725, q=2-31, 200 kb/s, 90k tbn, 100 tbc
    Stream mapping:
     Stream #0.0 -> #0.0
    Press [q] to stop encoding
    frame=  201 fps= 14 q=2.0 Lsize=   10032kB time=2.01 bitrate=40886.7kbits/s
    video:10030kB audio:0kB global headers:0kB muxing overhead 0.023690%

    PS. Even after converting in different application to FullHD (added black bars), it still doesn't work.