
Recherche avancée
Autres articles (46)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (5357)
-
Révision 17834 : en cas d’insertion de job unique, et de concurrence de deux threads, on peut se ...
5 mai 2011, par cedric -Il faut donc reverifier apres insert, afin que le process qui a inserer son job en second s’efface et rende la main.
-
CD-R Read Speed Experiments
21 mai 2011, par Multimedia Mike — Science Projects, Sega DreamcastI want to know how fast I can really read data from a CD-R. Pursuant to my previous musings on this subject, I was informed that it is inadequate to profile reading just any file from a CD-R since data might be read faster or slower depending on whether the data is closer to the inside or the outside of the disc.
Conclusion / Executive Summary
It is 100% true that reading data from the outside of a CD-R is faster than reading data from the inside. Read on if you care to know the details of how I arrived at this conclusion, and to find out just how much speed advantage there is to reading from the outside rather than the inside.Science Project Outline
- Create some sample CD-Rs with various properties
- Get a variety of optical drives
- Write a custom program that profiles the read speed
Creating The Test Media
It’s my understanding that not all CD-Rs are created equal. Fortunately, I have 3 spindles of media handy : Some plain-looking Memorex discs, some rather flamboyant Maxell discs, and those 80mm TDK discs :
My approach for burning is to create a single file to be burned into a standard ISO-9660 filesystem. The size of the file will be the advertised length of the CD-R minus 1 megabyte for overhead— so, 699 MB for the 120mm discs, 209 MB for the 80mm disc. The file will contain a repeating sequence of 0..0xFF bytes.
Profiling
I don’t want to leave this to the vagaries of any filesystem handling layer so I will conduct this experiment at the sector level. Profiling program outline :- Read the CD-ROM TOC and get the number of sectors that comprise the data track
- Profile reading the first 20 MB of sectors
- Profile reading 20 MB of sectors in the middle of the track
- Profile reading the last 20 MB of sectors
Unfortunately, I couldn’t figure out the raw sector reading on modern Linux incarnations (which is annoying since I remember it being pretty straightforward years ago). So I left it to the filesystem after all. New algorithm :
- Open the single, large file on the CD-R and query the file length
- Profile reading the first 20 MB of data, 512 kbytes at a time
- Profile reading 20 MB of sectors in the middle of the track (starting from filesize / 2 - 10 MB), 512 kbytes at a time
- Profile reading the last 20 MB of sectors (starting from filesize - 20MB), 512 kbytes at a time
Empirical Data
I tested the program in Linux using an LG Slim external multi-drive (seen at the top of the pile in this post) and one of my Sega Dreamcast units. I gathered the median value of 3 runs for each area (inner, middle, and outer). I also conducted a buffer flush in between Linux runs (as root :'sync; echo 3 > /proc/sys/vm/drop_caches'
).LG Slim external multi-drive (reading from inner, middle, and outer areas in kbytes/sec) :
- TDK-80mm : 721, 897, 1048
- Memorex-120mm : 1601, 2805, 3623
- Maxell-120mm : 1660, 2806, 3624
So the 120mm discs can range from about 10.5X all the way up to a full 24X on this drive. For whatever reason, the 80mm disc fares a bit worse — even at the inner track — with a range of 4.8X - 7X.
Sega Dreamcast (reading from inner, middle, and outer areas in kbytes/sec) :
- TDK-80mm : 502, 632, 749
- Memorex-120mm : 499, 889, 1143
- Maxell-120mm : 500, 890, 1156
It’s interesting that the 80mm disc performed comparably to the 120mm discs in the Dreamcast, in contrast to the LG Slim drive. Also, the results are consistent with my previous profiling experiments, which largely only touched the inner area. The read speeds range from 3.3X - 7.7X. The middle of a 120mm disc reads at about 6X.
Implications
A few thoughts regarding these results :- Since the very definition of 1X is the minimum speed necessary to stream data from an audio CD, then presumably, original 1X CD-ROM drives would have needed to be capable of reading 1X from the inner area. I wonder what the max read speed at the outer edges was ? It’s unlikely I would be able to get a 1X drive working easily in this day and age since the earliest CD-ROM drives required custom controllers.
- I think 24X is the max rated read speed for CD-Rs, at least for this drive. This implies that the marketing literature only cites the best possible numbers. I guess this is no surprise, similar to how monitors and TVs have always been measured by their diagonal dimension.
- Given this data, how do you engineer an ISO-9660 filesystem image so that the timing-sensitive multimedia files live on the outermost track ? In the Dreamcast case, if you can guarantee your FMV files will live somewhere between the middle and the end of the disc, you should be able to count on a bitrate of at least 900 kbytes/sec.
Source Code
Here is the program I wrote for profiling. Note that the filename is hardcoded (#define FILENAME
). Compiling for Linux is a simple'gcc -Wall profile-cdr.c -o profile-cdr'
. Compiling for Dreamcast is performed in the standard KallistiOS manner (people skilled in the art already know what they need to know) ; the only variation is to compile with the'-D_arch_dreamcast'
flag, which the default KOS environment adds anyway.C :-
#ifdef _arch_dreamcast
-
#include <kos .h>
-
-
/* map I/O functions to their KOS equivalents */
-
#define open fs_open
-
#define lseek fs_seek
-
#define read fs_read
-
#define close fs_close
-
-
#define FILENAME "/cd/bigfile"
-
#else
-
#include <stdio .h>
-
#include <sys /types.h>
-
#include </sys><sys /stat.h>
-
#include </sys><sys /time.h>
-
#include <fcntl .h>
-
#include <unistd .h>
-
-
#define FILENAME "/media/Full disc/bigfile"
-
#endif
-
-
/* Get a current absolute millisecond count ; it doesn’t have to be in
-
* reference to anything special. */
-
unsigned int get_current_milliseconds()
-
{
-
#ifdef _arch_dreamcast
-
return timer_ms_gettime64() ;
-
#else
-
struct timeval tv ;
-
gettimeofday(&tv, NULL) ;
-
return tv.tv_sec * 1000 + tv.tv_usec / 1000 ;
-
#endif
-
}
-
-
#define READ_SIZE (20 * 1024 * 1024)
-
#define READ_BUFFER_SIZE (512 * 1024)
-
-
int main()
-
{
-
int i, j ;
-
int fd ;
-
char read_buffer[READ_BUFFER_SIZE] ;
-
off_t filesize ;
-
unsigned int start_time, end_time ;
-
-
fd = open(FILENAME, O_RDONLY) ;
-
if (fd == -1)
-
{
-
return 1 ;
-
}
-
filesize = lseek(fd, 0, SEEK_END) ;
-
-
for (i = 0 ; i <3 ; i++)
-
{
-
if (i == 0)
-
{
-
lseek(fd, 0, SEEK_SET) ;
-
}
-
else if (i == 1)
-
{
-
lseek(fd, (filesize / 2) - (READ_SIZE / 2), SEEK_SET) ;
-
}
-
else
-
{
-
lseek(fd, filesize - READ_SIZE, SEEK_SET) ;
-
}
-
/* read 20 MB ; 40 chunks of 1/2 MB */
-
start_time = get_current_milliseconds() ;
-
for (j = 0 ; j <(READ_SIZE / READ_BUFFER_SIZE) ; j++)
-
if (read(fd, read_buffer, READ_BUFFER_SIZE) != READ_BUFFER_SIZE)
-
{
-
break ;
-
}
-
end_time = get_current_milliseconds() ;
-
end_time, start_time, end_time - start_time,
-
READ_SIZE / (end_time - start_time)) ;
-
}
-
-
close(fd) ;
-
-
return 0 ;
-
}
-
FATE’s New Look
4 août 2010, par Multimedia Mike — FATE ServerThe FATE main page exposes a lot of data. The manner in which it is presented has always been bounded by my extremely limited web development abilities. I wrestled with whether I should learn better web development skills first and allow that to inform any improved design, or focus on the more useful design and invest my web development learning time towards realizing that design.
Fortunately, Mans solved this conundrum with an elegantly simple solution :
The top of the page displays a status bar that illustrates — at a glance — how functional the codebase is. The web page source code identifies this as the failometer. It took me a few seconds to recognize what information that status bar was attempting to convey ; maybe it could use a succinct explanation.
Mini-Book Review
Before Mans took over, I thought about this problem quite a bit. I needed inspiration for creating a better FATE main page and aggregating a large amount of data in a useful, easily-digested form. Looking around the web, I see no shortage of methods for visualizing data. I could start shoehorning FATE data into available methods and see what works. But I thought it would be better to take a step back and think about the best way to organize the data. My first clue came awhile ago in the form of an xkcd comic : Blogofractal. Actually, the clue came from the mouseover text which recommended Edward Tufte’s "The Visual Display of Quantitative Information".
I ordered this up and plowed through it. It’s an interesting read, to be sure. However, I think it illustrates what a book on multimedia and compression technology would look like if authored by yours truly— a book of technical curiosities from epochs past that discusses little in the way of modern practical application. Tufte’s book showed me lots of examples of infographics from decades and even centuries past, but I never concisely learned exactly how to present data such as FATE’s main page in a more useful form.
Visualization Blog
More recently, I discovered a blog called Flowing Data, authored by a statistics Ph.D. candidate who purportedly eats, sleeps, and breathes infographics. The post 11 Ways to Visualize Changes Over Time : A Guide offers a good starting point for creating useful data presentations.I still subscribe to and eagerly read Flowing Data. But I might not have as much use for data visualization now that Mans is on FATE duty.