Recherche avancée

Médias (0)

Mot : - Tags -/inscription3

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (38)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP 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 (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (4374)

  • Dreamcast Serial Extractor

    31 décembre 2017, par Multimedia Mike — Sega Dreamcast

    It has not been a very productive year for blogging. But I started the year by describing an unfinished project that I developed for the Sega Dreamcast, so I may as well end the year the same way. The previous project was a media player. That initiative actually met with some amount of success and could have developed into something interesting if I had kept at it.

    By contrast, this post describes an effort that was ultimately a fool’s errand that I spent way too much time trying to make work.

    Problem Statement
    In my neverending quest to analyze the structure of video games while also hoarding a massive collection of them (though I’m proud to report that I did play at least a few of them this past year), I wanted to be able to extract the data from my many Dreamcast titles, both games and demo discs. I had a tool called the DC Coder’s Cable, a serial cable that enables communication between a Dreamcast and a PC. With the right software, you could dump an entire Dreamcast GD-ROM, which contained a gigabyte worth of sectors.

    Problem : The dumping software (named ‘dreamrip’ and written by noted game hacker BERO) operated in a very basic mode, methodically dumping sector after sector and sending it down the serial cable. This meant that it took about 28 hours to extract all the data on a single disc by running at the maximum speed of 115,200 bits/second, or about 11 kilobytes/second. I wanted to create a faster method.

    The Pitch
    I formed a mental model of dreamrip’s operation that looked like this :



    As an improvement, I envisioned this beautiful architecture :



    Architectural Assumptions
    My proposed architecture was predicated on the assumption that the disc reading and serial output functions were both I/O-bound operations and that the CPU would be idle much of the time. My big idea was to use that presumably idle CPU time to compress the sectors before sending them over the wire. As long as the CPU can compress the data faster than 11 kbytes/sec, it should be a win. In order to achieve this, I broke the main program into 3 threads :

    1. The first thread reads the sectors ; more specifically, it asks the drive firmware to please read the sectors and make the data available in system RAM
    2. The second thread waits for sector data to appear in memory and then compresses it
    3. The third thread takes the compressed data when it is ready and shuffles it out through the serial cable

    Simple and elegant, right ?

    For data track compression, I wanted to start with zlib in order to prove the architecture, but then also try bzip2 or lzma. As long as they could compress data faster than the serial port could write it, then it should be a win. For audio track compression, I wanted to use the Flake FLAC encoder. According to my notes, I did get both bzip2 compression and the Flake compressor working on the Dreamcast. I recall choosing Flake over the official FLAC encoder because it was much simpler and had fewer dependencies, always an important consideration for platforms such as this.

    Problems
    I worked for quite awhile on this project. I have a lot of notes recorded but a lot of the problems I had remain a bit vague in my memory. However, there was one problem I discovered that eventually sunk the entire initiative :

    The serial output operation is CPU-bound.

    My initial mental model was that the a buffer could be “handed off” to the serial subsystem and the CPU could go back to doing other work. Nope. Turns out that the CPU was participating at every step of the serial transfer.

    Further, I eventually dug into the serial driver code and learned that there was already some compression taking place via the miniLZO library.

    Lessons Learned

    • Recognize the assumptions that you’re making up front at the start of the project.
    • Prototype in order to ensure plausibility
    • Profile to make sure you’re optimizing the right thing (this is something I have learned again and again).

    Another interesting tidbit from my notes : it doesn’t matter how many sectors you read at a time, the overall speed is roughly the same. I endeavored to read 1000 2048-byte data sectors, 1 or 10 or 100 at a time, or all 1000 at once. My results :

    • 1 : 19442 ms
    • 10 : 19207 ms
    • 100 : 19194 ms
    • 1000 : 19320 ms

    No difference. That surprised me.

    Side Benefits
    At one point, I needed to understand how BERO’s dreamrip software was operating. I knew I used to have the source code but I could no longer find it. Instead, I decided to try to reverse engineer what I needed from the SH-4 binary image that I had. It wasn’t an ELF image ; rather, it was a raw binary meant to be loaded at a particular memory location which makes it extra challenging for ‘objdump’. This led to me asking my most viewed and upvoted question on Stack Overflow : “Disassembling A Flat Binary File Using objdump”. The next day, it also led me to post one of my most upvoted answers when I found the solution elsewhere.

    Strangely, I have since tried out the command line shown in my answer and have been unable to make it work. But people keep upvoting both the question and the answer.

    Eventually this all became moot when I discovered a misplaced copy of the source code on one of my computers.

    I strongly recall binging through the Alias TV show while I was slogging away on this project, so I guess that’s a positive association since I got so many fun screenshots out of it.

    The Final Resolution
    Strangely, I was still determined to make this project work even though the Dreamcast SD adapter arrived for me about halfway through the effort. Part of this was just stubbornness, but part of it was my assumptions about serial port speeds, in particular, my assumption that there was a certain speed-of-light type of limitation on serial port speeds so that the SD adapter, operating over the DC’s serial port, would not be appreciably faster than the serial cable.

    This turned out to be very incorrect. In fact, the SD adapter is capable of extracting an entire gigabyte disc image in 35-40 minutes. This is the method I have since been using to extract Dreamcast disc images.

    The post Dreamcast Serial Extractor first appeared on Breaking Eggs And Making Omelettes.

  • ffmpeg and pulse audio creating buzzy speech

    17 juin 2017, par flashape

    I’m attempting to record video and audio from an ec2 instance (Ubuntu 16.04), using xvfb and pulse audio. Everything works fine, except that the output file contains "buzzy" speech (not sure if this is what "clipping" is ?). This happens using either aac or mp3 audio codecs.

    Sample audio file : http://s000.tinyupload.com/index.php?file_id=86237391396073526211

    ffmpeg command :

    ffmpeg \
    -f x11grab -framerate 30 -video_size ${SCREEN_WIDTH}x${SCREEN_HEIGHT} -i :1.0 \
    -f pulse -i default \
    -c:v libx264 -preset veryfast -maxrate 2500k -bufsize 2500k -vf "format=yuv420p" -g 60 \
    -c:a aac -strict -2 -channel_layout stereo  -ab 256k -ar 48000 -bufsize 512k -ac 2  \
    -flags +global_header -f flv "test.mp4"

    The output from ffmpeg when I run the command :

    Input #0, x11grab, from ':1.0':
     Duration: N/A, start: 1497567394.762052, bitrate: N/A
       Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1360x764, 30 fps, 30 tbr, 1000k tbn, 30 tbc
    Guessed Channel Layout for  Input Stream #1.0 : stereo
    Input #1, pulse, from 'default':
     Duration: N/A, start: 1497567396.743667, bitrate: 1536 kb/s
       Stream #1:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
    [libx264 @ 0x1977d20] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 0x1977d20] profile High, level 3.2
    [libx264 @ 0x1977d20] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=60 keyint_min=6 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=2500 vbv_bufsize=512 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
    Output #0, flv, to 'test.mp4':
     Metadata:
       encoder         : Lavf56.40.101
       Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 1360x764, q=-1--1, max. 2500 kb/s, 30 fps, 1k tbn, 30 tbc
       Metadata:
         encoder         : Lavc56.60.100 libx264
       Stream #0:1: Audio: aac ([10][0][0][0] / 0x000A), 48000 Hz, stereo, fltp, 256 kb/s
       Metadata:
         encoder         : Lavc56.60.100 aac
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
     Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native))

    Based on various posts, I thought it might be something in the pulse config, particularly the "resample-method" setting, but that doesn’t appear to do anything. Here is how the /etc/pulse/daemon.conf config file currently stands :

    ; daemonize = no
    ; fail = yes
    ; allow-module-loading = yes
    ; allow-exit = yes
    ; use-pid-file = yes
    ; system-instance = no
    ; local-server-type = user
    ; enable-shm = yes
    ; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
    ; lock-memory = no
    ; cpu-limit = no

    ; high-priority = yes
    ; nice-level = -11

    ; realtime-scheduling = yes
    ; realtime-priority = 5

    ; exit-idle-time = 20
    ; scache-idle-time = 20

    ; dl-search-path = (depends on architecture)

    ; load-default-script-file = yes
    ; default-script-file = /etc/pulse/default.pa

    ; log-target = auto
    ; log-level = notice
    ; log-meta = no
    ; log-time = no
    ; log-backtrace = 0

    ; resample-method = speex-float-1
    ; resample-method = speex-float-10
    resample-method = speex-fixed-10
    ; enable-remixing = yes
    enable-lfe-remixing = yes
    ; lfe-crossover-freq = 120

    flat-volumes = no

    ; rlimit-fsize = -1
    ; rlimit-data = -1
    ; rlimit-stack = -1
    ; rlimit-core = -1
    ; rlimit-as = -1
    ; rlimit-rss = -1
    ; rlimit-nproc = -1
    ; rlimit-nofile = 256
    ; rlimit-memlock = -1
    ; rlimit-locks = -1
    ; rlimit-sigpending = -1
    ; rlimit-msgqueue = -1
    ; rlimit-nice = 31
    ; rlimit-rtprio = 9
    ; rlimit-rttime = 200000

    ; default-sample-format = s16le
    default-sample-format = s32le
    default-sample-rate = 44100
    ; default-sample-rate = 48000
    ; alternate-sample-rate = 48000
    alternate-sample-rate = 44100
    ; default-sample-channels = 2
    ; default-channel-map = front-left,front-right

    ; default-fragments = 4
    ; default-fragment-size-msec = 25
    ; default-fragments = 4
    ; default-fragment-size-msec = 25


    ; enable-deferred-volume = yes
    deferred-volume-safety-margin-usec = 1
    ; deferred-volume-extra-delay-usec = 0

    Edit :

    Ok, updated the ffmpeg command to capture only the audio, but still have the same issue :

    ffmpeg \
    -f pulse -i default \
    -c:a aac -strict -2 -channel_layout stereo  -ab 256k -ar 48000 -bufsize 512k -ac 2  \
    test.aac

    I do get some interesting messages in the output about timestamps being off :

    [aac @ 0x12a4900] Queue input is backward in timeits/s
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 182857 >= 175924
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 182857 >= 176948
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 182857 >= 177972
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 182857 >= 178996
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 182857 >= 180020
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 182857 >= 181044
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 182857 >= 182068
    [aac @ 0x12a4900] Queue input is backward in time
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 183406
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 184430
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 185454
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 186478
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 187502
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 188526
    [aac @ 0x12a4900] Queue input is backward in time
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 189550
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 190574
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 169622
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 170646
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 171670
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 172694
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 173718
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 174742
    [aac @ 0x12a4900] Queue input is backward in time
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 175766
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 176790
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 157020
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 158083
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 159107
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 160131
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 161155
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 162179
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 163203
    [aac @ 0x12a4900] Queue input is backward in time
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 164227
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 165251
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 154697
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 159400
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 160424
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 161448
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 162472
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 163496
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 164520
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 165544
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 166568
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 171795
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 172819
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 173843
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 174867
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 175891
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 176915
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 177939
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 178963
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 187279
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 189829
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 190853
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 191877
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 193354 >= 192901
    [aac @ 0x12a4900] Queue input is backward in time
       Last message repeated 2 times
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 216609 >= 216172
    [aac @ 0x12a4900] Queue input is backward in time
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 216609 >= 214950
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 216609 >= 214933
    [adts @ 0x12a35a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 216609 >= 214836
  • Evolution #2006 : Intégration des types de documents xml d’Office 2010

    8 mars 2011, par cedric -