
Recherche avancée
Médias (91)
-
Spoon - Revenge !
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
My Morning Jacket - One Big Holiday
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Zap Mama - Wadidyusay ?
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
David Byrne - My Fair Lady
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Beastie Boys - Now Get Busy
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (61)
-
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...)
Sur d’autres sites (14518)
-
Detect if an interlaced video frame is the Top or Bottom field ?
21 décembre 2024, par DannyI'm decoding video PES packets (packetized elementary stream) containing H.264/AVC and H.265/HEVC using
libavcodec
like this :

while (remainingESBytes > 0)
{
 int bytesUsed = av_parser_parse2(
 mpParser, mpDecContext,
 &mpEncPacket->data, &mpEncPacket->size,
 pIn, remainingESBytes,
 AV_NOPTS_VALUE, AV_NOPTS_VALUE, 0);

 // send encoded packet for decoding
 int ret = avcodec_send_packet(mpDecContext, mpEncPacket);
 if (ret < 0)
 {
 // failed
 continue;
 }

 while (ret >= 0)
 {
 ret = avcodec_receive_frame(mpDecContext, mpDecFrame);
 /// Do stuff with frame ///
 }

 remainingESBytes = getMoreBytes()
}



Sometimes the input video is interlaced, in which case it seems
avcodec_receive_frame
is returning individual fields and not a merged frame of the top and bottom fields together.

I couldn't find any way for
avcodec_receive_frame
to emit a full, non-interlaced frame.

I can merge a top and bottom field together but I haven't found any way to identify if a given
AVFrame
is top or bottom.

How can I do that ?


EDIT I


Looking at the log output from the decoder, it appears the decoder knows if the field is top or bottom (carried by SEI ?) but still can't figure out how to access that information via the libavcodec API...


[hevc @ 0x1afcfc0] ENTER DECODE NAL TYPE 39. sei.ni_custom.type = -1
[hevc @ 0x1afcfc0] Set sei.ni_custom.type to -1.
[hevc @ 0x1afcfc0] ff_hevc_decode_nal_sei - s->ni_custom.type = -1
[hevc @ 0x1afcfc0] Decoding SEI [NAL Type 39]. ni_custom.type=-1
[hevc @ 0x1afcfc0] TOP Field
[hevc @ 0x1afcfc0] EXIT DECODE NAL TYPE 39. sei.ni_custom.type = -1



-
Performance optimizations you can apply today to load the Piwik JavaScript tracker faster
20 avril 2017, par InnoCraft — Community, DevelopmentWhen you track your website with Piwik or any other analytics solution, you need to embed a JavaScript file in order to track page views, events, clicks, and more. At InnoCraft, it is our daily business to help Piwik users to make the most out of their Piwik. We often see similar problems of websites loading unnecessarily slower because the tracking file is not loaded as fast as it should be. There are many ways you can improve the performance but avoiding the most important mistakes will help you to not lose revenue and conversions because of this today. Below you find a few steps that will boost the loading of your Piwik JavaScript tracking file.
Cache piwik.js
The most important step is to make sure to configure your server in a way so the piwik.js JavaScript tracker file will be cached once it has been loaded and not requested again on subsequent page views. Learn more about browser caching.
Enable GZIP
We recommend enabling GZIP as it reduces the size the user needs to load when the piwik.js file is requested. For the standard Piwik tracker, this will reduce the size from about 60KB to 20KB.
Preload DNS
Often a Piwik is hosted on a different domain and when the browser loads the JavaScript tracker file, it needs to first perform a DNS lookup to find the IP address for this domain. By adding the below snipped for your Piwik domain, it can boost the performance of loading the tracker file by 10ms to 50ms.
<link rel="dns-prefetch" href="//example.innocraft.cloud">
Preload resource
To boost the loading of the Piwik tracking file, you can add the following HTML into the header of your website :
<link rel="preload" href="https://yourpiwikdomain.com/piwik.js" onload="embedTracker()" type="script" crossorigin>
In Chrome, Opera, and soon in more browsers this will load the JavaScript tracker file without blocking the “onload” event. As a result, as soon as you embed the tracking code, the JavaScript tracker might be already loaded. How “preloading” affects your website always depends and maybe you rather want to preload more important resources than the tracking code, but it is an option to consider. If you load your JavaScript tracker file in the
<head>
of your website, this should not be needed.Advanced options
If you want to go even further, you can think about serving the JavaScript tracking file via a CDN, merging the JavaScript tracker file content with your other JavaScript files, making use of service workers (and even track data offline), and more. Feel free to get in touch with us if you have any questions.
More performance improvements
Read our first blog in the series at Different ways of embedding the Piwik tracking code for faster website performance
-
Slicing an AVI file
7 novembre 2014, par Peter LurI am trying to upload only a certain part of an AVI file on the server without having to upload the whole file first.
If I set the slice to the beginning (byte : 0), I can read the resulting file no problem even if I slice it in any size. However if the slice start anywhere but not at byte 0, the file become unreadable. I guess this has something to do with the avi header/index being messed up. I was wondering maybe I could use ffmpeg to move the header or something ?
HTML Source
<code class="echappe-js"><script type="text/javascript"><br />
<br />
window.BlobBuilder = window.MozBlobBuilder || window.WebKitBlobBuilder || window.BlobBuilder;<br />
<br />
function sendRequest() {<br />
var blob = document.getElementById('fileToUpload').files[0];<br />
<br />
<br />
//Slicing parameters<br />
<br />
<br />
//#1: Starting at byte:0 = WORKING WELL<br />
var start = 0;<br />
var end = 1048576; // 1MB chunk sizes.<br />
<br />
<br />
//#2: Slicing the video file somewhere else (FAIL)<br />
<br />
/*<br />
var start = 1048576*3;<br />
var end = 1048576*4;<br />
*/<br />
<br />
<br />
var chunk = blob.slice(start, end, 'video/avi');<br />
uploadFile(chunk);<br />
<br />
}<br />
<br />
function fileSelected() {<br />
var file = document.getElementById('fileToUpload').files[0];<br />
if (file) {<br />
var fileSize = 0;<br />
if (file.size > 1024 * 1024)<br />
fileSize = (Math.round(file.size * 100 / (1024 * 1024)) / 100).toString() + 'MB';<br />
else<br />
fileSize = (Math.round(file.size * 100 / 1024) / 100).toString() + 'KB';<br />
<br />
document.getElementById('fileName').innerHTML = 'Name: ' + file.name;<br />
document.getElementById('fileSize').innerHTML = 'Size: ' + fileSize;<br />
document.getElementById('fileType').innerHTML = 'Type: ' + file.type;<br />
}<br />
}<br />
<br />
function uploadFile(blobFile) {<br />
//var file = document.getElementById('fileToUpload').files[0]; <br />
var fd = new FormData();<br />
fd.append("fileToUpload", blobFile);<br />
<br />
var xhr = new XMLHttpRequest();<br />
xhr.upload.addEventListener("progress", uploadProgress, false);<br />
xhr.addEventListener("load", uploadComplete, false);<br />
xhr.addEventListener("error", uploadFailed, false);<br />
xhr.addEventListener("abort", uploadCanceled, false);<br />
xhr.open("POST", "upload.php");<br />
xhr.onload = function(e) {<br />
//alert("loaded!");<br />
};<br />
<br />
xhr.send(fd);<br />
//alert("oen over");<br />
}<br />
<br />
function uploadProgress(evt) {<br />
if (evt.lengthComputable) {<br />
var percentComplete = Math.round(evt.loaded * 100 / evt.total);<br />
document.getElementById('progressNumber').innerHTML = percentComplete.toString() + '%';<br />
}<br />
else {<br />
document.getElementById('progressNumber').innerHTML = 'unable to compute';<br />
}<br />
}<br />
<br />
function uploadComplete(evt) {<br />
/* This event is raised when the server send back a response */<br />
//alert(evt.target.responseText);<br />
}<br />
<br />
function uploadFailed(evt) {<br />
alert("There was an error attempting to upload the file.");<br />
}<br />
<br />
function uploadCanceled(evt) {<br />
xhr.abort();<br />
xhr = null;<br />
//alert("The upload has been canceled by the user or the browser dropped the connection.");<br />
}<br />
</script>PHP Source (upload.php)
<?php
$tmp_name = $_FILES['fileToUpload']['tmp_name'];
$size = $_FILES['fileToUpload']['size'];
$name = $_FILES['fileToUpload']['name'];
$target_file = basename($name);
$complete = "complete.avi";
$com = fopen($complete, "ab");
// Open temp file
$out = fopen($target_file, "wb");
if ( $out ) {
// Read binary input stream and append it to temp file
$in = fopen($tmp_name, "rb");
if ( $in ) {
while ( $buff = fread( $in, 1048576 ) ) {
fwrite($out, $buff);
fwrite($com, $buff);
}
}
fclose($in);
fclose($out);
}
fclose($com);
?>