Recherche avancée

Médias (91)

Autres articles (83)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (9523)

  • ffmpeg convert mov file to mp4 for HTML5 video tag IE9

    27 septembre 2016, par Adidi

    I looked everywhere here and on google - there is no valid command that works for IE9.
    some how IE9 is missing something.
    All that I tried worked everywhere else : chrome,safari,mobile device etc...
    I want one command that will convert it and I can use it in every device suppose to support mp4 in HTML5 video tag.

    I use this commands :

    ffmpeg -i movie.mov -vcodec copy -acodec copy out.mp4
    ffmpeg -i movie.mov -vcodec libx264 -vprofile high -preset slow -b:v 500k -maxrate 500k -bufsize 1000k -vf scale=-1:480 -threads 0 -acodec libvo_aacenc -b:a 128k -pix_fmt yuv420p outa.mp4
    ffmpeg -i movie.mov -b:V 1500k -vcodec libx264 -preset fast -g 30 adel.mp4
    ffmpeg -i movie.mov -acodec aac -strict experimental -ac 2 -ab 160k -vcodec libx264 -preset slow -f mp4 -crf 22 lamlam.mp4
    ffmpeg -i movie.mov -acodec aac -strict experimental -ac 2 -ab 160k -vcodec libx264 -preset slow -profile:v baseline -level 30 -maxrate 10000000 -bufsize 10000000 -f mp4 -threads 0 adiel.mp4

    etc.. again all this commands produce a valid mp4 file which works on chrome,safari etc... and works even when I launch them in windows itself using window media player.
    When I put this file in the video tag (I am using http://videojs.com/) in IE9 it isn’t working !

    <div class="vidoco-content" style="margin-top: 20px;">
    <video class="video-js vjs-default-skin vidoco-center" controls="controls" preload="none" width="600" height="400" poster="&lt;?php echo(DOMAIN); ?>static/test.jpg">
       <source src="&lt;?php echo(DOMAIN); ?>static/out.mp4" type="video/mp4"></source>
    </video>
    </div>

    If I use the software miro video converter to convert the same mov file to mp4 - it converted fine and I can play it in IE9 !
    miro converter is also using embedd ffmpeg inside it so I am sure it’s only a metter of the right ffmpeg command and parameters.
    In my apache htaccess I set the correct mime types for my files and I see it indeed correct when looking in IE developer tools :

    AddType audio/aac .aac
    AddType audio/mp4 .mp4 .m4a
    AddType audio/mpeg .mp1 .mp2 .mp3 .mpg .mpeg
    AddType audio/ogg .oga .ogg
    AddType audio/wav .wav
    AddType audio/webm .webm

    AddType video/mp4 .mp4 .m4v
    AddType video/ogg .ogv
    AddType video/webm .webm

    I am struggling with this for a long time so any help would be much appreciated.

    Thanks !

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

    &#xA;&#xA;


    &#xA;&#xA;

    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.

    &#xA;&#xA;

    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.

    &#xA;&#xA;


    &#xA;&#xA;

    The Problem :

    &#xA;&#xA;

    The videos that are created, will not play.

    &#xA;&#xA;

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

    &#xA;&#xA;

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

    &#xA;&#xA;

    data point 2 : moov atom not found.

    &#xA;&#xA;

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

    &#xA;&#xA;

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

    &#xA;&#xA;

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

    &#xA;&#xA;


    &#xA;&#xA;

    Implementation :

    &#xA;&#xA;

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

    &#xA;&#xA;

    Here are a few different ffmpeg commands I have tried :

    &#xA;&#xA;

    1st attempt :

    &#xA;&#xA;

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

    &#xA;&#xA;

    2nd attempt :

    &#xA;&#xA;

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

    &#xA;&#xA;

    3rd attempt :

    &#xA;&#xA;

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

    &#xA;&#xA;

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

    &#xA;&#xA;

    Each one of these works swell on my local machine.

    &#xA;&#xA;

    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.

    &#xA;&#xA;

    Any insight would be greatly appreciated. Thank you.

    &#xA;

  • 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(&#39;ffmpeg -i "&#39; .$tmpName. &#39;" -bt 50k -b 250k -ab 56k -ac 2 -s 480x320 -vcodec libx264 -vpre hq -vpre ipod640 -acodec libfaac  "upload/&#39; .$newName. &#39;.mp4"&#39;);
    exec(&#39;ffmpeg -i "&#39; .$tmpName. &#39;" -bt 50k -b 250k -ab 56k -ac 2 -s 480x320 -vcodec libvpx -acodec libvorbis -f webm "upload/&#39; .$newName. &#39;.webm"&#39;);
    exec(&#39;ffmpeg -i "&#39; .$tmpName. &#39;" -bt 50k -b 250k -ab 56k -ac 2 -s 480x320 -vcodec libtheora -acodec libvorbis -aq 100 "upload/&#39; .$newName. &#39;.ogv"&#39;);
    exec(&#39;ffmpeg -i "&#39; .$tmpName. &#39;" -bt 50k -b 250k -ab 56k -ac 2 -s 480x320 -vcodec libtheora -acodec libvorbis -aq 100 "upload/&#39; .$newName. &#39;.ogg"&#39;);

    or :

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

    or :

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

    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...