Recherche avancée

Médias (91)

Autres articles (83)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette 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.

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

Sur d’autres sites (6971)

  • Streaming images with ffmpeg gives shorter video

    24 juin 2014, par darko_5

    I am streaming a video form my camera by passing to ffmpeg images from that camera. I am using command :

    ffmpeg -r 26 -re -f image2pipe -vcodec mjpeg -i - -c:v libx264 -f flv -preset ultrafast -s hd720 -maxrate 2000k -bufsize 150k rtmp://someaddress:port

    My problem is that, when light is weak and/or computer is slow my fps number is getting lower, even so i set it to -r 26. Low fps causing that video playad on web side is sometimes in fast motion and file i save to disk is shorter than it should.
    My opereting system is OS X. How can i do it so the video i s in proper speed.

  • Video Conversion to have Play Speed

    24 juin 2014, par Taufiq

    There is a open source Media Player Component called Media Kit (https://wpfmediakit.codeplex.com/). It supports Play Speed. But its dependent on video format.

    I have generated a video using SharpAvi (http://sharpavi.codeplex.com/) sample project, using Motion Jepg Encoder.

    This video does not have Play Speed support for some reason. Details Below from ffmpeg

    Video: mjpeg (MJPG / 0x47504A4D), yuvj420p(pc), 1920x1080 [SAR 96:96 DAR 16:9], 9818 kb/s, 10 fps, 10 tbr, 10 tbn, 10 tbc

    Next I download an flv video from Youtube and Media Kit’s play speed works fine with this video.

    Video: flv1, yuv420p, 426x240, 259 kb/s, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc

    Now I converted them into common MP4 format using ffmepg

    ffmpeg -i "1.avi" -ar 22050 -b 2048k "1.mp4"
    ffmpeg -i "2.flv" -ar 22050 -b 2048k "2.mp4"

    Results

    1.mp4

    Video: h264 (High) (avc1 / 0x31637661), yuv420p, 426x240, 1235 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)

    2.mp4

    Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 1920 x1080 [SAR 1:1 DAR 16:9], 158 kb/s, 10 fps, 10 tbr, 10240 tbn, 20 tbc (default)

    The thing is the converted video from flv file still supports play speed where else the converted mp4 from the Avi does not. What is that I am missing

    More Details Below.

    AVI File

    ffmpeg -i "1.avi" ffmpeg version N-64167-gca35037 Copyright (c) 2000-2014 the FFmpeg developers   built on Jun 22 2014 22:02:17 with gcc 4.8.3 (GCC)   configuration:
    --enable-gpl --enable-version3 --disable-w32threads --enable-av isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable- libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox r --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab -
    -enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
    --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable- libxavs --enable-libxvid --enable-decklink --enable-zlib   libavutil      52. 90.100 / 52. 90.100   libavcodec     55. 68.100 /
    55. 68.100   libavformat    55. 44.100 / 55. 44.100   libavdevice    55. 13.101 / 55. 13.101   libavfilter     4.  9.100 /  4.  9.100   libswscale      2.  6.100 /  2.  6.100   libswresample   0. 19.100 /
    0. 19.100   libpostproc    52.  3.100 / 52.  3.100 [avi @ 028fe560] non-interleaved AVI Input #0, avi, from '1.avi':   Duration: 00:00:37.50, start: 0.000000, bitrate: 9794 kb/s
       Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj420p(pc), 1920x1080 [SAR 96:96 DAR 16:9], 9818 kb/s, 10 fps, 10 tbr, 10 tbn, 10 tbc
       Metadata:
         title           : Screencast At least one output file must be specified

    fLV File

    ffmpeg -i "2.flv" ffmpeg version N-64167-gca35037 Copyright (c) 2000-2014 the FFmpeg developers   built on Jun 22 2014 22:02:17 with gcc 4.8.3 (GCC)   configuration:
    --enable-gpl --enable-version3 --disable-w32threads --enable-av isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable- libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox r --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab -
    -enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
    --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable- libxavs --enable-libxvid --enable-decklink --enable-zlib   libavutil      52. 90.100 / 52. 90.100   libavcodec     55. 68.100 /
    55. 68.100   libavformat    55. 44.100 / 55. 44.100   libavdevice    55. 13.101 / 55. 13.101   libavfilter     4.  9.100 /  4.  9.100   libswscale      2.  6.100 /  2.  6.100   libswresample   0. 19.100 /
    0. 19.100   libpostproc    52.  3.100 / 52.  3.100 [flv @ 02b8e560] Stream discovered after head already parsed Input #0, flv, from '2.flv':   Metadata:
       starttime       : 0
       totalduration   : 85
       totaldatarate   : 325
       bytelength      : 3438869
       canseekontime   : true
       sourcedata      : B4A7DA902MM1403531086617082
       purl            :
       pmsg            :   Duration: 00:01:24.63, start: 0.000000, bitrate: 325 kb/s
       Stream #0:0: Video: flv1, yuv420p, 426x240, 259 kb/s, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc
       Stream #0:1: Audio: mp3, 22050 Hz, stereo, s16p, 65 kb/s
       Stream #0:2: Data: none At least one output file must be specified

    AVI to MP4

    ffmpeg -i "1.mp4" ffmpeg version N-64167-gca35037 Copyright (c) 2000-2014 the FFmpeg developers   built on Jun 22 2014 22:02:17 with gcc 4.8.3 (GCC)   configuration:
    --enable-gpl --enable-version3 --disable-w32threads --enable-av isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable- libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox r --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab -
    -enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
    --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable- libxavs --enable-libxvid --enable-decklink --enable-zlib   libavutil      52. 90.100 / 52. 90.100   libavcodec     55. 68.100 /
    55. 68.100   libavformat    55. 44.100 / 55. 44.100   libavdevice    55. 13.101 / 55. 13.101   libavfilter     4.  9.100 /  4.  9.100   libswscale      2.  6.100 /  2.  6.100   libswresample   0. 19.100 /
    0. 19.100   libpostproc    52.  3.100 / 52.  3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':   Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf55.44.100   Duration: 00:00:37.50, start: 0.000000, bitrate: 159 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 1920 x1080 [SAR 1:1 DAR 16:9], 158 kb/s, 10 fps, 10 tbr, 10240 tbn, 20 tbc (default)
       Metadata:
         handler_name    : VideoHandler At least one output file must be specified

    FLV to MP4

    ffmpeg -i "2.mp4" ffmpeg version N-64167-gca35037 Copyright (c) 2000-2014 the FFmpeg developers   built on Jun 22 2014 22:02:17 with gcc 4.8.3 (GCC)   configuration:
    --enable-gpl --enable-version3 --disable-w32threads --enable-av isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable- libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox r --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab -
    -enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
    --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable- libxavs --enable-libxvid --enable-decklink --enable-zlib   libavutil      52. 90.100 / 52. 90.100   libavcodec     55. 68.100 /
    55. 68.100   libavformat    55. 44.100 / 55. 44.100   libavdevice    55. 13.101 / 55. 13.101   libavfilter     4.  9.100 /  4.  9.100   libswscale      2.  6.100 /  2.  6.100   libswresample   0. 19.100 /
    0. 19.100   libpostproc    52.  3.100 / 52.  3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2.mp4':   Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf55.44.100   Duration: 00:01:24.81, start: 0.072562, bitrate: 1365 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 426x240, 1235 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 22050 Hz, stereo, fltp, 12 8 kb/s (default)
       Metadata:
         handler_name    : SoundHandler At least one output file must be specified
  • Reverse Engineering Italian Literature

    1er juillet 2014, par Multimedia Mike — Reverse Engineering

    Some time ago, Diego “Flameeyes” Pettenò tried his hand at reverse engineering a set of really old CD-ROMs containing even older Italian literature. The goal of this RE endeavor would be to extract the useful literature along with any structural metadata (chapters, etc.) and convert it to a more open format suitable for publication at, e.g., Project Gutenberg or Archive.org.

    Unfortunately, the structure of the data thwarted the more simplistic analysis attempts (like inspecting for blocks of textual data). This will require deeper RE techniques. Further frustrating the effort, however, is the fact that the binaries that implement the reading program are written for the now-archaic Windows 3.1 operating system.

    In pursuit of this RE goal, I recently thought of a way to glean more intelligence using DOSBox.

    Prior Work
    There are 6 discs in the full set (distributed along with 6 sequential issues of a print magazine named L’Espresso). Analysis of the contents of the various discs reveals that many of the files are the same on each disc. It was straightforward to identify the set of files which are unique on each disc. This set of files all end with the extension “LZn”, where n = 1..6 depending on the disc number. Further, the root directory of each disc has a file indicating the sequence number (1..6) of the CD. Obviously, these are the interesting targets.

    The LZ file extensions stand out to an individual skilled in the art of compression– could it be a variation of the venerable LZ compression ? That’s actually unlikely because LZ — also seen as LIZ — stands for Letteratura Italiana Zanichelli (Zanichelli’s Italian Literature).

    The Unix ‘file’ command was of limited utility, unable to plausibly identify any of the files.

    Progress was stalled.

    Saying Hello To An Old Frenemy
    I have been showing this screenshot to younger coworkers to see if any of them recognize it :


    DOSBox running Window 3.1

    Not a single one has seen it before. Senior computer citizen status : Confirmed.

    I recently watched an Ancient DOS Games video about Windows 3.1 games. This episode showed Windows 3.1 running under DOSBox. I had heard this was possible but that it took a little work to get running. I had a hunch that someone else had probably already done the hard stuff so I took to the BitTorrent networks and quickly found a download that had the goods ready to go– a directory of Windows 3.1 files that just had to be dropped into a DOSBox directory and they would be ready to run.

    Aside : Running OS software procured from a BitTorrent network ? Isn’t that an insane security nightmare ? I’m not too worried since it effectively runs under a sandboxed virtual machine, courtesy of DOSBox. I suppose there’s the risk of trojan’d OS software infecting binaries that eventually leave the sandbox.

    Using DOSBox Like ‘strace’
    strace is a tool available on some Unix systems, including Linux, which is able to monitor the system calls that a program makes. In reverse engineering contexts, it can be useful to monitor an opaque, binary program to see the names of the files it opens and how many bytes it reads, and from which locations. I have written examples of this before (wow, almost 10 years ago to the day ; now I feel old for the second time in this post).

    Here’s the pitch : Make DOSBox perform as strace in order to serve as a platform for reverse engineering Windows 3.1 applications. I formed a mental model about how DOSBox operates — abstracted file system classes with methods for opening and reading files — and then jumped into the source code. Sure enough, the code was exactly as I suspected and a few strategic print statements gave me the data I was looking for.

    Eventually, I even took to running DOSBox under the GNU Debugger (GDB). This hasn’t proven especially useful yet, but it has led to an absurd level of nesting :


    GDB runs DOSBox runs Windows 3.1

    The target application runs under Windows 3.1, which is running under DOSBox, which is running under GDB. This led to a crazy situation in which DOSBox had the mouse focus when a GDB breakpoint was triggered. At this point, DOSBox had all desktop input focus and couldn’t surrender it because it wasn’t running. I had no way to interact with the Linux desktop and had to reboot the computer. The next time, I took care to only use the keyboard to navigate the application and trigger the breakpoint and not allow DOSBox to consume the mouse focus.

    New Intelligence

    By instrumenting the local file class (virtual HD files) and the ISO file class (CD-ROM files), I was able to watch which programs and dynamic libraries are loaded and which data files the code cares about. I was able to narrow down the fact that the most interesting programs are called LEGGENDO.EXE (‘reading’) and LEGGENDA.EXE (‘legend’ ; this has been a great Italian lesson as well as RE puzzle). The first calls the latter, which displays this view of the data we are trying to get at :


    LIZ: Authors index

    When first run, the program takes an interest in a file called DBBIBLIO (‘database library’, I suspect) :

    === Read(’LIZ98\DBBIBLIO.LZ1’) : req 337 bytes ; read 337 bytes from pos 0x0
    === Read(’LIZ98\DBBIBLIO.LZ1’) : req 337 bytes ; read 337 bytes from pos 0x151
    === Read(’LIZ98\DBBIBLIO.LZ1’) : req 337 bytes ; read 337 bytes from pos 0x2A2
    [...]
    

    While we were unable to sort out all of the data files in our cursory investigation, a few things were obvious. The structure of this file looked to contain 336-byte records. Turns out I was off by 1– the records are actually 337 bytes each. The count of records read from disc is equal to the number of items shown in the UI.

    Next, the program is interested in a few more files :

    *** isoFile() : ’DEPOSITO\BLOKCTC.LZ1’, offset 0x27D6000, 2911488 bytes large
    === Read(’DEPOSITO\BLOKCTC.LZ1’) : req 96 bytes ; read 96 bytes from pos 0x0
    *** isoFile() : ’DEPOSITO\BLOKCTX0.LZ1’, offset 0x2A9D000, 17152 bytes large
    === Read(’DEPOSITO\BLOKCTX0.LZ1’) : req 128 bytes ; read 128 bytes from pos 0x0
    === Seek(’DEPOSITO\BLOKCTX0.LZ1’) : seek 384 (0x180) bytes, type 0
    === Read(’DEPOSITO\BLOKCTX0.LZ1’) : req 256 bytes ; read 256 bytes from pos 0x180
    === Seek(’DEPOSITO\BLOKCTC.LZ1’) : seek 1152 (0x480) bytes, type 0
    === Read(’DEPOSITO\BLOKCTC.LZ1’) : req 32 bytes ; read 32 bytes from pos 0x480
    === Read(’DEPOSITO\BLOKCTC.LZ1’) : req 1504 bytes ; read 1504 bytes from pos 0x4A0
    [...]

    Eventually, it becomes obvious that BLOKCTC has the juicy meat. There are 32-byte records followed by variable-length encoded text sections. Since there is no text to be found in these files, the text is either compressed, encrypted, or both. Some rough counting (the program seems to disable copy/paste, which thwarts more precise counting), indicates that the text size is larger than the data chunks being read from disc, so compression seems likely. Encryption isn’t out of the question (especially since the program deems it necessary to disable copy and pasting of this public domain literary data), and if it’s in use, that means the key is being read from one of these files.

    Blocked On Disassembly
    So I’m a bit blocked right now. I know exactly where the data lives, but it’s clear that I need to reverse engineer some binary code. The big problem is that I have no idea how to disassemble Windows 3.1 binaries. These are NE-type executable files. Disassemblers abound for MZ files (MS-DOS executables) and PE files (executables for Windows 95 and beyond). NE files get no respect. It’s difficult (but not impossible) to even find data about the format anymore, and details are incomplete. It should be noted, however, the DOSBox-as-strace method described here lends insight into how Windows 3.1 processes NE-type EXEs. You can’t get any more authoritative than that.

    So far, I have tried the freeware version of IDA Pro. Unfortunately, I haven’t been able to get the program to work on my Windows machine for a long time. Even if I could, I can’t find any evidence that it actually supports NE files (the free version specifically mentions MZ and PE, but does not mention NE or LE).

    I found an old copy of Borland’s beloved Turbo Assembler and Debugger package. It has Turbo Debugger for Windows, both regular and 32-bit versions. Unfortunately, the normal version just hangs Windows 3.1 in DOSBox. The 32-bit Turbo Debugger loads just fine but can’t load the NE file.

    I’ve also wondered if DOSBox contains any advanced features for trapping program execution and disassembling. I haven’t looked too deeply into this yet.

    Future Work
    NE files seem to be the executable format that time forgot. I have a crazy brainstorm about repacking NE files as MZ executables so that they could be taken apart with an MZ disassembler. But this will take some experimenting.

    If anyone else has any ideas about ripping open these binaries, I would appreciate hearing them.

    And I guess I shouldn’t be too surprised to learn that all the literature in this corpus is already freely available and easily downloadable anyway. But you shouldn’t be too surprised if that doesn’t discourage me from trying to crack the format that’s keeping this particular copy of the data locked up.