Recherche avancée

Médias (91)

Autres articles (79)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

Sur d’autres sites (6464)

  • FFmpeg filter complex add audio file to video at specific points

    4 juin 2020, par steve

    atrim=0:2 starts fine when I play the video it plays the mp3 now how do I add a working end time say finish at 9 seconds ?

    



    Summary I want to start at 2 seconds and finish at 9 seconds.

    



    ffmpeg -y -i "C:\Users\test\Desktop\vidz\New folder (2)\target\vaastav song .mp4" -i "C:\Users\test\Desktop\vidz\New folder (2)\target\2.mp3" -filter_complex "[0]atrim=0:2[Apre];[0]atrim=5,asetpts=PTS-STARTPTS[Apost];[Apre][1][Apost]concat=n=3:v=0:a=1" -vcodec copy -y "C:\Users\test\Desktop\vidz\New folder (2)\target\output1.mp4"


    



    log file

    



    ffmpeg version git-2020-04-13-59e3a9a Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200328
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 42.102 / 56. 42.102
  libavcodec     58. 78.102 / 58. 78.102
  libavformat    58. 42.100 / 58. 42.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 77.101 /  7. 77.101
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\test\Desktop\vidz\New folder (2)\target\vaastav song .mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2018-09-02T04:28:46.000000Z
  Duration: 00:05:08.80, start: 0.000000, bitrate: 2289 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 2160 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2018-09-02T04:28:46.000000Z
      handler_name    : ISO Media file produced by Google Inc. Created on: 09/01/2018.
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
    Metadata:
      creation_time   : 2018-09-02T04:28:46.000000Z
      handler_name    : ISO Media file produced by Google Inc. Created on: 09/01/2018.
Input #1, mp3, from 'C:\Users\test\Desktop\vidz\New folder (2)\target\2.mp3':
  Metadata:
    genre           : Electronic;Indie
    title           : A Distorted Noise With A Little Bit Of Sense
    artist          : Lenin Was A Zombie
    encoder         : Lavf56.19.100
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
  Duration: 00:00:54.00, start: 0.025057, bitrate: 192 kb/s
    Stream #1:0: Audio: mp3, 44100 Hz, stereo, fltp, 192 kb/s
    Metadata:
      encoder         : Lavc56.21
Stream mapping:
  Stream #0:1 (aac) -> atrim
  Stream #0:1 (aac) -> atrim
  Stream #1:0 (mp3float) -> concat:in1:a0
  concat -> Stream #0:0 (aac)
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
Output #0, mp4, to 'C:\Users\test\Desktop\vidz\New folder (2)\target\output1.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    encoder         : Lavf58.42.100
    Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      encoder         : Lavc58.78.102 aac
    Stream #0:1(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 2160 kb/s, 25 fps, 25 tbr, 90k tbn, 90k tbc (default)
    Metadata:
      creation_time   : 2018-09-02T04:28:46.000000Z
      handler_name    : ISO Media file produced by Google Inc. Created on: 09/01/2018.
frame=  737 fps=0.0 q=-1.0 size=    7936kB time=00:00:29.44 bitrate=2208.1kbits/s speed=58.9x    
[out_0_0 @ 000000000312c900] 100 buffers queued in out_0_0, something may be wrong.
[out_0_0 @ 000000000312c900] 1000 buffers queued in out_0_0, something may be wrong.
frame= 1401 fps=876 q=-1.0 size=   16640kB time=00:01:46.85 bitrate=1275.7kbits/s speed=66.8x    
frame= 2281 fps=1086 q=-1.0 size=   26112kB time=00:02:22.01 bitrate=1506.3kbits/s speed=67.6x    
frame= 3152 fps=1212 q=-1.0 size=   35584kB time=00:02:56.58 bitrate=1650.8kbits/s speed=67.9x    
frame= 4011 fps=1294 q=-1.0 size=   45824kB time=00:03:31.32 bitrate=1776.4kbits/s speed=68.2x    
frame= 4882 fps=1356 q=-1.0 size=   56320kB time=00:04:06.03 bitrate=1875.2kbits/s speed=68.3x    
frame= 5753 fps=1403 q=-1.0 size=   66560kB time=00:04:40.79 bitrate=1941.8kbits/s speed=68.5x    
frame= 6622 fps=1440 q=-1.0 size=   77056kB time=00:05:15.37 bitrate=2001.6kbits/s speed=68.6x    
frame= 7482 fps=1467 q=-1.0 size=   85248kB time=00:05:50.20 bitrate=1994.1kbits/s speed=68.7x    
frame= 7720 fps=1479 q=-1.0 Lsize=   87248kB time=00:05:59.79 bitrate=1986.5kbits/s speed=68.9x    
video:81451kB audio:5634kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.186449%
[aac @ 0000000003017ac0] Qavg: 648.065


    



    I tried messing about with the line of code but no success so I turn to you for additional support

    


  • Shaka Player returns 4001 error - Node.js local web server playing MPEG-DASH

    27 mai 2020, par salgarji

    I've used Chrome inspection tool to access 'Console' and analyze what is happening. Complete error information :

    



    D {severity: 2, category: 4, code: 4001, data: Array(1), handled: false}
category: 4
code: 4001
data: Array(1)
0: "http://localhost:8080/dash_segmentos/video.mpd"
length: 1
__proto__: Array(0)
handled: false
severity: 2
__proto__: Object


    



    My Server.js file :

    



    var http = require('http');
var fs = require('fs');

console.log(__dirname);

var path='dash_segmentos/video.mpd';
fs.access(path, fs.constants.R_OK | fs.constants.W_OK, (err) => {
    if (err) {
        console.log("%s doesn't exist", path);
    } else {
        console.log('can read/write %s', path);
    }
});

const PORT=8080; 

fs.readFile('./player.html', function (err, html) {

    if (err) throw err;    

    http.createServer(function(request, response) {  
        response.setHeader("Access-Control-Allow-Headers", "authorization, content-type");
        response.setHeader("Access-Control-Allow-Origin", "*");
        response.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
        response.writeHeader(200, {"Content-Type": "text/html"}); 
        response.write(html);  
        response.end();
    }).listen(PORT);
});


    



    As you can see I've added CORS (I guess it's correct) and a console.log to see if it's in the proper location. Furthermore, I've verified that file is accessible with fs.access and it returns can read/write dash_segmentos/video.mpd For this reason, I'm sure I am in the correct path and referencing the right file.

    



    The HTML code (player.html) provided to Server.js :

    



    &#xA;&#xA; &#xA; <code class="echappe-js">&lt;script type=&quot;text/javascript&quot;&amp;#xA;src=&quot;https://cdnjs.cloudflare.com/ajax/libs/shaka-player/2.5.11/shaka-player.compiled.js&quot;&gt;&lt;/script&gt;&#xA; &#xA; &#xA; 
    &#xA; &#xA;

    &#xA;&#xA; &lt;script&gt;&amp;#xA;function initApp() { &amp;#xA;shaka.polyfill.installAll(); &amp;#xA;if (shaka.Player.isBrowserSupported()) { &amp;#xA; initPlayer(); &amp;#xA; } else { &amp;#xA; console.error(&amp;#x27;Browser not supported!&amp;#x27;);&amp;#xA; }}&amp;#xA;&amp;#xA;function initPlayer() { &amp;#xA;var video = document.getElementById( &amp;#x27;video&amp;#x27; );&amp;#xA;var player = new shaka.Player( video );&amp;#xA; window.player = player; &amp;#xA;player.addEventListener(&amp;#x27;error&amp;#x27;, onErrorEvent); &amp;#xA;player.load(path).then(function (){&amp;#xA;    console.log(&amp;#x27;Video loaded correctly&amp;#x27;);&amp;#xA; }).catch(onError);&amp;#xA;&amp;#xA;function onErrorEvent(event) {&amp;#xA; onError(event.detail); &amp;#xA; }&amp;#xA;function onError(error) {&amp;#xA; console.error(&amp;#x27;Codigo de error: &amp;#x27;, error.code, &amp;#x27; en &amp;#x27;, error);&amp;#xA; }&amp;#xA;}&amp;#xA;&lt;/script&gt;&#xA;&#xA;&lt;script&gt;&amp;#xA;var path=&amp;#x27;dash_segmentos/video.mpd&amp;#x27;;&amp;#xA;//var path=&amp;#x27;https://dash.akamaized.net/dash264/TestCases/2c/qualcomm/1/MultiResMPEG2.mpd&amp;#x27;;&amp;#xA;//the URL above is working! but it won&amp;#x27;t read my local mpd&amp;#xA;&amp;#xA;document.addEventListener(&amp;#x27;DOMContentLoaded&amp;#x27;, initApp);&amp;#xA;&amp;#xA; &lt;/script&gt;&#xA; &#xA;&#xA;

    &#xA;&#xA;

    I've tried changing the URL to an online resource and the player is properly working.

    &#xA;&#xA;

    My fluent-ffmpeg command which generates the video is :

    &#xA;&#xA;

    var ffmpeg = require(&#x27;fluent-ffmpeg&#x27;);&#xA;&#xA;var grabacion = new ffmpeg();&#xA;&#xA;grabacion.addInput(&#x27;0&#x27;)&#xA;.inputOptions([&#x27;-y -nostdin&#x27;, &#x27;-f avfoundation&#x27;, &#x27;-video_size 1280x720&#x27;, &#x27;-framerate 30&#x27;])&#xA;.outputOptions([&#x27;-vcodec libx264&#x27;, &#x27;-keyint_min 0&#x27;, &#x27;-g 100&#x27;, &#x27;-map 0:v&#x27;, &#x27;-b:v 1000k&#x27;, &#x27;-f dash&#x27;,&#xA; &#x27;-use_template 1&#x27;, &#x27;-use_timeline 0&#x27;, &#x27;-init_seg_name video0-$RepresentationID$-$Number$.mp4&#x27;,&#xA; &#x27;-media_seg_name video0-$RepresentationID$-$Number$.mp4&#x27;,&#x27;-single_file 0&#x27;, &#x27;-remove_at_exit 0&#x27;, &#x27;-window_size 20&#x27;, &#x27;-seg_duration 4&#x27;])&#xA;.output(&#x27;/path/to/files/dash_segmentos/video.mpd&#x27;)&#xA;.run();&#xA;

    &#xA;&#xA;

    The mpd manifest file is :

    &#xA;&#xA;

    &lt;?xml version="1.0" encoding="utf-8"?>&#xA;<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediapresentationduration="PT26.7S" maxsegmentduration="PT4.0S" minbuffertime="PT13.2S">&#xA;    <programinformation>&#xA;    </programinformation>&#xA;    <servicedescription>&#xA;    </servicedescription>&#xA;    <period start="PT0.0S">&#xA;        <adaptationset contenttype="video" startwithsap="1" segmentalignment="true" bitstreamswitching="true" framerate="30000/1001" maxwidth="1280" maxheight="720" par="16:9">&#xA;            <representation mimetype="video/mp4" codecs="avc1.7a001f" bandwidth="1000000" width="1280" height="720" sar="1:1">&#xA;                <segmenttemplate timescale="1000000" duration="4000000" initialization="video0-$RepresentationID$-$Number$.mp4" media="video0-$RepresentationID$-$Number$.mp4" startnumber="1">&#xA;                </segmenttemplate>&#xA;            </representation>&#xA;        </adaptationset>&#xA;    </period>&#xA;</mpd>&#xA;

    &#xA;&#xA;

    Is something about ffmpeg ? Permissions ? Pixel format ? Encoding ? I've tried with other mpd file provided by my Raspberry Pi using video4linux (v4l) and it returns the same error !

    &#xA;&#xA;

    I know that's a lot of code, but maybe you find it quicker than me. I guess it's a Shaka Player thing with the XML, but I can't explain how ffmpeg is wrongly creating XML code.

    &#xA;&#xA;

    Thank you in advance !!

    &#xA;

  • How to combine/concatenate videos stored in AWS S3 bucket based on title of the file name

    9 juin 2020, par orangecube

    I am using a service that allows me to record videos that get automatically pushed to a folder (submissions) in an S3 bucket. There are multiple videos however they need to be grouped together and concatenated so the output is one video per group.

    &#xA;&#xA;

    So, basically, any tips on how I can take videos based on the title and stitch them together ?

    &#xA;&#xA;

    Example :

    &#xA;&#xA;

    Submissions folder will have :

    &#xA;&#xA;

    a-100-2.mp4&#xA;a-200-6.mp4&#xA;b-123-5.mp4&#xA;

    &#xA;&#xA;

    Expected output in processed folder :

    &#xA;&#xA;

    a.mp4     - (both &#x27;a&#x27; videos get stitched together)&#xA;b.mp4     - (only &#x27;b&#x27; gets sent over since there is only one video.)&#xA;

    &#xA;&#xA;

    Thanks in advance !

    &#xA;&#xA;

    Edit : Some additional and detailed information below if it helps.

    &#xA;&#xA;

    The files will be labeled with :&#xA;name-location-video_token-stream_token.mp4

    &#xA;&#xA;

    Need help creating a script or process that will concatenate the videos using the procedure outlined below :

    &#xA;&#xA;

    Processing rules (back end) :

    &#xA;&#xA;

      &#xA;
    1. Check if videos have same video_token in ‘submissions folder’. If so, keep the newest one and delete old ones.

    2. &#xA;

    3. Take all videos in ‘submissions folder’ with same name and location in title and concatenate the videos. Save output video to a new folder in the bucket labeled as the location for the folder name. &#xA;Output file name : &#xA;name-location-year.mp4.

    4. &#xA;

    &#xA;&#xA;

    EXAMPLE :

    &#xA;&#xA;

    Submissions folder :&#xA;joey-toronto-001-354.mp4

    &#xA;&#xA;

    joey-toronto-001-241.mp4 - this will be deleted

    &#xA;&#xA;

    joey-toronto-103-452.mp4

    &#xA;&#xA;

    alex-montreal-352-232.mp4

    &#xA;&#xA;

    alex-montreal-452-223.mp4

    &#xA;&#xA;

    Resulting output :

    &#xA;&#xA;

    Toronto folder :

    &#xA;&#xA;

    Joey-toronto-2020.mp4

    &#xA;&#xA;

    Montreal folder :

    &#xA;&#xA;

    Alex-montreal-2020.mp4

    &#xA;