Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (33)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

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

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

Sur d’autres sites (5286)

  • Understanding The Dreamcast GD-ROM Layout

    24 mars 2022, par Multimedia Mike — Sega Dreamcast

    I’m finally completing something I set out to comprehend over a decade ago. I wanted to understand how data is actually laid out on a Sega Dreamcast GD-ROM drive. I’m trying to remember why I even still care. There was something about how I wanted to make sure the contents of a set of Dreamcast demo discs was archived for study.


    Lot of 9 volumes of the Official Sega Dreamcast Magazine

    I eventually figured it out. Read on, if you are interested in the technical details. Or, if you would like to examine the fruits of this effort, check out the Dreamcast demo discs that I took apart and uploaded to the Internet Archive.

    If you care to read some geeky technical details of some of the artifacts on these sampler discs, check out this followup post on Dreamcast Finds.

    Motivation
    Why do I still care about this ? Well, see the original charter of this blog above. It’s mostly about studying multimedia formats, as well as the general operation of games and their non-multimedia data formats. It’s also something that has nagged at me ever since I extracted a bunch of Dreamcast discs years ago and tried to understand why the tracks were arranged the way they were, and how I could systematically split the files out of the filesystem. This turns out not to be as easy as it might sound, even if you can get past the obstacle of getting at the raw data.

    CD/CD-ROM Refresher
    As I laid out in my Grand Unified Theory of Compact Disc, every compact disc can be viewed conceptually as a string of sectors, where each sector is 2352 bytes long. The difference among the various CD types (audio CDs, various CD-ROM types) boils down to the format of contents of the 2352-byte sectors. For an audio CD, every sector’s 2352 bytes represents 1/75 of a second of CD-quality audio samples.

    Meanwhile, there are various sector layouts for different CD-ROM modes, useful for storing computer data. This post is most interested in “mode 1/form 1”, which uses 2048 of the 2352 bytes for data, while using the remaining bytes for error detection and correction codes. A filesystem (usually ISO-9660) is overlaid on these 2048-byte sectors in order to create data structures for organizing strings of sectors into files.

    A CD has between 1 and 99 tracks. A pure CD-ROM will have a single data track. Pure audio CDs tend to have numerous audio tracks, usually 1 per song. Mixed CDs are common. For software, this usually manifests as the first track being data and containing an ISO-9660 filesystem, followed by a series of audio tracks, sometimes for in-game music. For audio CDs, there is occasionally a data track at the end of the disc with some extra media types.

    GD-ROM Refresher
    The Dreamcast used optical discs called GD-ROMs, where the GD stands for “gigadisc”. These discs were designed to hold about 1 gigabyte of data, vs. the usual 650-700MB offered by standard CD solutions, while using the same laser unit as is used for CDs. I’m not sure how it achieved this exactly. I always assumed it was some sort of “double density” sector scheme. According to Wikipedia, the drive read the disc at a slower rate which allowed it to read more data (presumably the “pits” vs. “lands” which comprise the surface of an optical disc). This might be equivalent to my theory.

    The GD-ROM discs cannot be read in a standard optical drive. It is necessary to get custom software onto the Dreamcast which will ask the optical hardware to extract the sectors and exfiltrate them off of the unit somehow. There are numerous methods for this. Alternatively, just find rips that are increasingly plentiful around the internet. However, just because you might be able to find the data for a given disc does not mean that you can easily explore the contents.

    Typical Layout Patterns
    Going back to my study of the GD-ROM track layouts, 2 clear patterns emerge :

    All of the game data is packed into track 3 :


    GD-ROM Layout Type 1

    Track 3 has data, the last track has data, and the tracks in between contain standard CD audio :


    GD-ROM Layout Type 2

    Also, the disc is always, always 100% utilized.

    Track 1 always contains an ISO-9660 filesystem and can be read by any standard CD-ROM drive. And it usually has nothing interesting. Track 3 also contains what appears to be an ISO-9660 filesystem. However, if you have a rip of the track and try to mount the image with standard tools, it will not work. In the second layout, the data follows no obvious format.

    Cracking The Filesystem Code
    I figured out quite a few years ago that in the case of the consolidated data track 3, that’s simply a standard ISO-9660 filesystem that would work fine with standard ISO-9660 reading software… if the data track were located beginning at sector 45000. The filesystem data structures contain references to absolute sector numbers. Thus, if it were possible to modify some ISO-9660 software to assume the first sector is 45000, it ought to have no trouble interpreting the data.


    ISO-9660 In A Single Track

    How about the split data track format ? Actually, it works the same way. If all the data were sitting on its original disc, track 3 would have data structures pointing to strings of contiguous sectors (extents) in the final track, and those are the files.

    To express more succinctly : track 3 contains the filesystem root structure and the directory structures, while the final track contains the actual file data. How is the filesystem always 100% full ? Track 3 gets padded out with 0-sectors until the beginning of any audio sectors.


    ISO-9660 Spread Across 2 Tracks

    Why Lay Things Out Like This ?
    Why push the data as far out on the disc as possible ? A reasonable explanation for this would be for read performance. Compact discs operate on Constant Linear Velocity (CLV), vs. Constant Angular Velocity (CAV). The implication of this is that data on the outside of the disc is read faster than data on the inside. I once profiled this characteristic in order to prove it to myself, using both PC CD drives as well as a Dreamcast. By pushing the data to the outer sectors, graphical data gets loaded into RAM faster, and full motion videos, which require a certain minimum bitrate for a good experience, have a better guarantee that playback will be smooth.

    Implications For Repacking
    Once people figured out how to boot burned CDs in the Dreamcast, they had a new problem : Squeeze as much as 1 gigabyte down to around 650 megabytes at the most. It looks like the most straightforward strategy was to simply rework the filesystem to remove the often enormous amount of empty space in track 3.

    My understanding is that another major strategy is to re-encode certain large assets. Full motion video (FMV) assets are a good target here since the prevailing FMV middleware format used on Sega Dreamcast games was Sofdec, which is basically just MPEG-1 video. There is ample opportunity to transcode these files to lower bitrate settings to squeeze some bits (and a lot of visual quality) out of them.

    Further, if you don’t really care about the audio tracks, you could just replace them with brief spurts of silence.

    Making A Tool
    So I could make a tool that would process these collections of files representing a disc. I could also adapt it for various forms that a Dreamcast rip might take (I have found at least 3 so far). I could eventually expand it to handle lots of other disc formats (you know, something like Aaru does these days). And that would have been my modus operandi perhaps 10 or more years ago. And of course, the ambitious tool would have never seen daylight as I got distracted by other ideas.

    I wanted to get a solution up and running as quickly as possible this time. Here was my initial brainstorm : assemble all the tracks into a single, large disc while pretending the audio tracks consist of 2048-byte sectors. In doing so, I ought to be able to use fuseiso to mount the giant image, with a modification to look for the starting sector at a somewhat nonstandard location.

    To achieve the first part I wrote a quick Python script that processed the contents of a GDI file, which was stored alongside the ISO (data) and RAW (audio) track track rips from when I extracted the disc. The GDI is a very matter-of-fact listing of the tracks and their properties, e.g. :

    5
    1 0 4 2048 track01.iso 0
    2 721 0 2352 track02.raw 0
    3 45000 4 2048 track03.iso 0
    4 338449 0 2352 track04.raw 0
    5 349096 4 2048 track05.iso 0
    

    track number / starting sector / track type (4=data, 0=audio) / bytes per sector / filename / ??

    The script skips the first 2 filenames, instead writing 45000 zero sectors in order to simulate the CD-compatible area. Then, for each file, if it’s an ISO, append the data to the final data file ; if it’s audio, compute the number of sectors occupied, and then append that number of 2048-byte zero sectors to the final data file.

    Finally, to interpret the filesystem, I used an old tool that I’ve relied upon for a long time– fuseiso. This is a program that leverages Filesystem in Userspace (FUSE) to mount ISO-9660 filesystems as part of the local filesystem, without needing root privileges. The original source hasn’t been updated for 15 years, but I found a repo that attempts to modernize it slightly. I forked a version which fixes a few build issues.

    Anyway, I just had to update a table to ask it to start looking for the root ISO-9660 filesystem at a different location than normal. Suddenly, after so many years, I was able to freely browse a GD-ROM filesystem directly under Linux !

    Conclusion And Next Steps
    I had to hack the fuseiso3 tool a bit in order to make this work. I don’t think it’s especially valuable to make sure anyone can run with the same modifications since the tool assumes that a GD-ROM rip has been processed through the exact pipeline I described above.

    I have uploaded all of the North American Dreamcast demo discs to archive.org. See this post for a more granular breakdown of what this entails. In the course of this exercise, I also found some European demo discs that could use the same extraction.

    What else ? Should I perform the same extraction experiment for all known Dreamcast games ? Would anyone care ? Maybe if there’s a demand for it.

    Here is a followup on the interesting and weird things I have found on these discs so far.

    The post Understanding The Dreamcast GD-ROM Layout first appeared on Breaking Eggs And Making Omelettes.

  • ALSA buffer xrun induced by low quality source in ffmpeg capture

    8 janvier 2021, par Peter Becich

    I am attempting to transfer some old Video 8 tapes to my computer, though an EasyCap USB stick and the motherboard's sound line-in, on Ubuntu. I believe the arguments are correctly laid out below to capture from two independent streams, and encode them both into the output MP4 file.

    



    Edit :

    



    I can simplify the question a bit, now.

    



    ALSA buffer overrun (or underrun ?) is induced by the unreliable/noisy audio source. For instance, if ffmpeg captures the beginning of tape playback, this causes "buffer xrun" far beyond when the tape gets up to speed and playback should be normal.

    



    It is interesting that the bitrate shown in the ffmpeg log shoots up higher than normal when it's producing a garbage output ! (Is this bitrate a sum of of audio and video bitrates ?)

    



    I've tried a couple of audio encoding codecs, and had the same problem.

    



    Using libfdk_aac :

    



      Metadata:
    encoder         : Lavf56.15.102
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv422p, 640x480, q=-1--1, 29.97 fps, 11988 tbn, 29.97 tbc
    Metadata:
      encoder         : Lavc56.13.100 libx264
    Stream #0:1: Audio: aac (libfdk_aac) ([64][0][0][0] / 0x0040), 48000 Hz, mono, s16, 128 kb/s
    Metadata:
      encoder         : Lavc56.13.100 libfdk_aac
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
  Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (libfdk_aac))
[alsa @ 0x22038a0] ALSA buffer xrun.  0kB time=00:00:00.00 bitrate=N/A    
[alsa @ 0x22038a0] ALSA buffer xrun.1934kB time=00:00:02.76 bitrate=5723.5kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.4795kB time=00:00:05.49 bitrate=7150.1kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.7668kB time=00:00:08.21 bitrate=7646.1kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.1475kB time=00:00:10.94 bitrate=8588.9kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.3822kB time=00:00:13.66 bitrate=8289.0kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.5388kB time=00:00:16.38 bitrate=7695.0kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.6896kB time=00:00:19.10 bitrate=7244.0kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.8980kB time=00:00:21.84 bitrate=7118.8kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.2032kB time=00:00:24.55 bitrate=7349.3kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.4612kB time=00:00:27.27 bitrate=7391.1kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.6660kB time=00:00:29.98 bitrate=7284.6kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.9123kB time=00:00:32.68 bitrate=7299.3kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.0641kB time=00:00:35.39 bitrate=7091.7kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.2601kB time=00:00:38.13 bitrate=7002.6kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.5828kB time=00:00:40.87 bitrate=7181.0kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.8481kB time=00:00:43.60 bitrate=7229.9kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.1461kB time=00:00:46.34 bitrate=7328.0kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.3982kB time=00:00:49.06 bitrate=7342.7kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.6565kB time=00:00:51.77 bitrate=7367.8kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.9718kB time=00:00:54.51 bitrate=7471.3kbits/s    
[alsa @ 0x22038a0] ALSA buffer xrun.2341kB time=00:00:57.25 bitrate=7489.2kbits/s    
^Cframe= 1760 fps= 29 q=-1.0 Lsize=   53946kB time=00:01:00.04 bitrate=7360.3kbits/s    
video:53880kB audio:53kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.022994%
[libx264 @ 0x2217ac0] frame I:8     Avg QP:24.00  size: 55686
[libx264 @ 0x2217ac0] frame P:1752  Avg QP:27.66  size: 31237
[libx264 @ 0x2217ac0] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0x2217ac0] mb P  I16..4: 15.0%  0.0%  0.0%  P16..4: 80.2%  0.0%  0.0%  0.0%  0.0%    skip: 4.8%
[libx264 @ 0x2217ac0] coded y,uvDC,uvAC intra: 45.3% 86.6% 59.4% inter: 65.7% 81.3% 11.5%
[libx264 @ 0x2217ac0] i16 v,h,dc,p: 40% 25% 26%  9%
[libx264 @ 0x2217ac0] i8c dc,h,v,p: 45% 24% 19% 12%
[libx264 @ 0x2217ac0] kb/s:7516.07
Received signal 2: terminating.


    



    Using libvorbis :

    



      Metadata:
    encoder         : Lavf56.15.102
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv422p, 640x480, q=-1--1, 29.97 fps, 11988 tbn, 29.97 tbc
    Metadata:
      encoder         : Lavc56.13.100 libx264
    Stream #0:1: Audio: vorbis (libvorbis) ([221][0][0][0] / 0x00DD), 48000 Hz, mono, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc56.13.100 libvorbis
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
  Stream #1:0 -> #0:1 (pcm_s16le (native) -> vorbis (libvorbis))
[alsa @ 0x1a948a0] ALSA buffer xrun.  0kB time=00:00:00.00 bitrate=N/A    
[alsa @ 0x1a948a0] ALSA buffer xrun. 402kB time=00:00:04.37 bitrate= 752.3kbits/s    
[alsa @ 0x1a948a0] ALSA buffer xrun.4122kB time=00:00:08.80 bitrate=3833.0kbits/s    
[alsa @ 0x1a948a0] ALSA buffer xrun.8722kB time=00:00:13.14 bitrate=5436.3kbits/s    
[alsa @ 0x1a948a0] ALSA buffer xrun.3903kB time=00:00:17.51 bitrate=6502.2kbits/s    
[alsa @ 0x1a948a0] ALSA buffer xrun.6625kB time=00:00:21.89 bitrate=6221.4kbits/s    
[alsa @ 0x1a948a0] ALSA buffer xrun.9548kB time=00:00:26.28 bitrate=6092.5kbits/s    
^Cframe=  851 fps= 26 q=-1.0 Lsize=   22018kB time=00:00:30.69 bitrate=5875.3kbits/s    
video:21996kB audio:12kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: 0.044897%
[libx264 @ 0x1aa8ac0] frame I:4     Avg QP:23.50  size: 62405
[libx264 @ 0x1aa8ac0] frame P:847   Avg QP:25.58  size: 26297
[libx264 @ 0x1aa8ac0] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0x1aa8ac0] mb P  I16..4: 13.2%  0.0%  0.0%  P16..4: 72.0%  0.0%  0.0%  0.0%  0.0%    skip:14.8%
[libx264 @ 0x1aa8ac0] coded y,uvDC,uvAC intra: 40.6% 81.0% 58.6% inter: 58.8% 72.7% 8.6%
[libx264 @ 0x1aa8ac0] i16 v,h,dc,p: 41% 28% 22%  9%
[libx264 @ 0x1aa8ac0] i8c dc,h,v,p: 54% 19% 16% 11%
[libx264 @ 0x1aa8ac0] kb/s:6345.60
Received signal 2: terminating.


    




    



    ffmpeg's detection of the ALSA stream is seemingly goofed up by the inconsistencies of the tape. In the failure case, only short blips of the tapes audio exist in the output MP4. The audio bitrate of the output file is less than 10 kbps, averaged out across the whole file. The output video seems to be fine, even though the low frames-per-second in the failure case log below.

    



    The audio and video streams can be captured fine for short amounts of time before a source error occurs ; this provides the success case log. The failure case log was created by intentionally making an error in the source streams — turning on the camera makes a brief noisy signal.

    



    Is there a setting that needs to be forced to keep ffmpeg recording the audio stream, even when the tape is blank or noisy ?

    



    Could it be that the libfdk_aac audio encoder is tripped up by the low quality source ?

    



    The relevant line ; rawvideo stream is piped to this in script at bottom :

    



    ffmpeg -pixel_format uyvy422 -s:v 720x480 -framerate 29.97 -f rawvideo \
-i $PIPE  -f alsa -i hw:0,0 -vf scale=w=720:h=540 -vcodec libx264 \
-preset ultrafast -shortest -c:a libfdk_aac -b:a 128k -af pan=1:c0=c0  \
-ar 96000 $OUTFILE


    



    The ar argument was one attempt to force recording.

    



    ffmpeg log file for (short-lived) success ; high frames-per-second captured :

    



    ffmpeg version 2.5.3 Copyright (c) 2000-2015 the FFmpeg developers
  built on Jan 11 2015 17:53:45 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libpulse --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvo-aacenc --enable-libvidstab
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.102 / 56. 15.102
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, rawvideo, from '/tmp/somagic-pipe':
  Duration: N/A, start: 0.000000, bitrate: 165722 kb/s
    Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 720x480, 165722 kb/s, 29.97 tbr, 29.97 tbn, 29.97 tbc
Home directory not accessible: Permission denied
Guessed Channel Layout for  Input Stream #1.0 : stereo
Input #1, alsa, from 'hw:0,0':
  Duration: N/A, start: 1423202268.577088, bitrate: 1536 kb/s
    Stream #1:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[Parsed_pan_0 @ 0x3335d60] This syntax is deprecated. Use '|' to separate the list items.
Single channel layout '1' is interpreted as a number of channels, switch to the syntax '1c' otherwise it will be interpreted as a channel layout number in a later version
[Parsed_pan_0 @ 0x3335d60] Pure channel mapping detected: 0
[libx264 @ 0x3364bc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
[libx264 @ 0x3364bc0] profile High 4:2:2, level 3.1, 4:2:2 8-bit
[libx264 @ 0x3364bc0] 264 - core 142 r2389 956c8d8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 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=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to '/home/peterbecich/easycap/Videos/fpv_video_02_05_2015_21_57_48.mp4':
  Metadata:
    encoder         : Lavf56.15.102
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv422p, 720x540, q=-1--1, 29.97 fps, 11988 tbn, 29.97 tbc
    Metadata:
      encoder         : Lavc56.13.100 libx264
    Stream #0:1: Audio: aac (libfdk_aac) ([64][0][0][0] / 0x0040), 96000 Hz, mono, s16, 128 kb/s
    Metadata:
      encoder         : Lavc56.13.100 libfdk_aac
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
  Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
frame=   13 fps=0.0 q=26.0 size=     187kB time=00:00:00.30 bitrate=5102.7kbits/s    
frame=   29 fps= 29 q=26.0 size=     469kB time=00:00:00.83 bitrate=4607.6kbits/s    
frame=   44 fps= 29 q=26.0 size=     755kB time=00:00:01.33 bitrate=4635.2kbits/s    
frame=   59 fps= 29 q=26.0 size=    1024kB time=00:00:01.83 bitrate=4572.1kbits/s    
frame=   74 fps= 29 q=26.0 size=    1279kB time=00:00:02.33 bitrate=4486.5kbits/s    
frame=   89 fps= 29 q=26.0 size=    1516kB time=00:00:02.83 bitrate=4378.0kbits/s    
frame=  104 fps= 29 q=26.0 size=    1752kB time=00:00:03.33 bitrate=4301.0kbits/s    
frame=  119 fps= 29 q=26.0 size=    1991kB time=00:00:03.83 bitrate=4251.1kbits/s    
frame=  135 fps= 30 q=26.0 size=    2245kB time=00:00:04.37 bitrate=4207.5kbits/s    
frame=  150 fps= 30 q=26.0 size=    2524kB time=00:00:04.87 bitrate=4245.0kbits/s    
frame=  165 fps= 30 q=26.0 size=    2808kB time=00:00:05.37 bitrate=4282.0kbits/s    
frame=  180 fps= 30 q=26.0 size=    3091kB time=00:00:05.87 bitrate=4311.5kbits/s    
[rawvideo @ 0x3350640] Invalid buffer size, packet size 65536 < expected frame_size 691200
Error while decoding stream #0:0: Invalid argument
frame=  183 fps= 29 q=-1.0 Lsize=    3247kB time=00:00:06.11 bitrate=4351.5kbits/s    
video:3142kB audio:96kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.254788%
[libx264 @ 0x3364bc0] frame I:1     Avg QP:20.00  size:  2289
[libx264 @ 0x3364bc0] frame P:182   Avg QP:25.99  size: 17664
[libx264 @ 0x3364bc0] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0x3364bc0] mb P  I16..4: 78.5%  0.0%  0.0%  P16..4: 20.2%  0.0%  0.0%  0.0%  0.0%    skip: 1.4%
[libx264 @ 0x3364bc0] coded y,uvDC,uvAC intra: 84.1% 71.5% 18.9% inter: 51.9% 63.5% 0.4%
[libx264 @ 0x3364bc0] i16 v,h,dc,p: 15%  8% 69%  8%
[libx264 @ 0x3364bc0] i8c dc,h,v,p: 50% 19% 24%  7%
[libx264 @ 0x3364bc0] kb/s:4215.02


    



    ffmpeg log for failure ; low FPS captured :

    



    ffmpeg version 2.5.3 Copyright (c) 2000-2015 the FFmpeg developers
  built on Jan 11 2015 17:53:45 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libpulse --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvo-aacenc --enable-libvidstab
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.102 / 56. 15.102
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, rawvideo, from '/tmp/somagic-pipe':
  Duration: N/A, start: 0.000000, bitrate: 165722 kb/s
    Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 720x480, 165722 kb/s, 29.97 tbr, 29.97 tbn, 29.97 tbc
Home directory not accessible: Permission denied
Guessed Channel Layout for  Input Stream #1.0 : stereo
Input #1, alsa, from 'hw:0,0':
  Duration: N/A, start: 1423201999.226455, bitrate: 1536 kb/s
    Stream #1:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[Parsed_pan_0 @ 0x21cad60] This syntax is deprecated. Use '|' to separate the list items.
Single channel layout '1' is interpreted as a number of channels, switch to the syntax '1c' otherwise it will be interpreted as a channel layout number in a later version
[Parsed_pan_0 @ 0x21cad60] Pure channel mapping detected: 0
[libx264 @ 0x21f9bc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
[libx264 @ 0x21f9bc0] profile High 4:2:2, level 3.1, 4:2:2 8-bit
[libx264 @ 0x21f9bc0] 264 - core 142 r2389 956c8d8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 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=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to '/home/peterbecich/easycap/Videos/fpv_video_02_05_2015_21_53_18.mp4':
  Metadata:
    encoder         : Lavf56.15.102
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv422p, 720x540, q=-1--1, 29.97 fps, 11988 tbn, 29.97 tbc
    Metadata:
      encoder         : Lavc56.13.100 libx264
    Stream #0:1: Audio: aac (libfdk_aac) ([64][0][0][0] / 0x0040), 96000 Hz, mono, s16, 128 kb/s
    Metadata:
      encoder         : Lavc56.13.100 libfdk_aac
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
  Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
frame=    1 fps=1.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
frame=    1 fps=0.7 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
frame=    1 fps=0.5 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
frame=    1 fps=0.4 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
frame=    1 fps=0.3 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
frame=    1 fps=0.3 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
frame=    1 fps=0.2 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
frame=    1 fps=0.2 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
frame=    1 fps=0.2 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
frame=    1 fps=0.2 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
[alsa @ 0x21e5ac0] ALSA buffer xrun.
frame=    8 fps=1.3 q=19.0 size=      12kB time=00:00:06.03 bitrate=  15.9kbits/s    
frame=   23 fps=3.5 q=18.0 size=      12kB time=00:00:06.03 bitrate=  16.4kbits/s    
frame=   38 fps=5.4 q=18.0 size=      12kB time=00:00:06.03 bitrate=  16.7kbits/s    
frame=   53 fps=7.0 q=18.0 size=      12kB time=00:00:06.03 bitrate=  16.9kbits/s    
frame=   68 fps=8.4 q=26.0 size=     146kB time=00:00:06.03 bitrate= 198.8kbits/s    
frame=   83 fps=9.7 q=26.0 size=     375kB time=00:00:06.03 bitrate= 510.0kbits/s    
frame=   98 fps= 11 q=26.0 size=     608kB time=00:00:06.03 bitrate= 826.5kbits/s    
frame=  114 fps= 12 q=26.0 size=     875kB time=00:00:06.03 bitrate=1189.1kbits/s    
frame=  128 fps= 13 q=26.0 size=    1091kB time=00:00:06.03 bitrate=1481.6kbits/s    
frame=  144 fps= 14 q=26.0 size=    1339kB time=00:00:06.03 bitrate=1819.2kbits/s    
frame=  159 fps= 14 q=26.0 size=    1571kB time=00:00:06.03 bitrate=2134.6kbits/s    
frame=  174 fps= 15 q=26.0 size=    1796kB time=00:00:06.03 bitrate=2440.1kbits/s    
[alsa @ 0x21e5ac0] ALSA buffer xrun.
frame=  189 fps= 16 q=26.0 size=    2015kB time=00:00:12.04 bitrate=1370.4kbits/s    
frame=  204 fps= 16 q=26.0 size=    2238kB time=00:00:12.04 bitrate=1522.3kbits/s    
frame=  219 fps= 17 q=26.0 size=    2490kB time=00:00:12.04 bitrate=1694.2kbits/s    
frame=  235 fps= 17 q=26.0 size=    2728kB time=00:00:12.04 bitrate=1855.8kbits/s    
frame=  250 fps= 18 q=26.0 size=    2973kB time=00:00:12.04 bitrate=2022.4kbits/s    
[rawvideo @ 0x21e5640] Invalid buffer size, packet size 65536 < expected frame_size 691200
Error while decoding stream #0:0: Invalid argument
frame=  261 fps= 18 q=-1.0 Lsize=    3269kB time=00:00:12.06 bitrate=2220.1kbits/s    
video:3263kB audio:4kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.081101%
[libx264 @ 0x21f9bc0] frame I:2     Avg QP:21.50  size: 21342
[libx264 @ 0x21f9bc0] frame P:259   Avg QP:24.22  size: 12734
[libx264 @ 0x21f9bc0] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0x21f9bc0] mb P  I16..4: 62.8%  0.0%  0.0%  P16..4: 14.2%  0.0%  0.0%  0.0%  0.0%    skip:22.9%
[libx264 @ 0x21f9bc0] coded y,uvDC,uvAC intra: 77.7% 61.2% 14.1% inter: 19.7% 24.8% 1.6%
[libx264 @ 0x21f9bc0] i16 v,h,dc,p: 17% 10% 65%  8%
[libx264 @ 0x21f9bc0] i8c dc,h,v,p: 52% 18% 24%  6%
[libx264 @ 0x21f9bc0] kb/s:3068.90


    



    The whole script :

    



    #!/bin/sh

PIPE=/tmp/somagic-pipe
OUTFILEDIR=~/easycap/Videos/
LOGDIR=~/.somagic-log/
NOW=`date +"%m_%d_%Y_%H_%M_%S"`

OUTFILE=${OUTFILEDIR}fpv_video_${NOW}.mp4

mkdir $LOGDIR

FFMPEG_LOG=${LOGDIR}ffmpeg.log
SOMAGIC_LOG=${LOGDIR}somagic.log
MPLAYER_LOG=${LOGDIR}mplayer.log

rm $PIPE >/dev/null 2>&1
rm $OUTFILE >/dev/null 2>&1

rm $FFMPEG_LOG
rm $SOMAGIC_LOG
rm $MPLAYER_LOG

mkfifo $PIPE >/dev/null 2>&1

ffmpeg -pixel_format uyvy422 -s:v 720x480 -framerate 29.97 -f rawvideo \
-i $PIPE  -f alsa -i hw:0,0 -vf scale=w=720:h=540 -vcodec libx264 \
-preset ultrafast -shortest -c:a libfdk_aac -b:a 128k -af pan=1:c0=c0  \
-ar 96000 $OUTFILE > $FFMPEG_LOG 2>&1 &

somagic-capture --ntsc -c --luminance=2 --lum-aperture=3 2> $SOMAGIC_LOG \
| tee $PIPE | \
mplayer -vf yadif,screenshot -demuxer rawvideo -rawvideo \
"ntsc:format=uyvy:fps=30000/1001" -aspect 4:3 - 2> $MPLAYER_LOG


rm $PIPE >/dev/null 2>&1 


    



    Modified from here : https://gist.github.com/Brick85/0b327ac2d3d45e23ed33

    


  • Data Privacy Day 2020

    27 janvier 2020, par Matthieu Aubry — Privacy

    It’s January 28th which means it’s Data Privacy Day !

    Today is an important day for the Matomo team as we reflect on our mission and our goals for 2020. This year I wanted to send a video message to all Matomo users, community members and customers. 

    Check it out (full transcript below)

    A video message from Matomo founder, Matthieu Aubry

    Privacy-friendly alternatives

    Video transcript

    Hey everyone,

    Matthieu here, Founder of Matomo.

    Today is one of the most significant days of the year for the Matomo team – it’s Data Privacy Day. And so I wanted to quickly reflect on our mission and the significance of this day. 

    In today’s busy online world where data is king, this day is an important reminder of being vigilant in protecting our personal information online.

    Matomo began 12 years ago as an open-source alternative to Google Analytics – the goal was, and still is to give full control of data back to users. 

    In 2020, we are determined to see through this commitment. We will keep building a powerful and ethical web analytics platform that focuses on privacy protection, data ownership, and provides value to all Matomo users and customers.

    And what’s fantastic is to see the rise of other quality software companies offering privacy-friendly alternatives for web browsers, search engines, file sharing, email providers, all with a similar mission. And with these products now widely available, we encourage you to take back control of all your online activities and begin this new decade with a resolution to stay safe online.

    I’ll provide you with some links below the video to check out these privacy-friendly alternatives. If you have a website and want to gain valuable insights on the visitors while owning your data, join us ! 

    Matomo Analytics On-Premise is and always will be free to download and install on your own servers and on your own terms.

    Also feel free to join our active community or spread the word to your friends and network about the importance of data privacy.

    Thank you all and wishing you a great 2020 !

    For more information on how Matomo protects the privacy of your users, visit : https://matomo.org/privacy/

    Do you have privacy concerns ?

    What better day than today to speak up ! What privacy concerns have you experienced ?