
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (72)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)
Sur d’autres sites (9309)
-
ffmpeg produced .wav reads only zeros with scipy.io.wavfile
8 janvier 2015, par question_markHi everyone and thanks for reading.
I wanted to do some analysis on a song using Python’s scipy.io.wavfile. Since I only have the song as .mp3 I converted the file to .wav using ffmpeg the following way :
ffmpeg -i test.mp3 test.wav
The .wav file plays perfectly well with vlc player, but wavfile shows only zeroes when reading it :
from scipy.io import wavfile as wf
data = wf.read("test.wav")
C:\Program Files\Anaconda\lib\site-packages\scipy\io\wavfile.py:42: WavFileWarning: Unknown wave file format
warnings.warn("Unknown wave file format", WavFileWarning)
data
(44100, array([[0, 0],
[0, 0],
[0, 0],
...,
[0, 0],
[0, 0],
[0, 0]], dtype=int16))I tried getting the data with Python’s built-in wave module before to the same effect (only zeros).
I am using the 64bit version of ffmpeg (ffmpeg-20140218-git-61d5970-win64-static).Any help is appreciated :-)
Edit : Included .wav header and tried forcing ffmpeg output format
I guess the header information of the .wav file is included here :
ffmpeg -i .\test.wav
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from '.\test.wav':
Metadata:
artist : Joe Cocker
copyright : (C) 1987 Capitol Records, Inc.
date : 1987
genre : Pop
title : Unchain My Heart
album : Unchain My Heart
track : 1/10
encoder : Lavf55.33.100
Duration: 00:05:04.33, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/sIf I try to specify the ffmpeg output format explicitly for the .mp3 conversion :
ffmpeg -i .\test.mp3 -f s16le -ar 44100 -ac 2 test.wav
Input #0, mp3, from '.\test.mp3':
Metadata:
title : Unchain My Heart
artist : Joe Cocker
album : Unchain My Heart
genre : Pop
composer : Bobby Sharp
track : 1/10
disc : 1/1
album_artist : Joe Cocker
copyright : (C) 1987 Capitol Records, Inc.
date : 1987
Duration: 00:05:04.35, start: 0.025056, bitrate: 240 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 235 kb/s
Stream #0:1: Video: mjpeg, yuvj420p(pc), 600x600 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
Metadata:
title :
comment : Cover (front)
Output #0, s16le, to 'test.wav':
Metadata:
title : Unchain My Heart
artist : Joe Cocker
album : Unchain My Heart
genre : Pop
composer : Bobby Sharp
track : 1/10
disc : 1/1
album_artist : Joe Cocker
copyright : (C) 1987 Capitol Records, Inc.
date : 1987
encoder : Lavf55.33.100
Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mp3 -> pcm_s16le)
Press [q] to stop, [?] for help
video:0kB audio:52425kB subtitle:0 data:0 global headers:0kB muxing overhead 0.000000%
size= 52425kB time=00:05:04.32 bitrate=1411.2kbits/sBut in this case (forced format), both ffmpeg and wavfile are not able to read the file :
ffmpeg -i .\test.wav
.\test.wav: Invalid data found when processing inputand
data = wf.read("test2.wav")
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
in <module>()
----> 1 data = wf.read("test2.wav")
C:\Program Files\Anaconda\lib\site-packages\scipy\io\wavfile.pyc in read(filename, mmap)
152
153 try:
--> 154 fsize = _read_riff_chunk(fid)
155 noc = 1
156 bits = 8
C:\Program Files\Anaconda\lib\site-packages\scipy\io\wavfile.pyc in _read_riff_chunk(fid)
98 _big_endian = True
99 elif str1 != b'RIFF':
--> 100 raise ValueError("Not a WAV file.")
101 if _big_endian:
102 fmt = '>I'
ValueError: Not a WAV file.
</module> -
Summer Hacking 2011
28 avril 2011, par Multimedia Mike — GeneralI recently learned that iD — you know, the famed game company — has a series of summer tech camps :
All I care to know is : Where were programs like these when I was 7-18 years old ? Born too early, I tell ya.
That reminds me that the Google Summer of Code, 2011 Edition is getting underway soon. I guess it’s like summertime computer camp for college-aged students. FFmpeg / libav is once again a part of the program with 10 slots awarded by Google. Here are the students, projects, and mentors.
Wish them luck.
-
How to contribute to open source, for companies
I have seen many nigh-incomprehensible attempts by companies to contribute to open source projects, including x264. Developers are often simply boggled, wondering why the companies seem incapable of proper communication. The companies assume the developers are being unreceptive, while the developers assume the companies are being incompetent, idiotic, or malicious. Most of this seems to boil down to a basic lack of understanding of how open source works, resulting in a wide variety of misunderstandings. Accordingly, this post will cover the dos and don’ts of corporate contribution to open source.
Do : contact the project using their preferred medium of communication.
Most open source projects use public methods of communication, such as mailing lists and IRC. It’s not the end of the world if you mistakenly make contact with the wrong people or via the wrong medium, but be prepared to switch to the correct one once informed ! You may not be experienced using whatever form of communication the project uses, but if you refuse to communicate through proper channels, they will likely not be as inclined to assist you. Larger open source projects are often much like companies in that they have different parts to their organization with different roles. Don’t assume that everyone is a major developer !
If you don’t know what to do, a good bet is often to just ask someone.
Don’t : contact only one person.
Open source projects are a communal effort. Major contributions are looked over by multiple developers and are often discussed by the community as a whole. Yet many companies tend to contact only a single person in lieu of dealing with the project proper. This has many flaws : to begin with, it forces a single developer (who isn’t paid by you) to act as your liaison, adding yet another layer between what you want and the people you want to talk to. Contribution to open source projects should not be a game of telephone.
Of course, there are exceptions to this : sometimes a single developer is in charge of the entirety of some particular aspect of a project that you intend to contribute to, in which case this might not be so bad.
Do : make clear exactly what it is you are contributing.
Are you contributing code ? Development resources ? Money ? API documentation ? Make it as clear as possible, from the start ! How developers react, which developers get involved, and their expectations will depend heavily on what they think you are providing. Make sure their expectations match reality. Great confusion can result when they do not.
This also applies in the reverse — if there’s something you need from the project, such as support or assistance with development of your patch, make that explicitly clear.
Don’t : code dump.
Code does not have intrinsic value : it is only useful as part of a working, living project. Most projects react very negatively to large “dumps” of code without associated human resources. That is, they expect you to work with them to finalize the code until it is ready to be committed. Of course, it’s better to work with the project from the start : this avoids the situation of writing 50,000 lines of code independently and then finding that half of it needs to be rewritten. Or, worse, writing an enormous amount of code only to find it completely unnecessary.
Of course, the reverse option — keeping such code to yourself — is often even more costly, as it forces you to maintain the code instead of the official developers.
Do : ignore trolls.
As mentioned above, many projects use public communication methods — which, of course, allow anyone to communicate, by nature of being public. Not everyone on a project’s IRC or mailing list is necessarily qualified to officially represent the project. It is not too uncommon for a prospective corporate contributor to be turned off by the uninviting words of someone who isn’t even involved in the project due to assuming that they were. Make sure you’re dealing with the right people before making conclusions.
Don’t : disappear.
If you are going to try to be involved in a project, you need to stay in contact. We’ve had all too many companies who simply disappear after the initial introduction. Some tell us that we’ll need an NDA, then never provide it or send status updates. You may know why you’re not in contact — political issues at the company, product launch crunches, a nice vacation to the Bahamas — but we don’t ! If you disappear, we will assume that you gave up.
Above all, don’t assume that being at a large successful company makes you immune to these problems. If anything, these problems seem to be the most common at the largest companies. I didn’t name any names in this post, but practically every single one of these rules has been violated at some point by companies looking to contribute to x264. In the larger scale of open source, these problems happen constantly. Don’t fall into the same traps that many other companies have.
If you’re an open source developer reading this post, remember it next time you see a company acting seemingly nonsensically in an attempt to contribute : it’s quite possible they just don’t know what to do. And just because they’re doing it wrong doesn’t mean that it isn’t your responsibility to try to help them do it right.