Recherche avancée

Médias (91)

Autres articles (22)

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

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

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

Sur d’autres sites (3788)

  • ffmpeg dash Segment offset

    18 mars 2019, par inkubux

    I’m trying to integrate live-transcoding like "plex" or "emby" with my application.

    I am able to serve dash content over to shaka-player or dash.js but only in ’live-mode’. But I want to enable seeking through the player.

    I looked at plex and to enable this they create their own mpd file with duration so the player will have a full seekbar.

    However when seeking the player will ask for a segment number eg : 449. I need to stop ffmpeg and restart with an offset (-ss &lt;<segment>>)</segment>, but ffmpeg will just restart a transcode session from segment 0 with an initial segment.

    What I want is to tell ffmpeg to start at a seekpoint but only output from segment number and now-on.

    When playing with hls and mpegts, I can tell ffmpeg to output at a certain segment : with the option -segment_start_number but this is not available for dash. And plex use their own transcoder based of ffmpeg with the option -skip_to_segment

    I tried to ’hack’ around by keeping a manual offset on my web-server, even if I serve the "supposed" right segment after the seek point dash.js and shaka-player can’t recover the stream.. VLC on the other habd is able to (probably more tolerent) to errors in segments.

    Is the supposed right segment after a seek in dash (contains the initial segment) or only the segment.

    Is ffmpeg able to start segmenting dash as a supposed segment (for seek and resume)

    The same technique works in hls with forced key frames and a custom m3u8 (with all the "predicted" segments) but calculating the right segment length and the right bandwidth is much harder and hackish and dash is more tolerant to variation.

    I would really like to be able to seek through my live transcoding video.

    For reference here is a custom mpd file I serve to enable "seeking" :

    <mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" suggestedpresentationdelay="PT1S" mediapresentationduration="PT49M2.920S" maxsegmentduration="PT2S" minbuffertime="PT10S">
       <period start="PT0S" duration="PT49M2.920S">
           <adaptationset segmentalignment="true">
               <segmenttemplate timescale="1" duration="1" initialization="$RepresentationID$/initial.mp4" media="$RepresentationID$/$Number$.m4s" startnumber="1">
               </segmenttemplate>
               <representation mimetype="video/mp4" codecs="avc1.640029" bandwidth="3766000" width="1920" height="1080">
               </representation>
           </adaptationset>
           <adaptationset segmentalignment="true">
               <segmenttemplate timescale="1" duration="1" initialization="$RepresentationID$/initial.mp4" media="$RepresentationID$/$Number$.m4s" startnumber="1">
               </segmenttemplate>
               <representation mimetype="audio/mp4" codecs="mp4a.40.2" bandwidth="188000" audiosamplingrate="48000">
                   <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="6"></audiochannelconfiguration>
               </representation>
           </adaptationset>
       </period>
    </mpd>

    And here is the ffmpeg command to pull it off :

    ffmpeg -ss 0 -i movie.mkv -y -acodec aac -vcodec libx264 -f dash -min_seg_duration 1000000 -individual_header_trailer 0 -pix_fmt yuv420p -vf scale=trunc(min(max(iw\,ih*dar)\,1920)/2)*2:trunc(ow/dar/2)*2 -bsf:v h264_mp4toannexb -profile:v high -level 4.1 -map_chapters -1 -map_metadata -1 -preset veryfast -movflags frag_keyframe+empty_moov -use_template 1 -use_timeline 0 -remove_at_exit 1 -crf 23 -bufsize 7532k -maxrate 3766k -start_at_zero -threads 0 -force_key_frames expr:if(isnan(prev_forced_t),eq(t,t),gte(t,prev_forced_t+1)) -init_seg_name $RepresentationID$/0_initial.mp4 -media_seg_name $RepresentationID$/0_$Number$.m4s /transcoding_temp/Z1GVWEc/index.mpd

    The media_seg_name is where I prepend the custom seek_point let’s say I want to seek to segment 1233 the template would be :

    -media_seg_name $RepresentationID$/1233_$Number$.m4s

    and the segments would be 1233_1 1233_2 1233_* So I can serve the right segment after seek. but the player does not recover and still downloading subsequent segments. I guess since a new initial segment is generated and I somehow miss headers for continuous playback after seek but I’m probably wrong.

    Thanks for your help

  • Anomalie #4086 (Nouveau) : Exception pour le proxy

    2 février 2018, par - Equipement

    Bonjour. Quand j’ajoute une exception pour le proxy (dans le menu [Configuration] / [Fonctions avancées]), j’ai constaté que certaines exceptions fonctionnent et que d’autres ne fonctionnent pas. Je précise que je renseigne une seule exception à la fois.

    Dans inc/distant.php, la fonction need_proxy effectue en particulier les tests suivants :

            and (strpos(" $http_noproxy ", " $host ") === false
                and (strpos(" $http_noproxy ", " $domain ") === false)))
    

    D’après php.net/manual/fr/function.strpos.php, la fonction strpos ( string $haystack , mixed $needle [, int $offset = 0 ] ) cherche la position numérique de la première occurrence de needle dans la chaîne de caractères haystack.

    Aussi, la fonction need_proxy semble chercher la position du host dans la chaîne http_noproxy (puis chercher la position du domaine dans la chaîne http_noproxy).

    En remplaçant le code précité, par le code ci-dessous, cela fonctionne à chaque exception testée :

            and (strpos($host, $http_noproxy) === false
                and (strpos($domain, $http_noproxy) === false)))
    

    Cordialement,
    Equipement

  • OpenCV encoding to H264

    29 mars 2018, par Yost777

    I want to encode images to H264 video in OpenCV.

    As part of my software for image tracking, I’m using VideoWriter in OpenCV 3.4 (64-bit) with Visual Studio 2017 C++. I use ffmpeg for manual encoding, and as it comes with OpenCV I assume this is the best option. My version of OpenCV indicates it has been compiled with ffmpeg, and I can verify it loads the opencv_ffmpeg340_64.dll.

    Decoding H264 (AVC1) is absolutely fine, including when specifically using the ffmpeg API. But encoding anything other than MJPG or raw images doesn’t work :
    VideoWriter.Open() mostly returns false, for some cases it only writes an empty or small header but won’t write frames. I’ve tried not only the ffmpeg API, but also any available API. Redirecting console/debug output to intermediate window in VC doesn’t give any messages from OpenCV or ffmpeg.

    There are numerous posts on previous versions of OpenCV using FFmpeg, including (Cisco) OpenH264 library and difficulties using this. I’ve tried many options, installing codecs pack including H264, ffmpeg static version, Cisco openH264 library, setting paths etc and even tried the low level ffmpeg library functions such as cvCreateVideoWriter exposed in OpenCV, and using different video containers (AVI, MPG, MP4) as well as fourcc strings.

    I can’t believe in 2018 the great OpenCV with FFmpeg support is unable to encode anything but arcane MJPG or raw images. If it uses FFmpeg surely a significant set of functionality should be available ?

    Though I think this should work, my next best option would be using a separate ffmpeg library, which would ironically add another ffmpeg.dll to my solution I imagine. Any suggestion appreciated !

    Code fragment (using any video encoding API) :

    VideoWriter writer;
    int codec = VideoWriter::fourcc('X', '2', '6', '4');
    writer.open("test.avi", codec, 30, colorImage.size(), true);
    writer.write(colorImage);
    writer.release();