
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (22)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe 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 (...)
Sur d’autres sites (5941)
-
Sequencing MIDI From A Chiptune
28 avril 2013, par Multimedia Mike — Outlandish BrainstormsThe feature requests for my game music appreciation website project continue to pour in. Many of them take the form of “please add player support for system XYZ and the chiptune library to go with it.” Most of these requests are A) plausible, and B) in process. I have also received recommendations for UI improvements which I take under consideration. Then there are the numerous requests to port everything from Native Client to JavaScript so that it will work everywhere, even on mobile, a notion which might take a separate post to debunk entirely.
But here’s an interesting request about which I would like to speculate : Automatically convert a chiptune into a MIDI file. I immediately wanted to dismiss it as impossible or highly implausible. But, as is my habit, I started pondering the concept a little more carefully and decided that there’s an outside chance of getting some part of the idea to work.
Intro to MIDI
MIDI stands for Musical Instrument Digital Interface. It’s a standard musical interchange format and allows music instruments and computers to exchange musical information. The file interchange format bears the extension .mid and contains a sequence of numbers that translate into commands separated by time deltas. E.g. : turn key on (this note, this velocity) ; wait x ticks ; turn key off ; wait y ticks ; etc. I’m vastly oversimplifying, as usual.MIDI fascinated me back in the days of dialup internet and discrete sound cards (see also my write-up on the Gravis Ultrasound). Typical song-length MIDI files often ranged from a few kilobytes to a few 10s of kilobytes. They were significantly smaller than the MOD et al. family of tracker music formats mostly by virtue of the fact that MIDI files aren’t burdened by transporting digital audio samples.
I know I’m missing a lot of details. I haven’t dealt much with MIDI in the past… 15 years or so (ever since computer audio became a blur of MP3 and AAC audio). But I’m led to believe it’s still relevant. The individual who requested this feature expressed an interest in being able to import the sequenced data into any of the many music programs that can interpret .mid files.The Pitch
To limit the scope, let’s focus on music that comes from the 8-bit Nintendo Entertainment System or the original Game Boy. The former features 2 square wave channels, a triangle wave, a noise channel, and a limited digital channel. The latter creates music via 2 square waves, a wave channel, and a noise channel. The roles that these various channels usually play typically break down as : square waves represent the primary melody, triangle wave is used to simulate a bass line, noise channel approximates a variety of percussive sounds, and the DPCM/wave channels are fairly free-form. They can have random game sound effects or, if they are to assist in the music, are often used for more authentic percussive sounds.The various channels are controlled via an assortment of memory-mapped hardware registers. These registers are fed values such as frequency, volume, and duty cycle. My idea is to modify the music playback engine to track when various events occur. Whenever a channel is turned on or off, that corresponds to a MIDI key on or off event. If a channel is already playing but a new frequency is written, that would likely count as a note change, so log a key off event followed by a new key on event.
There is the major obstacle of what specific note is represented by a channel in a particular state. The MIDI standard defines 128 different notes spanning 11 octaves. Empirically, I wonder if I could create a table which maps the assorted frequencies to different MIDI notes ?
I think this strategy would only work with the square and triangle waves. Noise and digital channels ? I’m not prepared to tackle that challenge.
Prior Work ?
I have to wonder if there is any existing work in this area. I’m certain that people have wanted to do this before ; I wonder if anyone has succeeded ?Just like reverse engineering a binary program entails trying to obtain a higher level abstraction of a program from a very low level representation, this challenge feels like reverse engineering a piece of music as it is being performed and automatically expressing it in a higher level form.
-
Xuggle mp4 output (isom mp41 codec ?) issues
19 mai 2017, par JonSidesWe’re using Xuggler to create an mp4 from pictures, with no audio at this point. The mp4 we’re getting is playable locally, but cannot be embedded in a webpage or chromecast. I suspect the issue is that we’re getting an older ISOM mp41 codec that’s not supported by HTML5 and chromecast. That’s a guess based on this snippet of header info :
Internet media type : video/mp4
Codec ID : isom
Codec ID : isom (isom/iso2/mp41)
Codec ID/Url :
http://www.apple.com/quicktime/download/standalone.html
CodecID_Compatible : isom/iso2/mp41
Codec : MPEG-4
Codec : MPEG-4
Codec/Extensions usually used : mov mp4 m4v m4a m4b m4p 3ga 3gpa
3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4vI can embed and chromecast mp42 type files. So the first part of my question is Am I on the right track in looking at isom and mp41 ? And if so, can I get Xuggler to output using a newer codec ?
I can post the full header if that would be helpful.
The above snippet is from mediainfo. Here’s the whole thing, which is too long for a comment :
General
Count : 325
Count of stream of this kind : 1
Kind of stream : General
Kind of stream : General
Stream identifier : 0
Inform : MPEG-4 (Base Media) : 377 KiB, 12 s 301 ms
Count of video streams : 1
Video_Format_List : MPEG-4 Visual
Video_Format_WithHint_List : MPEG-4 Visual
Codecs Video : MPEG-4 Visual
Complete name : C :\Users\Jon\Desktop\vid-1.mp4
Folder name : C :\Users\Jon\Desktop
File name : vid-1
File extension : mp4
Format : MPEG-4
Format : MPEG-4
Format/Extensions usually used : mov mp4 m4v m4a m4b m4p 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v
Commercial name : MPEG-4
Format profile : Base Media
Internet media type : video/mp4
Codec ID : isom
Codec ID : isom (isom/iso2/mp41)
Codec ID/Url :
http://www.apple.com/quicktime/download/standalone.html
CodecID_Compatible : isom/iso2/mp41
Codec : MPEG-4
Codec : MPEG-4
Codec/Extensions usually used : mov mp4 m4v m4a m4b m4p 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v
File size : 386063
File size : 377 KiB
File size : 377 KiB
File size : 377 KiB
File size : 377 KiB
File size : 377.0 KiB
Duration : 12301
Duration : 12 s 301 ms
Duration : 12 s 301 ms
Duration : 12 s 301 ms
Duration : 00:00:12.301
Duration : 00:00:14:00
Duration : 00:00:12.301 (00:00:14:00)
Overall bit rate mode : CBR
Overall bit rate mode : Constant
Overall bit rate : 251077
Overall bit rate : 251 kb/s
Frame rate : 3.415
Frame rate : 3.415 FPS
Frame count : 42
Stream size : 1368
Stream size : 1.34 KiB (0%)
Stream size : 1 KiB
Stream size : 1.3 KiB
Stream size : 1.34 KiB
Stream size : 1.336 KiB
Stream size : 1.34 KiB (0%)
Proportion of this stream : 0.00354
HeaderSize : 36
DataSize : 384703
FooterSize : 1324
IsStreamable : No
File creation date : UTC 2017-05-05 19:49:25.209
File creation date (local) : 2017-05-05 15:49:25.209
File last modification date : UTC 2017-01-04 19:04:53.000
File last modification date (local) : 2017-01-04 15:04:53.000
Writing application : Lavf54.3.100
Writing application : Lavf54.3.100Video
Count : 338
Count of stream of this kind : 1
Kind of stream : Video
Kind of stream : Video
Stream identifier : 0
StreamOrder : 0
Inform : 250 kb/s, 200*200 (1.000), at
3.415 FPS, MPEG-4 Visual (Simple@L1)
ID : 1
ID : 1
Format : MPEG-4 Visual
Commercial name : MPEG-4 Visual
Format profile : Simple@L1
Format settings, BVOP : No
Format settings, BVOP : No
Format settings, QPel : No
Format settings, QPel : No
Format settings, GMC : 0
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Format settings, Matrix : Default (H.263)
Internet media type : video/MP4V-ES
Codec ID : 20
Codec : MPEG-4V
Codec : MPEG-4 Visual
Codec/Family : MPEG-4V
Codec/CC : 20
Codec profile : Simple@L1
Codec settings, Packet bitstream : No
Codec settings, BVOP : No
Codec settings, QPel : No
Codec settings, GMC : 0
Codec settings, GMC : No warppoints
Codec settings, Matrix : Default (H.263)
Duration : 12301
Duration : 12 s 301 ms
Duration : 12 s 301 ms
Duration : 12 s 301 ms
Duration : 00:00:12.301
Duration : 00:00:14:00
Duration : 00:00:12.301 (00:00:14:00)
Bit rate mode : CBR
Bit rate mode : Constant
Bit rate : 250207
Bit rate : 250 kb/s
Width : 200
Width : 200 pixels
Height : 200
Height : 200 pixels
Sampled_Width : 200
Sampled_Height : 200
Pixel aspect ratio : 1.000
Display aspect ratio : 1.000
Display aspect ratio : 1.000
Rotation : 0.000
Frame rate mode : VFR
Frame rate mode : Variable
Frame rate : 3.415
Frame rate : 3.415 FPS
Minimum frame rate : 3.333
Minimum frame rate : 3.333 FPS
Maximum frame rate : 65535.000
Maximum frame rate : 65 535.000 FPS
Frame count : 42
Resolution : 8
Resolution : 8 bits
Colorimetry : 4:2:0
Color space : YUV
Chroma subsampling : 4:2:0
Chroma subsampling : 4:2:0
Bit depth : 8
Bit depth : 8 bits
Scan type : Progressive
Scan type : Progressive
Interlacement : PPF
Interlacement : Progressive
Compression mode : Lossy
Compression mode : Lossy
Bits/(Pixel*Frame) : 1.832
Stream size : 384695
Stream size : 376 KiB (100%)
Stream size : 376 KiB
Stream size : 376 KiB
Stream size : 376 KiB
Stream size : 375.7 KiB
Stream size : 376 KiB (100%)
Proportion of this stream : 0.99646
Writing library : Lavc54.14.101
Writing library : Lavc54.14.101 -
Creating a reflection
Here is a simple example of creating a reflection of an image. The reflection is created by flipping the image and overlaying a gradient on it. Then both, the original image and the reflection is overlayed on a canvas.
This example is created for Imagick 2.1.x but with a little tuning it should work with earlier versions.
-
< ?php
-
-
/* Read the image */
-
$im = new Imagick( "strawberry.png" ) ;
-
-
/* Thumbnail the image */
-
$im->thumbnailImage( 200, null ) ;
-
-
/* Create a border for the image */
-
$im->borderImage( "white", 5, 5 ) ;
-
-
/* Clone the image and flip it */
-
$reflection = $im->clone() ;
-
$reflection->flipImage() ;
-
-
/* Create gradient. It will be overlayd on the reflection */
-
$gradient = new Imagick() ;
-
-
/* Gradient needs to be large enough for the image
-
and the borders */
-
$gradient->newPseudoImage( $reflection->getImageWidth() + 10,
-
$reflection->getImageHeight() + 10,
-
"gradient:transparent-black"
-
) ;
-
-
/* Composite the gradient on the reflection */
-
$reflection->compositeImage( $gradient, imagick: :COMPOSITE_OVER, 0, 0 ) ;
-
-
/* Add some opacity */
-
$reflection->setImageOpacity( 0.3 ) ;
-
-
/* Create empty canvas */
-
$canvas = new Imagick() ;
-
-
/* Canvas needs to be large enough to hold the both images */
-
$width = $im->getImageWidth() + 40 ;
-
$height = ( $im->getImageHeight() * 2 ) + 30 ;
-
$canvas->newImage( $width, $height, "black", "png" ) ;
-
-
/* Composite the original image and the reflection on the canvas */
-
$canvas->compositeImage( $im, imagick: :COMPOSITE_OVER, 20, 10 ) ;
-
$canvas->compositeImage( $reflection, imagick: :COMPOSITE_OVER,
-
20, $im->getImageHeight() + 10 ) ;
-
-
/* Output the image*/
-
header( "Content-Type : image/png" ) ;
-
echo $canvas ;
-
-
?>
The source image :
And the result :
P.S. Please send me some new images which I can use in these examples
-