Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (7)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

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

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

  • Trying to transcode video with FFMpeg Layer on Lambda

    7 septembre 2020, par incovenant

    I am trying to convert .ogv files to .mp4 using an ffmpeg layer on AWS Lambda.

    




    



    I followed a tutorial from the people at Serverless Framework to convert .mp4's to GIF's and that worked out great. Using the same ffmpeg static build, ( ffmpeg-git-amd64-static.tar.xz ) I set out to convert .ogv files to .mp4 files.

    



    So far I have had success with uploading videos to an S3 Bucket, getting a Lambda to retrieve that video, do something to the video using the ffmpeg binary, and copy a new file to S3.

    




    



    The Problem :

    



    The videos that are created, will not play.

    



    data point 1 : the resultant files from the function are far too small.

    



    The input video file is 1.3MB and the output video is only 256.0KB

    



    data point 2 : moov atom not found.

    



    After copying the resultant video from S3 to my local machine, I try to play using ffplay and I receive this error :

    



    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fd613093400] moov atom not found
frank.mp4: Invalid data found when processing input


    



    As far as I have been able to tell, the moov atom is suppose to contain important metadata about .mp4 files.

    




    



    Implementation :

    



    I used the Serverless framework to set up the AWS infrastructure.

    



    Here are a few different ffmpeg commands I have tried :

    



    1st attempt :

    



      // convert to mp4!
    spawnSync(
      "/opt/ffmpeg/ffmpeg",
      [
        "-i",
        `/tmp/${record.s3.object.key}`,
        "-vcodec",
        "libx264",
        "-acodec",
        "aac",
        `/tmp/${record.s3.object.key}.mp4`
      ],
      { stdio: "inherit" }
    );


    



    2nd attempt :

    



     // convert to mp4!
    spawnSync(
      "/opt/ffmpeg/ffmpeg",
      [
        "-i",
        `/tmp/${record.s3.object.key}`,
        `/tmp/${record.s3.object.key}.mp4`
      ],
      { stdio: "inherit" }
    );


    



    3rd attempt :

    



    I found this approach in a Stack Overflow question and the poster said that it worked for him.

    



    // convert to mp4!
spawnSync(
  "/opt/ffmpeg/ffmpeg",
  [
    '-i',
    `/tmp/${record.s3.object.key}`,
    '-codec:v',
    'libx264',
    '-profile:v',
    'main',
    '-preset',
    'slow',
    '-b:v',
    '400k',
    '-maxrate',
    '400k',
    '-bufsize',
    '800k',
    '-threads',
    '0',
    '-b:a',
    '128k',
    `/tmp/${record.s3.object.key}.mp4`
  ],
  { stdio: "inherit" }
);


    



    Each one of these works swell on my local machine.

    



    If the ffmpeg binary that I am using was not a popular one, ( I have seen it on multiple sites dealing in connection with transcoding on Lambda ), my guess would be that it is an issue with the layer... Perhaps.

    



    Any insight would be greatly appreciated. Thank you.

    


  • html5 video crashes in Chrome and Opera but works fine in Firefox

    31 octobre 2012, par SharkTheDark

    It's 5:30AM and I'm stuck with this video problem.

    I had it all working before, and now, it has problems...
    I try to change encoding, but it's still not good... Worst part is that it works when it's runned from local file, but won't from server ( I add file types in htaccess )...

    Here is the ffmpeg encoding :

    exec('ffmpeg -i "' .$tmpName. '" -bt 50k -b 250k -ab 56k -ac 2 -s 480x320 -vcodec libx264 -vpre hq -vpre ipod640 -acodec libfaac  "upload/' .$newName. '.mp4"');
    exec('ffmpeg -i "' .$tmpName. '" -bt 50k -b 250k -ab 56k -ac 2 -s 480x320 -vcodec libvpx -acodec libvorbis -f webm "upload/' .$newName. '.webm"');
    exec('ffmpeg -i "' .$tmpName. '" -bt 50k -b 250k -ab 56k -ac 2 -s 480x320 -vcodec libtheora -acodec libvorbis -aq 100 "upload/' .$newName. '.ogv"');
    exec('ffmpeg -i "' .$tmpName. '" -bt 50k -b 250k -ab 56k -ac 2 -s 480x320 -vcodec libtheora -acodec libvorbis -aq 100 "upload/' .$newName. '.ogg"');

    or :

    exec('ffmpeg -i "' .$tmpName. '" "upload/' .$newName. '.mp4"');
    exec('ffmpeg -i "' .$tmpName. '" -vcodec libvpx -acodec libvorbis -f webm  -aq 100 "upload/' .$newName. '.webm"');
    exec('ffmpeg -i "' .$tmpName. '" -vcodec libtheora -acodec libvorbis -aq 100 "upload/' .$newName. '.ogv"');
    exec('ffmpeg -i "' .$tmpName. '" -vcodec libtheora -acodec libvorbis -aq 100 "upload/' .$newName. '.ogg"');

    or :

    exec('ffmpeg -i "' .$tmpName. '" "upload/' .$newName. '.mp4"');
    exec('ffmpeg -i "' .$tmpName. '" "upload/' .$newName. '.webm"');
    exec('ffmpeg -i "' .$tmpName. '" "upload/' .$newName. '.ogv"');
    exec('ffmpeg -i "' .$tmpName. '" "upload/' .$newName. '.ogg"');

    Nothing create good enough file to play in Chrome...

    URL of file(s) :

    http://urthots.com/homepage/upload/9b8a0c1a5af65c92936e3c6806181ec3.ogv
    http://urthots.com/homepage/upload/9b8a0c1a5af65c92936e3c6806181ec3.ogg
    http://urthots.com/homepage/upload/9b8a0c1a5af65c92936e3c6806181ec3.webm
    http://urthots.com/homepage/upload/f41355af09218d660a5d78a4012a7177.mp4

    Video element :

    <video poster="http://urthots.com/homepage/upload/images/xxx.jpg">
    <source src="http://urthots.com/homepage/upload/xxx.mp4" type="video/mp4"></source>
    <source src="http://urthots.com/homepage/upload/xxx.webm" type="video/webm"></source>
    <source src="http://urthots.com/homepage/upload/xxx.ogv" type="video/ogg; codecs=theora,vorbis"></source>
    <source src="http://urthots.com/homepage/upload/xxx.ogg" type="video/ogg; codecs=theora,vorbis"></source>
    </video>

    What can cause this ?
    I tried everything, encoding changing, HTML element changing, htaccess changing, I tried with videos from other sites, and they are working okay...
    I have no idea what is problem...

    Can someone please help...

  • JW Player can't play mp4 video downloaded from youtube

    20 janvier 2015, par kheya

    I have doenloaded am mp4 video using IE Realplayer plugin from youtube.
    https://www.youtube.com/watch?v=e3a80c5Ar3Y

    I have a test site on my local machine where I have HTML5 JW Player.

    I download the video and then play locally using realplay to see if it plays.
    I notice that not all mp4 downloads from youtube plays in Realplayer.
    The ones that play in Realplayer also play in JW Player on local website.
    But the mp4 files that don’t play in Realplayer also don’t play in JW player.

    This is the error I get in the player :
    the video playback was aborted due to a corruption problem or because the video used features your browser didnot support mylocalsite/xyz.mp4 undefined

    I tested IE, FF, Chrome. It works nowhere.

    Here is my jw player setup and html :

    <video src="mylocalsite/test.mp4" type="video/mp4" poster="mylocalsite/test.jpg" width="640" height="360"></video>

    player setup :

    var modes = '';
    var swfPath = '/content/jw/player.swf';
               if (navigator.userAgent.toLowerCase().match(/(android)/) || navigator.userAgent.toLowerCase().match(/(chrom)/)) {                
                   modes = [{ type: 'flash', src: swfPath }, { type: "html5"}];
               } else {
                   modes = [{ type: 'html5' }, { type: 'flash', src: swfPath }, { type: "download"}];
               }

    jwplayer('container').setup({                
                   'flashplayer': swfPath,                
                   'width': '640',
                   'height': '360',
                   'provider': 'video',
                   'modes': modes,                
               });

    Here is the details info about the file returned by ffmpeg :

    ffmpeg version 1.1.4 Copyright (c) 2000-2013 the FFmpeg developers
     built on Jul 31 2013 02:49:36 with gcc 4.6.2 (GCC)
     configuration: --prefix=/c/Users/Administrator/ffmpeg --extra-cflags=-I/c/User
    s/Administrator/ffmpeg/include --extra-ldflags=-L/c/Users/Administrator/ffmpeg/l
    ib --cpu=i686 --enable-gpl --enable-libfdk-aac --enable-libx264 --enable-nonfree

     libavutil      52. 13.100 / 52. 13.100
     libavcodec     54. 86.100 / 54. 86.100
     libavformat    54. 59.106 / 54. 59.106
     libavdevice    54.  3.102 / 54.  3.102
     libavfilter     3. 32.100 /  3. 32.100
     libswscale      2.  1.103 /  2.  1.103
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  2.100 / 52.  2.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\videos\woh.mp4':
     Metadata:
       major_brand     : dash
       minor_version   : 0
       compatible_brands: iso6avc1mp41
       creation_time   : 2013-09-08 23:34:28
     Duration: 00:03:50.96, start: 0.000000, bitrate: 189 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 480x360,
    187 kb/s, 25 tbr, 90k tbn, 50 tbc
       Metadata:
         creation_time   : 2013-09-08 23:34:28
         handler_name    : VideoHandler

    What can be causing this issue ?