Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (44)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (9629)

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

  • Perf Script Erroneous Dwarf Stacktrace Output

    12 juin 2020, par TheAhmad

    I used the following command to sample backtraces for an ffmpeg benchmark :

    &#xA;&#xA;

    sudo perf record -d --call-graph dwarf,65528 -c 1000000 -e mem_load_uops_retired.l3_miss:u ffmpeg -i /media/ahmad/DATA/Videos/video.mp4 -threads 1 -vf spp out.mp4&#xA;

    &#xA;&#xA;

    As can be seen, PEBS is not used, the stack size is set to the maximum and the sampling period is quite large. I also limited the thread count, but this is the first part of perf script --no-demangle output :

    &#xA;&#xA;

    ffmpeg 11750  6670.061261:    1000000 mem_load_uops_retired.l3_miss:u:                0         5080021 N/A|SNP N/A|TLB N/A|LCK N/A&#xA;        7fffeab68844 x264_pixel_avg_w16_avx2&#x2B;0x4 (/usr/lib/x86_64-linux-gnu/libx264.so.152)&#xA;&#xA;ffmpeg 11750  6670.274835:    1000000 mem_load_uops_retired.l3_miss:u:                0         5080021 N/A|SNP N/A|TLB N/A|LCK N/A&#xA;        7fffeab68844 x264_pixel_avg_w16_avx2&#x2B;0x4 (/usr/lib/x86_64-linux-gnu/libx264.so.152)&#xA;&#xA;ffmpeg 11750  6670.496159:    1000000 mem_load_uops_retired.l3_miss:u:                0         5080021 N/A|SNP N/A|TLB N/A|LCK N/A&#xA;        7fffeab8ef89 x264_pixel_sad_x4_16x16_avx2&#x2B;0x49 (/usr/lib/x86_64-linux-gnu/libx264.so.152)&#xA;&#xA;ffmpeg 11750  6670.852598:    1000000 mem_load_uops_retired.l3_miss:u:                0         5080021 N/A|SNP N/A|TLB N/A|LCK N/A&#xA;        7fffeaac97b3 pixel_memset&#x2B;0x293 (inlined)&#xA;        7fffeaac97b3 plane_expand_border&#x2B;0x293 (inlined)&#xA;        7fffeaac97b3 x264_frame_expand_border_filtered&#x2B;0x293 (/usr/lib/x86_64-linux-gnu/libx264.so.152)&#xA;        7fffeab463bc x264_fdec_filter_row&#x2B;0x69c (/usr/lib/x86_64-linux-gnu/libx264.so.152)&#xA;        7fffeab49523 x264_slice_write&#x2B;0x1873 (/usr/lib/x86_64-linux-gnu/libx264.so.152)&#xA;        7fffeab85285 x264_stack_align&#x2B;0x15 (/usr/lib/x86_64-linux-gnu/libx264.so.152)&#xA;        7fffeab45bdb x264_slices_write&#x2B;0xfb (/usr/lib/x86_64-linux-gnu/libx264.so.152)&#xA;        5555561e3d87 [unknown] ([heap])&#xA;&#xA;ffmpeg 11750  6671.110007:    1000000 mem_load_uops_retired.l3_miss:u:                0         5080021 N/A|SNP N/A|TLB N/A|LCK N/A&#xA;        7fffeab6cdde x264_frame_init_lowres_core_avx2&#x2B;0x8e (/usr/lib/x86_64-linux-gnu/libx264.so.152)&#xA;&#xA;ffmpeg 11750  6671.463562:    1000000 mem_load_uops_retired.l3_miss:u:                0         5080021 N/A|SNP N/A|TLB N/A|LCK N/A&#xA;        7fffeaabf806 x264_macroblock_load_pic_pointers&#x2B;0x886 (inlined)&#xA;        7fffeaabf806 x264_macroblock_cache_load&#x2B;0x886 (inlined)&#xA;        7fffeaabf806 x264_macroblock_cache_load_progressive&#x2B;0x886 (/usr/lib/x86_64-linux-gnu/libx264.so.152)&#xA;        7fffeab49204 x264_slice_write&#x2B;0x1554 (/usr/lib/x86_64-linux-gnu/libx264.so.152)&#xA;        7fffeab85285 x264_stack_align&#x2B;0x15 (/usr/lib/x86_64-linux-gnu/libx264.so.152)&#xA;        7fffeab45bdb x264_slices_write&#x2B;0xfb (/usr/lib/x86_64-linux-gnu/libx264.so.152)&#xA;                  1c [unknown] ([unknown])&#xA;

    &#xA;&#xA;

    None of the backtraces are correct. Because none of them begin with _start or __GI___clone. I also used LBR, instead. But it has more size constraints and, therefore, not suitable. Any suggestions on how to get around the problem ?

    &#xA;&#xA;


    &#xA;&#xA;

    UPDATE :

    &#xA;&#xA;

    The problem happens for all events that I checked. When I used mem_load_uops_retired.l3_miss or LLC-load-misses the problem was visible from the beginning. I also checked the output with the cycles event and everything worked fine, at the beginning. But after that, the same problem was seen.

    &#xA;&#xA;

    Also, note that, the problem disappears when I sample only kernel mem_load_uops_retired.l3_miss events.

    &#xA;

  • bash - forcing globstar asterisk expansion when passed to loop

    1er juillet 2020, par Kittywhiskers Van Gogh

    I am attempting to write a script that finds the extension of all files within a directory and normalise them using ffmpeg to conform to a singular file format, codec and resolution.

    &#xA;

    #!/usr/bin/env bash&#xA;&#xA;# We need to use globstar because we want to run this recursively (bash >4.0)&#xA;# This script won&#x27;t run on macOS unless you install bash from homebrew&#xA;shopt -s globstar nullglob&#xA;&#xA;# macOS doesn&#x27;t have some stuff that we need, presuming you have homebrew already&#xA;# then run "brew install ffmpeg rename"&#xA;if ! [ -x "$(command -v ffmpeg)" ] || ! [ -x "$(command -v rename)" ]; then&#xA;  echo &#x27;Required applications are absent, quitting :(&#x27; >&amp;2&#xA;  exit 1&#xA;fi&#xA;&#xA;# We need to know what file extensions we are dealing with&#xA;DISCOVERED_EXTENSIONS=$(find . -type f -name &#x27;*.*&#x27; | sed &#x27;s|.*\.||&#x27; | sort -u | tr &#x27;\n&#x27; &#x27; &#x27; | sed "s| | ./\**/*.|g" | rev | cut -c9- | rev | echo "./**/*.$(stdin)")&#xA;&#xA;# Let&#x27;s ignore newlines for now&#xA;IFS=$&#x27;\n&#x27;; set -f&#xA;&#xA;# Within the loop&#xA;for f in $(echo $DISCOVERED_EXTENSIONS | tr &#x27; &#x27; &#x27;\n&#x27;); do&#xA;# Do nothing if there are no files to begin with&#xA;#    if [ -z ${f&#x2B;x} ]; then&#xA;#        echo "no files found, exiting";&#xA;#    else&#xA;# First get rid of all period/full-stops except the extension to prevent confusion&#xA;#        rename "s/\.(?=[^.]*\.)/_/g" "$f";&#xA;# Now run conversion and save files with prefix processed_&#xA;#        ffmpeg -i "$f" -vf scale=-1:720 -crf 18 \&#xA;#        -c:v libx264 -preset veryslow -c:a libvo_aacenc -b:a 128k -c:s copy \&#xA;#        "processed_${f%.*}.mp4";&#xA;#    fi&#xA;  ls $f;&#xA;done&#xA;&#xA;# No longer ignore newlines&#xA;unset IFS; set &#x2B;f&#xA;&#xA;# Stop using recursiveness after we&#x27;re done&#xA;shopt -u globstar nullglob&#xA;

    &#xA;

    I have commented out all the actual conversion code in an attempt to debug it, running this script alone, I get :

    &#xA;

    ls: ./**/*.avi: No such file or directory&#xA;ls: ./**/*.jpg: No such file or directory&#xA;ls: ./**/*.mkv: No such file or directory&#xA;ls: ./**/*.mp4: No such file or directory&#xA;

    &#xA;

    It is passing ls "./**/*.avi" instead of ls ./**/*.avi (because of no variable expansion). I attempted to use eval, envsubst and even used a custom expand function, to no avail

    &#xA;

    The result of echo "$DISCOVERED_EXTENSIONS" is :

    &#xA;

    ./**/*.avi ./**/*.jpg ./**/*.mkv ./**/*.mp4&#xA;

    &#xA;

    ShellCheck objected to my lack of quotation marks but adding them in did not do anything. What changes can be recommended so that value of $f is the result of glob expansion and not the expression itself ?

    &#xA;