Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

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)

  • MP4 to DASH using ffmpeg linux too slow

    16 mai 2022, par darox

    Currently, I'm working at a project that contains 2000 video mp4 files, and I need convert all of them in mpeg dash files.

    



    I have this script :

    



    MYDIR=$(dirname $(readlink -f ${BASH_SOURCE[0]}))
SAVEDIR=$(pwd)

# Check programs
if [ -z "$(which ffmpeg)" ]; then
    echo "Error: ffmpeg is not installed"
    exit 1
fi

if [ -z "$(which MP4Box)" ]; then
    echo "Error: MP4Box is not installed"
    exit 1
fi

cd "$MYDIR"

TARGET_FILES=$(find ./ -maxdepth 1 -type f \( -name "*.mov" -or -name "*.mp4" \))
for f in $TARGET_FILES
do
  fe=$(basename "$f") # fullname of the file
  f="${fe%.*}" # name without extension

  if [ ! -d "${f}" ]; then #if directory does not exist, convert
    echo "Converting \"$f\" to multi-bitrate video in MPEG-DASH"

    mkdir "${f}"

    ffmpeg -y -i "${fe}" -c:a aac -b:a 192k -vn "${f}_audio.m4a"


    ffmpeg -y -i "${fe}" -preset slow -tune film -vsync passthrough -write_tmcd 0 -an -c:v libx264 -x264opts 'keyint=25:min-keyint=25:no-scenecut' -crf 23 -maxrate 800k -bufsize 2000k -pix_fmt yuv420p -vf "scale=-2:720" -f mp4  "${f}_800.mp4"
    # static file for ios and old browsers and mobile safari
    ffmpeg -y -i "${fe}" -preset slow -tune film -movflags +faststart -vsync passthrough -write_tmcd 0 -c:a aac -b:a 160k -c:v libx264  -crf 23 -maxrate 1400 -bufsize 3000k -pix_fmt yuv420p -f mp4 "${f}/${f}.mp4"


    rm -f ffmpeg*log*
    # if audio stream does not exist, ignore it
    if [ -e "${f}_audio.m4a" ]; then
        MP4Box -dash-strict 2000 -rap -frag-rap  -bs-switching no -profile "dashavc264:live" "${f}_5000.mp4" "${f}_3000.mp4" "${f}_1500.mp4" "${f}_800.mp4" "${f}_400.mp4" "${f}_audio.m4a" -out "${f}/${f}.mpd"
        rm "${f}_5000.mp4" "${f}_3000.mp4" "${f}_1500.mp4" "${f}_800.mp4" "${f}_400.mp4" "${f}_audio.m4a"
    else
        MP4Box -dash-strict 2000 -rap -frag-rap  -bs-switching no -profile "dashavc264:live" "${f}_5000.mp4" "${f}_3000.mp4" "${f}_1500.mp4" "${f}_800.mp4" "${f}_400.mp4" -out "${f}/${f}.mpd"
        rm "${f}_5000.mp4" "${f}_3000.mp4" "${f}_1500.mp4" "${f}_800.mp4" "${f}_400.mp4" 
    fi
    # create a jpg for poster. Use imagemagick or just save the frame directly from ffmpeg is you don't have cjpeg installed.
    ffmpeg -i "${fe}" -ss 00:00:00 -vframes 1  -qscale:v 10 -n -f image2 - | cjpeg -progressive -quality 75 -outfile "${f}"/"${f}".jpg

    fi

done

cd "$SAVEDIR"


    



    This is working fine, but, taking a long time to convert only single file, I have intel 7 and a simple mp4 file take 30 min to be converted. How can I accelerate this process ? Must I change something in this script ?

    



    Thank you.

    


  • HTML5 video player doesn't work on iPad/iPhone

    16 avril 2015, par Avrohom Yisroel

    NOTE This turned out to be a simulator problem, not a video encoding problem, see my edit lower down...

    I’m creating a web site for a local college, and they want to be able to add short videos that people can view online. I’ve spent quite a bit of time trying to work out how to get the videos to play on iDevices, but have failed.

    I’m using Video.js (http://www.videojs.com), and have HTML that looks like this...

    <video class="video-js vjs-default-skin" controls="controls" preload="auto" width="640" height="352" poster="/Content/Images/logobg.png" data-setup="{}">
     <source src="/Content/Videos/video.m4v" type="video/mp4">
     <source src="/Content/Videos/video.webm" type="video/webm">
     <p class="vjs-no-js">
       To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
     </p>
    </source></source></video>

    This works fine on desktop browsers, where it uses the m4v file. However, if I load the page on an iDevice, the video player says "no compatible source was found for this video", which sounds like it doesn’t like either the m4v or the webm file.

    I created the webm file using instructions found at http://daniemon.com/blog/how-to-convert-videos-to-webm-with-ffmpeg/. I tried creating a .mov file using the accepted answer at iPad Doesn’t Render H.264 Video with HTML5, but this gave the same error.

    Anyone any ideas how I can support iDevices ? Please don’t blind me with science, I’m a real newbie with all this video stuff, and need simple instructions !

    Edit The problem I was having was when trying to view the site on a mobile simulator. When I uploaded the site to a real server, and tried it on an iPad, it worked fine. So, if anyone is having a similar problem, first use something like Handbrake to encode the videos, as it seems to do it fine, then make sure you’re testing on a real mobile device, not a simulator !

  • Anomalie #4074 : Le code de plugin-dist/medias/modeles/video.html , produit un paragraphe de trop ...

    11 janvier 2018, par eldk -
    Code de base produit par SPIP
    Extrait video&nbsp ; : sens de la vie - Monthy Python - 1983 - Universal
    &lt;script&gt;/*&lt;![CDATA[*/var mejspath='plugins-dist/medias/lib/mejs/mediaelement-and-player.min.js?1508951836',mejscss='plugins-dist/medias/lib/mejs/mediaelementplayer.min.css?1508951836';<br />
    var mejsloader; (function(){var a=mejsloader;&quot;undefined&quot;==typeof a&amp;#38;&amp;#38;(mejsloader=a={gs:null,plug:{},css:{},init:null,c:0,cssload:null});a.init||(a.cssload=function(b){if(&quot;undefined&quot;==typeof a.css[b]){a.css[b]=!0;var c=document.createElement(&quot;link&quot;);c.href=b;c.rel=&quot;stylesheet&quot;;c.type=&quot;text/css&quot;;document.getElementsByTagName(&quot;head&quot;)[0].appendChild(c)}},a.init=function(){!0===a.gs&amp;#38;&amp;#38;function(b){jQuery(&quot;audio.mejs,video.mejs&quot;).not(&quot;.done&quot;).each(function(){function c(){var e=!0,h;for(h in d.css)a.cssload(d.css[h]);for(var f in d.plugins)&quot;undefined&quot;== typeof a.plug[f]?(e=!1,a.plug[f]=!1,jQuery.getScript(d.plugins[f],function(){a.plug[f]=!0;c()})):0==a.plug[f]&amp;#38;&amp;#38;(e=!1);e&amp;#38;&amp;#38;new MediaElementPlayer(&quot;#&quot;+b,jQuery.extend(d.options,{success:function(a){function b(){jQuery(a).closest(&quot;.mejs-inner&quot;).removeClass(a.paused?&quot;playing&quot;:&quot;paused&quot;).addClass(a.paused?&quot;paused&quot;:&quot;playing&quot;)}b();a.addEventListener(&quot;play&quot;,b,!1);a.addEventListener(&quot;playing&quot;,b,!1);a.addEventListener(&quot;pause&quot;,b,!1);a.addEventListener(&quot;paused&quot;,b,!1);g.attr(&quot;autoplay&quot;)&amp;#38;&amp;#38;a.play()}}))}var g=jQuery(this).addClass(&quot;done&quot;), b;(b=g.attr(&quot;id&quot;))||(b=&quot;mejs-&quot;+g.attr(&quot;data-id&quot;)+&quot;-&quot;+a.c++,g.attr(&quot;id&quot;,b));var d={options:{},plugins:{},css:[]},e,h;for(e in d)if(h=g.attr(&quot;data-mejs&quot;+e))d[e]=jQuery.parseJSON(h);c()})}(jQuery)});a.gs||(&quot;undefined&quot;!==typeof mejscss&amp;#38;&amp;#38;a.cssload(mejscss),a.gs=jQuery.getScript(mejspath,function(){a.gs=!0;a.init();jQuery(a.init);onAjaxLoad(a.init)}))})();/*]]&gt;*/&lt;/script&gt;
    Extrait video&nbsp ; : sens de la vie - Monthy Python - 1983 - Universal
    &lt;script&gt;/*&lt;![CDATA[*/var mejspath='plugins-dist/medias/lib/mejs/mediaelement-and-player.min.js?1508951836',mejscss='plugins-dist/medias/lib/mejs/mediaelementplayer.min.css?1508951836';<br />
    var mejsloader; (function(){var a=mejsloader;&quot;undefined&quot;==typeof a&amp;#38;&amp;#38;(mejsloader=a={gs:null,plug:{},css:{},init:null,c:0,cssload:null});a.init||(a.cssload=function(b){if(&quot;undefined&quot;==typeof a.css[b]){a.css[b]=!0;var c=document.createElement(&quot;link&quot;);c.href=b;c.rel=&quot;stylesheet&quot;;c.type=&quot;text/css&quot;;document.getElementsByTagName(&quot;head&quot;)[0].appendChild(c)}},a.init=function(){!0===a.gs&amp;#38;&amp;#38;function(b){jQuery(&quot;audio.mejs,video.mejs&quot;).not(&quot;.done&quot;).each(function(){function c(){var e=!0,h;for(h in d.css)a.cssload(d.css[h]);for(var f in d.plugins)&quot;undefined&quot;== typeof a.plug[f]?(e=!1,a.plug[f]=!1,jQuery.getScript(d.plugins[f],function(){a.plug[f]=!0;c()})):0==a.plug[f]&amp;#38;&amp;#38;(e=!1);e&amp;#38;&amp;#38;new MediaElementPlayer(&quot;#&quot;+b,jQuery.extend(d.options,{success:function(a){function b(){jQuery(a).closest(&quot;.mejs-inner&quot;).removeClass(a.paused?&quot;playing&quot;:&quot;paused&quot;).addClass(a.paused?&quot;paused&quot;:&quot;playing&quot;)}b();a.addEventListener(&quot;play&quot;,b,!1);a.addEventListener(&quot;playing&quot;,b,!1);a.addEventListener(&quot;pause&quot;,b,!1);a.addEventListener(&quot;paused&quot;,b,!1);g.attr(&quot;autoplay&quot;)&amp;#38;&amp;#38;a.play()}}))}var g=jQuery(this).addClass(&quot;done&quot;), b;(b=g.attr(&quot;id&quot;))||(b=&quot;mejs-&quot;+g.attr(&quot;data-id&quot;)+&quot;-&quot;+a.c++,g.attr(&quot;id&quot;,b));var d={options:{},plugins:{},css:[]},e,h;for(e in d)if(h=g.attr(&quot;data-mejs&quot;+e))d[e]=jQuery.parseJSON(h);c()})}(jQuery)});a.gs||(&quot;undefined&quot;!==typeof mejscss&amp;#38;&amp;#38;a.cssload(mejscss),a.gs=jQuery.getScript(mejspath,function(){a.gs=!0;a.init();jQuery(a.init);onAjaxLoad(a.init)}))})();/*]]&gt;*/&lt;/script&gt;