Recherche avancée

Médias (91)

Autres articles (40)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (7970)

  • Evolution #2071 (Nouveau) : Plugin Organiseur - fil rss des nouveaux messages

    6 mai 2011, par Suske -

    Intégrer l’icône RSS DANS la boite "nouveaux messages", sinon lui donner un peu d’air pour que son rôle soit plus intuitif.

  • CD-R Read Speed Experiments

    21 mai 2011, par Multimedia Mike — Science Projects, Sega Dreamcast

    I 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 :
    1. #ifdef _arch_dreamcast
    2.   #include <kos .h>
    3.  
    4.   /* map I/O functions to their KOS equivalents */
    5.   #define open fs_open
    6.   #define lseek fs_seek
    7.   #define read fs_read
    8.   #define close fs_close
    9.  
    10.   #define FILENAME "/cd/bigfile"
    11. #else
    12.   #include <stdio .h>
    13.   #include <sys /types.h>
    14.   #include </sys><sys /stat.h>
    15.   #include </sys><sys /time.h>
    16.   #include <fcntl .h>
    17.   #include <unistd .h>
    18.  
    19.   #define FILENAME "/media/Full disc/bigfile"
    20. #endif
    21.  
    22. /* Get a current absolute millisecond count ; it doesn’t have to be in
    23. * reference to anything special. */
    24. unsigned int get_current_milliseconds()
    25. {
    26. #ifdef _arch_dreamcast
    27.   return timer_ms_gettime64() ;
    28. #else
    29.   struct timeval tv ;
    30.   gettimeofday(&tv, NULL) ;
    31.   return tv.tv_sec * 1000 + tv.tv_usec / 1000 ;
    32. #endif
    33. }
    34.  
    35. #define READ_SIZE (20 * 1024 * 1024)
    36. #define READ_BUFFER_SIZE (512 * 1024)
    37.  
    38. int main()
    39. {
    40.   int i, j ;
    41.   int fd ;
    42.   char read_buffer[READ_BUFFER_SIZE] ;
    43.   off_t filesize ;
    44.   unsigned int start_time, end_time ;
    45.  
    46.   fd = open(FILENAME, O_RDONLY) ;
    47.   if (fd == -1)
    48.   {
    49.     printf("could not open %s\n", FILENAME) ;
    50.     return 1 ;
    51.   }
    52.   filesize = lseek(fd, 0, SEEK_END) ;
    53.  
    54.   for (i = 0 ; i <3 ; i++)
    55.   {
    56.     if (i == 0)
    57.     {
    58.       printf("reading inner 20 MB...\n") ;
    59.       lseek(fd, 0, SEEK_SET) ;
    60.     }
    61.     else if (i == 1)
    62.     {
    63.       printf("reading middle 20 MB...\n") ;
    64.       lseek(fd, (filesize / 2) - (READ_SIZE / 2), SEEK_SET) ;
    65.     }
    66.     else
    67.     {
    68.       printf("reading outer 20 MB...\n") ;
    69.       lseek(fd, filesize - READ_SIZE, SEEK_SET) ;
    70.     }
    71.     /* read 20 MB ; 40 chunks of 1/2 MB */
    72.     start_time = get_current_milliseconds() ;
    73.     for (j = 0 ; j <(READ_SIZE / READ_BUFFER_SIZE) ; j++)
    74.       if (read(fd, read_buffer, READ_BUFFER_SIZE) != READ_BUFFER_SIZE)
    75.       {
    76.         printf("read error\n") ;
    77.         break ;
    78.       }
    79.     end_time = get_current_milliseconds() ;
    80.     printf("%d - %d = %d ms => %d kbytes/sec\n",
    81.       end_time, start_time, end_time - start_time,
    82.       READ_SIZE / (end_time - start_time)) ;
    83.   }
    84.  
    85.   close(fd) ;
    86.  
    87.   return 0 ;
    88. }
  • compile FFmpeg error on windows when run ./configure

    5 novembre 2013, par user1325717

    I want to use FFmpeg to decode mp3 and acc on android, I use android-ndk-r7 and the newest cygwin.

    I wrote a shell config.sh, which content is :


    TMPDIR=/cygdrive/c/temp

    PREBUILT=/cygdrive/c/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows
    PLATFORM=/cygdrive/c/android-ndk-r7/platforms/android-8/arch-arm

    ./configure --target-os=linux --arch=arm --enable-version3 --enable-gpl --enable-nonfree --disable-stripping --disable-ffmpeg --disable-ffplay --disable-ffserver --disable-ffprobe --disable-encoders --disable-muxers --disable-devices --disable-protocols --enable-protocol=file --enable-avfilter --disable-network --disable-mpegaudio-hp --disable-avdevice --enable-cross-compile --cc=$PREBUILT/bin/arm-linux-androideabi-gcc --cross-prefix=$PREBUILT/bin/arm-linux-androideabi- --nm=$PREBUILT/bin/arm-linux-androideabi-nm --extra-cflags="-fPIC -DANDROID" --disable-asm --enable-neon --enable-armv5te --extra-ldflags="-Wl,-T,$PREBUILT/arm-eabi/lib/ldscripts/armelf_linux_eabi.x -Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib $PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/crtbegin.o $PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/crtend.o -lc -lm -ldl"

    I open cmd and do bash to open cygwin shell, then do ./config, the problem is appeared :
    "/cygdrive/c/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-gcc is unable to create an executable file..."

    the config.log is :

    check_ld
    check_cc
    BEGIN /cygdrive/c/temp/ffconf.SFJc3t92.c
       1   int main(void){ return 0; }
    END /cygdrive/c/temp/ffconf.SFJc3t92.c
    gcc -fPIC -DANDROID -std=c99 -c -o /cygdrive/c/temp/ffconf.YKRv5TSp.o /cygdrive/c/temp/ffconf.SFJc3t92.c
    /cygdrive/c/temp/ffconf.SFJc3t92.c:1:0: warning: -fPIC ignored for target (all code is position independent)
    gcc -Wl,-rpath-link=/cygdrive/c/android-ndk-r7/platforms/android-4/arch-arm/usr/lib -L/cygdrive/c/android-ndk-r7/platforms/android-4/arch-arm/usr/lib -nostdlib /cygdrive/c/android-ndk-r7/platforms/android-4/arch-arm/usr/lib/crtbegin_static.o /cygdrive/c/android-ndk-r7/platforms/android-4/arch-arm/usr/lib/crtend_android.o -lc -lm -ldl -o /cygdrive/c/temp/ffconf.Yf1Ftjmo /cygdrive/c/temp/ffconf.YKRv5TSp.o
    /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: /cygdrive/c/android-ndk-r7/platforms/android-4/arch-arm/usr/lib/crtbegin_static.o: Relocations in generic ELF (EM: 40)
    /cygdrive/c/android-ndk-r7/platforms/android-4/arch-arm/usr/lib/crtbegin_static.o: could not read symbols: File in wrong format
    collect2: ld returned 1 exit status
    C compiler test failed.

    I don't know what is happened, is there someone who know what is happened, thanks.