Recherche avancée

Médias (0)

Mot : - Tags -/performance

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (67)

  • 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

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Qualité du média après traitement

    21 juin 2013, par

    Le bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
    Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)

Sur d’autres sites (9375)

  • Ffmpeg send duration of video to client (using node-fluent-ffmpeg)

    26 mai 2013, par Vprnl

    I'm really new to the world of ffmpeg so please excuses me if this is a stupid queston.

    I'm using the module Node-fluent-ffmpeg to stream a movie and convert it from avi to webm with FFMPEG.

    So far so good (it plays the video), but I'm having trouble parsing the duration to the player. It also gives me an error even though I plays the video.

    my code is as followed :

    var stat = fs.statSync(movie);

    var start = 0;
    var end = 0;
    var range = req.header('Range');
    if (range != null) {
    start = parseInt(range.slice(range.indexOf('bytes=')+6,
     range.indexOf('-')));
    end = parseInt(range.slice(range.indexOf('-')+1,
     range.length));
    }
    if (isNaN(end) || end == 0) end = stat.size-1;
    if (start > end) return;

    var duration = (end / 1024) * 8 / 1024;

    res.writeHead(206, { // NOTE: a partial http response
       'Connection':'close',
       'Content-Type':'video/webm',
       'Content-Length':end - start,
       'Content-Range':'bytes '+start+'-'+end+'/'+stat.size,
       'Transfer-Encoding':'chunked'
    });

    var proc = new ffmpeg({ source: movie, nolog: true, priority: 1, timeout:15000})
       .toFormat('webm')
       .addOptions(['-probesize 900000', '-analyzeduration 0', '-minrate 1024k', '-maxrate 1024k', '-bufsize 1835k', '-t '+duration+' -ss'])
       .writeToStream(res, function(retcode, error){
       if (!error){
           console.log('file has been converted succesfully',retcode);
       }else{
           console.log('file conversion error',error);
       }
    });

    I set the header with a start and a end based on this article : http://delog.wordpress.com/2011/04/25/stream-webm-file-to-chrome-using-node-js/

    I calculate the length in seconds in the variable duration.

    The error FFmpeg is giving me is :

       file conversion error ffmpeg version N-52458-gaa96439 Copyright (c) 2000-2013 the FFmpeg developers
         built on Apr 24 2013 22:19:32 with gcc 4.8.0 (GCC)
         configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --e
       nable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable
       -libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --ena
       ble-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwola
       me --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enabl
       e-libxvid --enable-zlib
         libavutil      52. 27.101 / 52. 27.101
         libavcodec     55.  6.100 / 55.  6.100
         libavformat    55.  3.100 / 55.  3.100
         libavdevice    55.  0.100 / 55.  0.100
         libavfilter     3. 60.101 /  3. 60.101
         libswscale      2.  2.100 /  2.  2.100
         libswresample   0. 17.102 /  0. 17.102
         libpostproc    52.  3.100 / 52.  3.100
       Input #0, avi, from 'C:/temp/test.avi':
         Metadata:
           encoder         : Nandub v1.0rc2
         Duration: 00:01:09.78, start: 0.000000, bitrate: 1517 kb/s
           Stream #0:0: Video: msmpeg4v3 (DIV3 / 0x33564944), yuv420p, 640x352, 23.98 tbr, 23.98 tbn, 23.98 tbc
           Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 222 kb/s
       [libvpx @ 0036db20] v1.2.0
       Output #0, webm, to 'pipe:1':
         Metadata:
           encoder         : Lavf55.3.100
           Stream #0:0: Video: vp8, yuv420p, 640x352, q=-1--1, 200 kb/s, 1k tbn, 23.98 tbc
           Stream #0:1: Audio: vorbis, 48000 Hz, stereo, fltp
       Stream mapping:
         Stream #0:0 -> #0:0 (msmpeg4 -> libvpx)
         Stream #0:1 -> #0:1 (mp3 -> libvorbis)

    The client side player (which is VideoJs) says the file is infinite/NaN in length.

    I feel like I'm pretty close to a solution but my inexperience with the subject matter prohibits me from getting it to work. If I'm unclear in any way please let me know. (I have a tendency of explaining things fuzzy.)

    Thanks in advance !

    [EDIT]

    I removed the duration bit because it has nothing to do with the issue. I checked the response header of the client and saw :

    Accept-Ranges:bytes
    Connection:keep-alive
    Content-Length:13232127
    Content-Range:bytes 0-13232127/13232128
    Content-Type:video/webm

    Why can't the client figure out the duration even though it receives it in the header ?

  • Error finding watermark path using ffmpeg in asp.net application

    27 août 2013, par irfanmcsd

    I am using .net ffmpeg wrapper to post watermark on videos. Posting watermark works fine if i execute ffmpeg command directly but failed to find suitable watermark png file location if command executed via asp.net application.

    here is sample ffmpeg command

    string RootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);
    _mhandler.FFMPEGPath = RootPath + "/ffmpeg_aug_2013/bin/ffmpeg.exe";
    _mhandler.InputPath = RootPath + "/contents/original";
    _mhandler.OutputPath = RootPath + "/contents/mp4";
    _mhandler.BackgroundProcessing = false;
    _mhandler.FileName = "wildlife.wmv";
    _mhandler.OutputFileName = "wildlife_ddd";
    string presetpath = RootPath + "/ffmpeg_aug_2013/presets/libx264-ipod640.ffpreset";
    _mhandler.OutputExtension = ".mp4";
    _mhandler.Parameters = "-s 640x380 -b:v 500k -bufsize 500k -b:a 128k -ar 44100 -c:v libx264 -vf \"movie = watermark.png [watermark]; [in][watermark] overlay=main_w-overlay_w-10:main_h-overlay_h-10 [out]\"";
    _mhandler.Parameters = _mhandler.Parameters + " -fpre \"" + presetpath + "\"";
    VideoInfo info =  _mhandler.Process();

    i tried direct code too

    string _out = "";
    Process _process = new Process();
    _process.StartInfo.UseShellExecute = false;
    _process.StartInfo.RedirectStandardInput = true;
    //_process.StartInfo.RedirectStandardOutput = true;
    _process.StartInfo.RedirectStandardError = true;
    _process.StartInfo.CreateNoWindow = true;
    _process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
    _process.StartInfo.FileName = _ffmpegpath;
    _process.StartInfo.Arguments = cmd;
    if (_process.Start())
    {            
       _process.WaitForExit(ExitProcess);
       _out = _process.StandardError.ReadToEnd();
       if (!_process.HasExited)
         _process.Kill();

       return _out;
    }

    ffmpeg error output as

    FFMPEG Output:ffmpeg version N-55753-g88909be Copyright (c) 2000-2013
    the FFmpeg developers built on Aug 24 2013 21:40:51 with gcc 4.7.3
    (GCC) configuration : —enable-gpl —enable-version3
    —disable-w32threads —enable-avisynth —enable-bzlib —enable-fontconfig —enable-frei0r —enable-gnutls —enable-iconv —enable-libass —enable-libbluray —enable-libcaca —enable-libfreetype —enable-libgsm —enable-libilbc —enable-libmodplug —enable-libmp3lame —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenjpeg —enable-libopus —enable-librtmp —enable-libschroedinger —enable-libsoxr —enable-libspeex —enable-libtheora —enable-libtwolame —enable-libvo-aacenc —enable-libvo-amrwbenc —enable-libvorbis —enable-libvpx —enable-libx264 —enable-libxavs —enable-libxvid —enable-zlib libavutil 52. 42.100 / 52. 42.100 libavcodec 55. 29.100 / 55. 29.100 libavformat 55. 14.102 / 55. 14.102 libavdevice 55. 3.100
    / 55. 3.100 libavfilter 3. 82.102 / 3. 82.102 libswscale 2. 5.100 / 2.
    5.100 libswresample 0. 17.103 / 0. 17.103 libpostproc 52. 3.100 / 52. 3.100 [asf @ 024c9960] Stream #0 : not enough frames to estimate rate ; consider increasing probesize Guessed Channel Layout for Input Stream

    0.0 : stereo Input #0, asf, from 'F :\own\mhp_new/contents/original\wildlife.wmv' : Metadata :

    SfOriginalFPS : 299700 WMFSDKVersion : 11.0.6001.7000 WMFSDKNeeded :
    0.0.0.0000 comment : Footage : Small World Productions, Inc ; Tourism New Zealand | Producer : Gary F. Spradling | Music : Steve Ball title :
    Wildlife in HD copyright : © 2008 Microsoft Corporation IsVBR : 0
    DeviceConformanceTemplate : AP@L3 Duration : 00:00:30.09, start :
    0.000000, bitrate : 6977 kb/s Stream #0:0(eng) : Audio : wmav2 (a1[0][0] / 0x0161), 44100 Hz, stereo, fltp, 192 kb/s Stream

    0:1(eng) : Video : vc1 (Advanced) (WVC1 / 0x31435657), yuv420p, 1280x720, 5942 kb/s, 29.97 tbr, 1k tbn, 1k tbc [image2 @ 024c76e0]

    Could find no file with path 'watermark.png' and index in the range
    0-4 [Parsed_movie_0 @ 024c0540] Failed to avformat_open_input
    'watermark.png' [AVFilterGraph @ 024ca100] Error initializing filter
    'movie' with args 'watermark.png' Error opening filters ! Error Code= 0

    Error on point ( Could find no file with path 'watermark.png' ) shows watermark.png file not found.
    I place watermark.png file in the following locations but still can't found

    i : application root

    ii : root where actual aspx page located

    iii : ffmpeg root

    iv : ffmpeg/bin/

    I also used complete path but still can't detected.

    Note : if i use same ffmpeg command in php and place watermark.png on location where actual php page exist watermark properly detected and command executed properly, but same approach not working in asp.net

    Can any one help me where should i place watermark.png file so that script can access it.

  • Interfacing to an Xbox Optical Drive

    1er octobre 2013, par Multimedia Mike — xbox

    The next generation Xbox is going to hit the streets soon. But for some reason, I’m still interested in the previous generation’s unit (i.e., the original Xbox). Specifically, I’ve always wondered if it’s possible to use the original Xbox’s optical drive in order to read Xbox discs from Linux. I was never curious enough to actually buy an Xbox just to find out but I eventually came across a cast-off console on a recycle pile.

    I have long known that the Xbox has what appears to be a more or less standard optical drive with a 40-pin IDE connector. The only difference is the power adapter which I surmise is probably the easiest way to turn a bit of standardized hardware into a bit of proprietary hardware. The IDE and power connectors look like this :


    Xbox optical drive connections

    Thus, I wanted to try opening an Xbox and plugging the optical drive into a regular PC, albeit one that supports IDE cables, and allow the Xbox to supply power to the drive. Do you still have hardware laying around that has 40-pin IDE connectors ? I guess my Mac Mini PPC fits the bill, but I’ll be darned if I’m going to pry that thing open again. I have another IDE-capable machine buried in my closet, last called into service when I needed a computer with a native RS-232 port 3 years ago. The ordeal surrounding making this old computer useful right now can be another post entirely.

    Here’s what the monstrosity looks like thanks to characteristically short IDE cable lengths :


    Xbox optical drive connected directly to PC

    Click for larger image


    Process :

    1. Turn on Xbox first
    2. Turn on PC

    Doing these things in the opposite order won’t work since the kernel really wants to see the drive when booting up. Inspecting the 'dmesg' log afterward reveals interesting items :

    <br />
    hdd: PHILIPS XBOX DVD DRIVE, ATAPI CD/DVD-ROM drive<br />
    hdd: host max PIO5 wanted PIO255(auto-tune) selected PIO4<br />
    hdd: UDMA/33 mode selected<br />
    [...]<br />
    hdd: ATAPI DVD-ROM drive, 128kB Cache<br />

    Why is that interesting ? When is the last time to saw disk devices prefixed by ‘hd’ rather than ‘sd’ ? Blast from the past. Oh, and the optical drive’s vendor string clearly indicates that this is an Xbox drive saying ‘hi !’.

    Time To Read
    When I first studied an Xbox disc in a normal optical drive, I noticed that I was able to read 6992 2048-byte sectors — about 14 MB of data — as reported by the disc table of contents (TOC). This is just enough data to play a standard DVD video animation that kindly instructs the viewer to please use a proper Xbox. At this point, I estimated that there must be something special about Xbox optical drive firmware that knows how to read alternate information on these discs and access further sectors.

    I ran my TOC query tool with an Xbox Magazine demo disc in the optical drive and it reported substantially more than 6992 sectors, enough to account for more than 2 GB of data. That’s promising. I then tried running 'dd' against the device and it was able to read… about 14 MB, an exact quantity of bytes that, when divided by 2048 bytes/sector, yields 6992 sectors.

    Future (Past ?) Work
    Assuming Google is your primary window into the broader internet, the world is beginning to lose its memory of things pertaining to the original Xbox (Microsoft’s naming scheme certainly doesn’t help searches). What I’m saying is that it can be difficult to find information about this stuff now. However, I was able to learn that a host needs to perform a sort of cryptographic handshake with the drive at the SCSI level before it is allowed to access the forbidden areas of the disc. I think. I’m still investigating this and will hopefully post more soon.