
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (44)
-
Keeping control of your media in your hands
13 avril 2011, parThe 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, parLe 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 2011Unfortunately 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 salgarjiI'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 returnscan 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 toServer.js
:




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

 
 

 



<script>&#xA;function initApp() { &#xA;shaka.polyfill.installAll(); &#xA;if (shaka.Player.isBrowserSupported()) { &#xA; initPlayer(); &#xA; } else { &#xA; console.error(&#x27;Browser not supported!&#x27;);&#xA; }}&#xA;&#xA;function initPlayer() { &#xA;var video = document.getElementById( &#x27;video&#x27; );&#xA;var player = new shaka.Player( video );&#xA; window.player = player; &#xA;player.addEventListener(&#x27;error&#x27;, onErrorEvent); &#xA;player.load(path).then(function (){&#xA; console.log(&#x27;Video loaded correctly&#x27;);&#xA; }).catch(onError);&#xA;&#xA;function onErrorEvent(event) {&#xA; onError(event.detail); &#xA; }&#xA;function onError(error) {&#xA; console.error(&#x27;Codigo de error: &#x27;, error.code, &#x27; en &#x27;, error);&#xA; }&#xA;}&#xA;</script>


<script>&#xA;var path=&#x27;dash_segmentos/video.mpd&#x27;;&#xA;//var path=&#x27;https://dash.akamaized.net/dash264/TestCases/2c/qualcomm/1/MultiResMPEG2.mpd&#x27;;&#xA;//the URL above is working! but it won&#x27;t read my local mpd&#xA;&#xA;document.addEventListener(&#x27;DOMContentLoaded&#x27;, initApp);&#xA;&#xA; </script>

 




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



My fluent-ffmpeg command which generates the video is :



var ffmpeg = require('fluent-ffmpeg');

var grabacion = new ffmpeg();

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




The mpd manifest file is :



<?xml version="1.0" encoding="utf-8"?>
<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">
 <programinformation>
 </programinformation>
 <servicedescription>
 </servicedescription>
 <period start="PT0.0S">
 <adaptationset contenttype="video" startwithsap="1" segmentalignment="true" bitstreamswitching="true" framerate="30000/1001" maxwidth="1280" maxheight="720" par="16:9">
 <representation mimetype="video/mp4" codecs="avc1.7a001f" bandwidth="1000000" width="1280" height="720" sar="1:1">
 <segmenttemplate timescale="1000000" duration="4000000" initialization="video0-$RepresentationID$-$Number$.mp4" media="video0-$RepresentationID$-$Number$.mp4" startnumber="1">
 </segmenttemplate>
 </representation>
 </adaptationset>
 </period>
</mpd>




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 !



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.



Thank you in advance !!


-
Perf Script Erroneous Dwarf Stacktrace Output
12 juin 2020, par TheAhmadI used the following command to sample backtraces for an
ffmpeg
benchmark :


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




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 ofperf script --no-demangle
output :


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
 7fffeab68844 x264_pixel_avg_w16_avx2+0x4 (/usr/lib/x86_64-linux-gnu/libx264.so.152)

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
 7fffeab68844 x264_pixel_avg_w16_avx2+0x4 (/usr/lib/x86_64-linux-gnu/libx264.so.152)

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
 7fffeab8ef89 x264_pixel_sad_x4_16x16_avx2+0x49 (/usr/lib/x86_64-linux-gnu/libx264.so.152)

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
 7fffeaac97b3 pixel_memset+0x293 (inlined)
 7fffeaac97b3 plane_expand_border+0x293 (inlined)
 7fffeaac97b3 x264_frame_expand_border_filtered+0x293 (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 7fffeab463bc x264_fdec_filter_row+0x69c (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 7fffeab49523 x264_slice_write+0x1873 (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 7fffeab85285 x264_stack_align+0x15 (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 7fffeab45bdb x264_slices_write+0xfb (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 5555561e3d87 [unknown] ([heap])

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
 7fffeab6cdde x264_frame_init_lowres_core_avx2+0x8e (/usr/lib/x86_64-linux-gnu/libx264.so.152)

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
 7fffeaabf806 x264_macroblock_load_pic_pointers+0x886 (inlined)
 7fffeaabf806 x264_macroblock_cache_load+0x886 (inlined)
 7fffeaabf806 x264_macroblock_cache_load_progressive+0x886 (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 7fffeab49204 x264_slice_write+0x1554 (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 7fffeab85285 x264_stack_align+0x15 (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 7fffeab45bdb x264_slices_write+0xfb (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 1c [unknown] ([unknown])




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




UPDATE :



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


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

-
bash - forcing globstar asterisk expansion when passed to loop
1er juillet 2020, par Kittywhiskers Van GoghI 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.

#!/usr/bin/env bash

# We need to use globstar because we want to run this recursively (bash >4.0)
# This script won't run on macOS unless you install bash from homebrew
shopt -s globstar nullglob

# macOS doesn't have some stuff that we need, presuming you have homebrew already
# then run "brew install ffmpeg rename"
if ! [ -x "$(command -v ffmpeg)" ] || ! [ -x "$(command -v rename)" ]; then
 echo 'Required applications are absent, quitting :(' >&2
 exit 1
fi

# We need to know what file extensions we are dealing with
DISCOVERED_EXTENSIONS=$(find . -type f -name '*.*' | sed 's|.*\.||' | sort -u | tr '\n' ' ' | sed "s| | ./\**/*.|g" | rev | cut -c9- | rev | echo "./**/*.$(stdin)")

# Let's ignore newlines for now
IFS=$'\n'; set -f

# Within the loop
for f in $(echo $DISCOVERED_EXTENSIONS | tr ' ' '\n'); do
# Do nothing if there are no files to begin with
# if [ -z ${f+x} ]; then
# echo "no files found, exiting";
# else
# First get rid of all period/full-stops except the extension to prevent confusion
# rename "s/\.(?=[^.]*\.)/_/g" "$f";
# Now run conversion and save files with prefix processed_
# ffmpeg -i "$f" -vf scale=-1:720 -crf 18 \
# -c:v libx264 -preset veryslow -c:a libvo_aacenc -b:a 128k -c:s copy \
# "processed_${f%.*}.mp4";
# fi
 ls $f;
done

# No longer ignore newlines
unset IFS; set +f

# Stop using recursiveness after we're done
shopt -u globstar nullglob



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


ls: ./**/*.avi: No such file or directory
ls: ./**/*.jpg: No such file or directory
ls: ./**/*.mkv: No such file or directory
ls: ./**/*.mp4: No such file or directory



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

The result of
echo "$DISCOVERED_EXTENSIONS"
is :

./**/*.avi ./**/*.jpg ./**/*.mkv ./**/*.mp4



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 ?