PDA

View Full Version : Create a new audio file extension and read it using phonon



walidos
10th February 2012, 20:41
Hello,

I have to create a special audio file format that only my player is able to read, is phonon suitable for that or should i do low-level audio processing?


Thanks in advance :)

wysota
10th February 2012, 22:33
Phonon can read whatever codecs are in your system so without an appropriate codec it will not be able to read the file. You would have to decode it on your own and reencode it into something your system (hence Phonon) understands.

walidos
11th February 2012, 11:02
Thank you,
In fact i didn't try it yet so i want to know what's possible and what's not before hitting the project,
So what if i need to get information about the file such as title, author name ... or i need to encode decode content, i would probably need low-level processing, isn't it ?
Can i use both Qmultimedia or Qaudio and Phonon ?

wysota
11th February 2012, 12:34
If you invent your own audio format then you have to process it yourself. That's why people usually don't invent their own formats if there are perfectly good solutions available.

walidos
11th February 2012, 12:51
My Own format is just to don't let other players able to read it(client's specifications), so i can say that my own format would be a small change in the file so that only my player can read it,
in this case, can i make phonon able to read it ? if not can i use phonon to read all other formats and process my own format apart (low-level)?
is it a lot of work to create a special format (for example inherited from mp3) and make my program able to read it ?

wysota
11th February 2012, 22:17
My Own format is just to don't let other players able to read it(client's specifications)
If someone really wants to, he will read your files. If someone doesn't care, he won't try. Security through obscurity is usually a bad idea.


in this case, can i make phonon able to read it ?
Phonon will not help you much here as the whole advantage of using Phonon is that it takes the burden of decoding the file from you. Since you need to write your own decoder anyway, playing the file is the least of your problems.


is it a lot of work to create a special format (for example inherited from mp3) and make my program able to read it ?
I don't know what you want to "inherit" from mp3. File format is one thing, media codec is another. I really suggest you become familiar with the topic before you start tackling with the problem.