Recherche avancée

Médias (1)

Mot : - Tags -/sintel

Autres articles (62)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

Sur d’autres sites (6911)

  • "Invalid or unexpected token" error when trying to execute ffmpeg build on lambda

    4 janvier 2019, par almarc

    I have a node.js script that uses ffmpeg to convert mp4 downloaded from YT to mp3 and save to Amazon S3. Uploading using the serverless framework. The "ffmpeg" file is included in the main directory (with .yml), downloaded from here :
    https://johnvansickle.com/ffmpeg/

    The code :

    'use strict'
    process.env.PATH = process.env.PATH + ':/tmp/'
    process.env['FFMPEG_PATH'] = '/tmp/ffmpeg';
    const BIN_PATH = process.env['LAMBDA_TASK_ROOT']
    process.env['PATH'] = process.env['PATH'] + ':' + BIN_PATH;

    module.exports.download_mp3 = function (event, context, callback)
    {
     require('child_process').exec('cp /var/task/ffmpeg /tmp/.; chmod 755
     /tmp/ffmpeg;', function (error, stdout, stderr) {
     if (error)
     {
       console.log('An error occured', error);
       callback(null, null)
     }
     else
     {
       var ffmpeg = require('ffmpeg');
       const aws = require('aws-sdk')
       const s3 = new aws.S3()
       const ytdl = require('ytdl-core');

       function uploadFromStream(s3) {
         const stream = require('stream')
         var pass = new stream.PassThrough();

         var params = {Bucket: "some-bucket", Key: "some-key", Body: pass};
         s3.upload(params, function(err, data) {
           console.log(err, data);
         });
         console.log("Should be finished")
         callback(null)
       }

       let stream = ytdl("some-video-id", {
         quality: 'highestaudio',
         filter: 'audioonly'
       });

       ffmpeg(stream)
         .audioBitrate(128)
         .format('mp3')
         .on('error', (err) => console.error(err))
         .pipe(uploadFromStream(s3), {
           end: true
       });
     }})
    }

    When triggered, the function writes an error in logs :

    2019-01-04T14:50:54.525Z    21da4d49-1030-11e9-b901-0dc32b691a16    
    /var/task/ffmpeg:1
    (function (exports, require, module, __filename, __dirname) { ELF
    ^

    SyntaxError: Invalid or unexpected token
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at /var/task/download.js:17:18

    It’s, most definetely, an error in the "ffmpeg" file I’ve mentioned above (link provided). But I don’t know what’s the exact issue, I followed the first answer here : https://stackoverflow.com/questions/47882810/lambda-not-connecting-to-ffmpeg to include the ffmpeg build.

  • Low latency video player on android

    20 mai 2021, par Louis Blenner

    I'd like to be able to stream the video from my webcam to an Android app with a latency below 500ms, on my local network.

    


    To capture and send the video over the network, I use ffmpeg.

    


    ffmpeg -f v4l2 -i /dev/video0 -preset ultrafast -tune zerolatency -vcodec libx264 -an -vf format=yuv420p -f mpegts  udp://192.168.1.155:5000


    


    This command takes the webcam as an input, convert it and send it to a device using the mpegts protocol.
    
This is not a requirement, if another technique could work, I could change the way I send the video.

    


    I am able to read the video on another PC from the local network with a latency below 500 ms, using commands like

    


    gst-launch-1.0 -v udpsrc port=5000 ! video/mpegts ! tsdemux ! h264parse ! avdec_h264 ! fpsdisplaysink sync=false


    


    or

    


    mpv udp://0.0.0.0:5000 --no-cache --untimed --no-demuxer-thread --video-sync=audio --vd-lavc-threads=1 


    


    So it is possible to have this range of latency.
    
I'd like to have the same thing on Android.

    


    Here are my tries to do that.

    


    Exoplayer

    


    After looking at the different players available on Android studio, it seems like Exoplayer is the go-to choice.
    
I tried different options indicated in the live-streaming documentation, but I always end up with a stream taking seconds to start and with a latency of seconds.
    
I tried to add a Button to seek to the default position of the windows, but it results in a loading of several seconds.

    


    DefaultExtractorsFactory extractorsFactory =
                new DefaultExtractorsFactory()
                        .setTsExtractorFlags(DefaultTsPayloadReaderFactory.FLAG_IGNORE_AAC_STREAM);

        player = new SimpleExoPlayer.Builder(this)
                .setMediaSourceFactory(
                        new DefaultMediaSourceFactory(this, extractorsFactory))
                .setLoadControl(new DefaultLoadControl.Builder()
                        .setBufferDurationsMs(DefaultLoadControl.DEFAULT_MIN_BUFFER_MS, DefaultLoadControl.DEFAULT_MAX_BUFFER_MS, 200, 200)
                        .build())
                .build();
        MyPlayerView playerView = findViewById(R.id.player_view);
        // Bind the player to the view.
        playerView.setPlayer(player);
        // Build the media item.
        MediaItem mediaItem = new MediaItem.Builder()
                .setUri(Uri.parse("udp://0.0.0.0:5000"))
                .setLiveMaxOffsetMs(500)
                .setLiveTargetOffsetMs(0)
                .setLiveMinOffsetMs(0)
                .build();
        // Set the media item to be played.
        player.setMediaItem(mediaItem);
        // Prepare the player.
        player.setPlayWhenReady(true);
        player.prepare();
        //player.seekToDefaultPosition();


    


    This issue is about the same issue and the conclusion was that Exoplayer was not fit for this use case.

    


    


    I'll be honest, ultra low-latency like this isn't ExoPlayer's main use-case

    


    


    Vlc

    


    Another try was to use the Vlc library.
    
But I was unable to have the same low latency stream as with the two previous players with Vlc.
    
I tried changing the preferences of Vlc to stream as fast as possible as described here

    


    Input/Codecs -> x264 preset: ultrafast - zerolatency
Input/Codecs -> Access Module: UDP input
Input/Codecs -> Clock Jitter: 500
Audio: disable audio


    


    I also tried reducing the different buffers.
    
However, I still have a latency of more than 1 seconds with that.

    


    Gstreamer

    


    Another try was to create a react-native project to use the different players available here.
    
One player that seemed promising was react-native-gstreamer because it uses gstreamer which is able to stream with low latency (gst-launch command).
    
But the library is now outdated.

    


    Question

    


    There were other tries, but none were successful.
    
Is there a problem with one of my approaches ?
    
And if not, Is there a player on Android (that I missed) which is able to achieve low latency stream like gstream or mpv on linux ?

    


  • Anomalie #2381 : Corriger le niveau d’intertitre

    9 juin 2018, par b b

    Il y a des H2 dans la dist, qui introduisent des listes d’articles, de résultats, ou des blocs (forum), je pense qu’ils peuvent rester comme ça.

    Si le bloc de forum sous le texte de l’article reste en h2, il va se retrouver "au même niveau" qu’un intertitre en h2 donc, c’est pas top non ?