
Recherche avancée
Autres articles (53)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans 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 (...) -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
Encodage et transformation en formats lisibles sur Internet
10 avril 2011MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)
Sur d’autres sites (7257)
-
Capture with no dropped frames ?
21 juillet 2020, par ENunnCapping some video through my capture card and I'm getting dropped frames. Is there anything I can do to avoid getting any ?




Script :


ffmpeg -f dshow -rtbufsize 2145M -framerate 59.94 -threads 4 -i video="Game Capture HD60 S (Video) (#01)":audio="Game Capture HD60 S (Audio) (#01)" -r 59.94 -vsync 2 -pix_fmt yuv422p -c:v mpeg2video -q:v 0 -b:v 200M -minrate 60M -maxrate 200M -c:a pcm_s16le -f segment -segment_time 9999999999 -strftime 1 "output\%%Y-%%m-%%d_%%H-%%M-%%S.mkv"


-
More Cinepak Madness
20 octobre 2011, par Multimedia Mike — Codec TechnologyFellow digital archaeologist Clone2727 found a possible fifth variant of the Cinepak video codec. He asked me if I cared to investigate the sample. I assured him I wouldn’t be able to die a happy multimedia nerd unless I have cataloged all possible Cinepak variants known to exist in the wild. I’m sure there are chemistry nerds out there who are ecstatic when another element is added to the periodic table. Well, that’s me, except with weird multimedia formats.
Background
Cinepak is a video codec that saw widespread use in the early days of digital multimedia. To date, we have cataloged 4 variants of Cinepak in the wild. This distinction is useful when trying to write and maintain an all-in-one decoder. The variants are :- The standard type : Most Cinepak data falls into this category. It decodes to a modified/simplified YUV 4:2:0 planar colorspace and is often seen in AVI and QuickTime/MOV files.
- 8-bit greyscale : Essentially the same as the standard type but with only a Y plane. This has only been identified in AVI files and is distinguished by the file header’s video bits/pixel field being set to 8 instead of 24.
- 8-bit paletted : Again, this is identified by the video header specifying 8 bits/pixel for a Cinepak stream. There is essentially only a Y plane in the data, however, each 8-bit value is a palette index. The palette is transported along with the video header. To date, only one known sample of this format has even been spotted in the wild, and it’s classified as NSFW. It is also a QuickTime/MOV file.
- Sega/FILM CPK data : Sega Saturn games often used CPK files which stored a variant of Cinepak that, while very close the standard Cinepak, couldn’t be decoded with standard decoder components.
So, a flexible Cinepak decoder has to identify if the file’s video header specified 8 bits/pixel. How does it distinguish between greyscale and paletted ? If a file is paletted, a custom palette should have been included with the video header. Thus, if video bits/pixel is 8 and a palette is present, use paletted ; else, use greyscale. Beyond that, the Cinepak decoder has a heuristic to determine how to handle the standard type of data, which might deviate slightly if it comes from a Sega CPK file.
The Fifth Variant ?
Now, regarding this fifth variant– the reason this issue came up is because of that aforementioned heuristic. Basically, a Cinepak chunk is supposed to store the length of the entire chunk in its header. The data from a Sega CPK file plays fast and loose with this chunk size and the discrepancy makes it easy to determine if the data requires special handling. However, a handful of files discovered on a Macintosh game called “The Journeyman Project : Pegasus Prime” have chunk lengths which are sometimes in disagreement with the lengths reported in the containing QuickTime file’s stsz atom. This trips the heuristic and tries to apply the CPK rules against Cinepak data which, aside from the weird chunk length, is perfectly compliant.Here are the first few chunk sizes, as reported by the file header (stsz atom) and the chunk :
size from stsz = 7880 (0x1EC8) ; from header = 3940 (0xF64) size from stsz = 3940 (0xF64) ; from header = 3940 (0xF64) size from stsz = 15792 (0x3DB0) ; from header = 3948 (0xF6C) size from stsz = 11844 (0x2E44) ; from header = 3948 (0xF6C)
Hey, there’s a pattern here. If they don’t match, then the stsz size is an even multiple of the chunk size (2x, 3x, or 4x in my observation). I suppose I could revise the heuristic to state that if the stsz size is 2x, 3x, 4x, or equal to the chunk header, qualify it as compliant Cinepak data.
Of course it feels impure, but software engineering is rarely about programmatic purity. A decade of special cases in the FFmpeg / Libav codebases are a testament to that.
What’s A Variant ?
Suddenly, I find myself contemplating what truly constitutes a variant. Maybe this was just a broken encoder program making these files ? And for that, I assign it the designation of distinct variation, like some sort of special, unique showflake ?Then again, I documented Magic Carpet FLIC as being a distinct variant of the broader FLIC format (which has an enormous number of variants as well).
-
Playing With File
8 septembre 2011, par Multimedia Mike — GeneralI played with the ‘file’ utility a long time ago because I wanted to make it recognize a large number of multimedia formats. I had trouble getting my changes to take. But I’m prepared to try again after many years.
Aiming at the Corpus
In my local mirror of the MPlayerHQ samples archive, I find 9853 unique files. So I run all of them through the ‘file’ command :’find /path/to/samples -type f -print0 | xargs -0 file —no-pad’
My Ubuntu installation has file v5.04. I also tested against 5.07 and the latest, 5.08. Here is the number of files each version was unable to identify (generically marking as ‘data’) :
5.04 1521 5.07 1405 5.08 1501
That seems like a regression for v5.08 until I dug into the details and saw quite a few items like this, indicating that the MPEG detection could use some work :
mov/mov-demux-infinite-loop.mpg : DOS-executable ( +mov/mg-‹demux-infinite-loop.mpg : data
image-samples/UNeedQT4.pntg : DOS-executable ( +imY- samples/UNeedQT4.pntg : data
Workflow
These are just notes to myself and perhaps anyone else who wants to add new file formats to be identified by the ‘file’ command.First, download either the latest release from the FTP or clone from Github. Do the usual unpack, ‘./configure’, ‘make’ routine. To use this newly-built version and its associated magic file :
./src/file —magic-file magic/magic.mgc <file>
To add a new format for ID, first, run the foregoing command to ensure that it’s not already identified. Then, check over the files in magic/Magdir and see which one might pertain to what you’re doing (it’s unlikely that your format will merit a new file in this directory). For example, for this round, I modified animation, audio, iff, and riff. Add or modify existing specs based on the copious examples in the directory and by consulting the appropriate man page (‘man 5 magic’).
Finally, run ‘make’ again which will regenerate the magic file. Invoke the above command again to use the modified magic file.
Before and After
On a selection of formats taken from the samples archive (renamed and cut down to a kilobyte because detection typically only relies on the first few bytes), here is the “before” :amv : RIFF (little-endian) data armovie : data bbc-dirac : data interplay-mve : data mtv : data nintendo-thp : data nullsoft-video : data redcode : data sega-film : data smacker : data trueaudio : data vqa : IFF data wavpack : data wc3-mve : IFF data wtv : data
And the “after” :
amv : RIFF (little-endian) data, AMV armovie : ARMovie bbc-dirac : BBC Dirac Video interplay-mve : Interplay MVE Movie mtv : MTV Multimedia File nintendo-thp : Nintendo THP Multimedia nullsoft-video : Nullsoft Video redcode : REDCode Video sega-film : Sega FILM/CPK Multimedia, 320 x 224 smacker : RAD Game Tools Smacker Multimedia version 2, 320 x 200, 100 frames trueaudio : True Audio Lossless Audio vqa : IFF data, Westwood Studios VQA Multimedia, 418 video frames, 320 x 200 wavpack : WavPack Lossless Audio wc3-mve : IFF data, Wing Commander III Video, PC version wtv : Windows Television DVR Media
After rerunning ‘file’ on the mphq corpus using the modified magic file, only 1329 files remain unidentified (down from 1501).
Going Forward
As mentioned, MPEG detection could probably be strengthened. However, a major weakness is QuickTime/MP4. Many files are not detected, probably owing to the many ways that QuickTime files can begin.