PCM files not playing

macOS specific usage questions
davecotter
New Cone
New Cone
Posts: 4
Joined: 09 Nov 2012 21:29

Re: PCM files not playing

Postby davecotter » 14 Nov 2012 07:56

just to clarify, this is a raw CDDA LPCM format. ie: the exact same format that streams off of a normal CD. you are correct that it has no detectable format outside the file name itself, the full format must be assumed. but if you assume the proper format (44.1khz, 16bit, stereo, little-endian), it does indeed play just fine. i say "headerless" to indicate there is no WAV or AIFF header, which would make the format detectable. it just starts right in with the linear PCM data.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: PCM files not playing

Postby Jean-Baptiste Kempf » 14 Nov 2012 08:06

Sigh. Why is it that anyone who disagrees with the statements of the powers that be here on the fora are ranting? I am not ranting. I am merely pointing out obvious illogical inconsistencies in your statements, that underly a foundational philosophy that hampers the usefulness of the application.
You are complaining over and over about the same issue, without listening; and attacking developers and telling them you know better. You are attacking the usefulness of a media player because your file does not play automatically... This is very close to ranting, yes.
For instance it is a clear error that "there is nothing in this file that tells you it is a PCM file. Absolutely nothing, no header, no magic number." This statement is totally incorrect, and without merit. There most certainly is something in the file that tells anyone who looks at it that it is a PCM file, without ever having to open the file in any sort of editor, namely, the file name. When a file is named AudioFile.PCM, I suspect that well over 90% of the time, it can be assumed that it is a PCM file. It is certainly 100% of the time that this assumption is justified. How is it that you think that the other players I have opened the file in and played it with no problem manage to figure it out?!? Surely this would not be the only application that has ever used the file extension to tell it information about the file type. (That is, after all the entire POINT of the file extension in the first place.)
PCM extensions and mimetype fails quite often and are not strong enough to trust them for auto-detection. There are so many good reasons, including security, that we don't use that and will not use that.

File has no headers => no autodetection.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: PCM files not playing

Postby Jean-Baptiste Kempf » 14 Nov 2012 08:11

just to clarify, this is a raw CDDA LPCM format. ie: the exact same format that streams off of a normal CD. you are correct that it has no detectable format outside the file name itself, the full format must be assumed. but if you assume the proper format (44.1khz, 16bit, stereo, little-endian), it does indeed play just fine. i say "headerless" to indicate there is no WAV or AIFF header, which would make the format detectable. it just starts right in with the linear PCM data.
Which means that it cannot work out of the box, because extensions are not enough to detect.

Not to mention that those days, assuming CD defaults is a bit tricky, seeing all LPCM files from HD sources...
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

DeusExMachina
Blank Cone
Blank Cone
Posts: 29
Joined: 09 Nov 2012 02:13

Re: PCM files not playing

Postby DeusExMachina » 14 Nov 2012 15:54

You are complaining over and over about the same issue, without listening
I did nothing of the kind. I merely pointed out a succession of inaccurate statements. I did not make the same "complaints over and over again." You claimed the file was not playable. I pointed out that it is. You claimed the file itself claimed it had video. The file makes no such claim. You claimed that there was no way to tell what kind of data was in the file. I pointed out that this was not the case, as the file extension does that. I did not repeat these statements over and over again, except insofar as these inaccurate statements continued to be made. Nor is it true that I did not listen. Your statements, regarding the data in this file, and the format in general, however, were categorically in error. Certainly the snippet you quoted exhibits neither of these claims.
I am sorry if you felt "attacked", that certainly was not my intent, but I stand by these statements of fact.
You are attacking the usefulness of a media player because your file does not play automatically... This is very close to ranting, yes.
If a file does not play, that has direct bearing on the usefulness of a media player. What other metric could you possibly use? Pointing this out is not "attacking" it, nor is it ranting.
PCM extensions and mimetype fails quite often and are not strong enough to trust them for auto-detection.
So you are essentially saying that to avoid the player failing a relatively small percentage of the time based on an incorrect file extension, you are willing to fail 100% of the time (and not, by the way, give the user any clear indication whatsoever that playback has failed). That makes little sense. As to other issues, file headers can be faked by nefarious evil-doers just as easily as file extensions. You even go so far as to invite me to write code to allow the file to play. If security was really the concern here, such code would never be allowed in the code base in the first place. Besides which, any "security" concerns are not ameliorated by allowing the file to be played via the command line. Playing via CLI and playing via UI with default values would lead to the same security issues, so I really don't buy it.

Also, I would point out that, this being the case, KNOWING it was a PCM file (since I stated directly in the subject heading that it was) you could have avoided the entire issue by immediately pointing out that VLC can not or will not play pcm files, due to the reasons you stated. (Instead you made a series of posts making erroneous statements about the specific example file I uploaded, rather than simply make it clear that, for a variety of reasons, you have chosen not to allow pcm files to be played directly in the UI.) You might have then suggested the obvious command line work around, that I eventually discovered on my own. Surely you must have been aware before I even made the initial post, that this was the case, since you make it clear that VLC can not, has never, and apparently never will, be able to play pcm files (as opposed to files with pcm data) directly from the UI. Why not just point this out in your very first post? Doing so would have obviated the entire rest of the thread.

I am sorry you decided to feel so attacked and beleaguered. As I said, it certainly was not my intent. But even reading back through the thread again now, all I see is an overreaction to an honest disagreement over statements of fact, and a succession of attempts to deflect criticism. I would point out that this is not the only thread where this type of overreaction against genuine, legitimate, and well-intended, constructive criticism has been evident in this forum. In fact, I was hesitant to post my initial query at all after reading through similar threads, since this was such a common reaction of the responders to posters with legitimate questions or requests.

But again, whatever. I have solved my issue.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: PCM files not playing

Postby Jean-Baptiste Kempf » 14 Nov 2012 19:09

You are complaining over and over about the same issue, without listening
I did nothing of the kind. I merely pointed out a succession of inaccurate statements. I did not make the same "complaints over and over again." You claimed the file was not playable.
It is not playable automatically by VLC, which is exactly what this discussion is about. Else, why complain on the forum?
You claimed the file itself claimed it had video.
Which is exactly what the logs you posted say. Read them again and grep from MPEG1/2.
You claimed that there was no way to tell what kind of data was in the file.
I stand by it, there is no way to tell what kind of data is in the file.
I pointed out that this was not the case, as the file extension does that.
And I told you why this is not accurate enough to use this as a fact. And you do not like this answer.
Your statements, regarding the data in this file, and the format in general, however, were categorically in error.
I disagree. This file has no header and absolutely no confident way to have its format detected.

If a file does not play, that has direct bearing on the usefulness of a media player. What other metric could you possibly use? Pointing this out is not "attacking" it, nor is it ranting.
See above. I tell you that the file is not playable by VLC, and you keep telling it is doable, then telling us to "guess" the right values.
PCM extensions and mimetype fails quite often and are not strong enough to trust them for auto-detection.
So you are essentially saying that to avoid the player failing a relatively small percentage of the time based on an incorrect file extension, you are willing to fail 100% of the time (and not, by the way, give the user any clear indication whatsoever that playback has failed). That makes little sense.
This makes a lot of sense. Almost 10% of files have wrong extensions. Look at this forum and our bugtracker.
Files that cannot be autodetected are not playable without users intervention. I don't see how this can be changed for a versatile media player.
As to other issues, file headers can be faked by nefarious evil-doers just as easily as file extensions.
Which is why we need headers to play automatically, and to check them. Thank you for proving my point. Files without headers cannot be played automatically.
You even go so far as to invite me to write code to allow the file to play. If security was really the concern here, such code would never be allowed in the code base in the first place.
Of course, because you seem to imply that you know more than me (us). Therefore, probably you are way smarter and have an excellent idea that would be allowed in the codebase. But I seriously doubt it.
Also, I would point out that, this being the case, KNOWING it was a PCM file (since I stated directly in the subject heading that it was)
We do not know that, see above.
Not to mention that there are almost 20 different ways of packaging raw audio data in files and many people call that PCM files. See our raw, mp3, wav and es demuxers.

It is like saying a YUV file.
I am sorry you decided to feel so attacked and beleaguered. As I said, it certainly was not my intent. But even reading back through the thread again now, all I see is an overreaction to an honest disagreement over statements of fact, and a succession of attempts to deflect criticism.
What I also see is someone who thinks he knows better than everyone. Maybe you do, but then, we wait for your patches.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

DeusExMachina
Blank Cone
Blank Cone
Posts: 29
Joined: 09 Nov 2012 02:13

Re: PCM files not playing

Postby DeusExMachina » 21 Jun 2013 14:13

Since this has still not been addressed:
It is not playable by VLC, which is exactly what this discussion is about. Else, why complain on the forum?
As pointed out repeatedly, and even acknowledged by you here, yes it IS playable by VLC. (You give it the right parameters on the CLI, it plays fine.)
Which is exactly what the logs you posted say. Read them again and grep from MPEG1/2.
And again, it makes no difference what VLC incorrectly states in the log files. There is no video in the PCM files, and VLC is incorrectly making those statements on ALL PCM files. Claiming it has video in it because VLC incorrectly states there is video in it is circular logic. VLC is not correct. There is no video, regardless of what the logs state.
I stand by it, there is no way to tell what kind of data is in the file.
And yet other media players seem to manage to play the files just fine.
So either they are magic, or they have a way of telling what kind of data is in the file.
DeusExMachina wrote:
I pointed out that this was not the case, as the file extension does that.
And I told you why this is not accurate enough to use this as a fact. And you do not like this answer.
Because it is not a real answer, nor is it accurate. First, the idea that there are a significant number of files out there masquerading as PCMs that are really not is unsupportable by the facts. Second, even if that were the case, attempting to play them and failing occasionally is a far preferable scenario than failing 100% of the time. Certainly that happens already. There are a number of times VLC fails to play various formats. It gracefully informs the user and waits. Are you saying that VLC should just not attempt to play those files, too?
See above. I tell you that the file is not playable by VLC, and you keep telling it is doable, then telling us to "guess" the right values.
No, I keep telling you VLC DOES play the file. You are confusing and confounding two separate statements. You say VLC categorically can not play the file, and I keep pointing out that it can. I HAVE played the file in VLC. You are confounding this with the issue of whether VLC can play this track automatically, which it can not, but an argument can be made that it should. Regardless of one's position on this, replying to the claim that VLC should be able to play this track automatically with the statement that it can't play it at all is clearly a false statement.
DeusExMachina wrote:
PCM extensions and mimetype fails quite often and are not strong enough to trust them for auto-detection.
So you are essentially saying that to avoid the player failing a relatively small percentage of the time based on an incorrect file extension, you are willing to fail 100% of the time (and not, by the way, give the user any clear indication whatsoever that playback has failed). That makes little sense.
This makes a lot of sense. Almost 10% of files have wrong extensions. Look at this forum and our bugtracker.
Files that cannot be autodetected are not playable without users intervention. I don't see how this can be changed for a versatile media player.
How can it not be? Not playing them makes the player LESS versatile, not more. Besides which, a 10% failure rate is far better than a 100% rate, which is what you have now, with a file format that should be succeeding, using your numbers, 90% of the time. Besides, again, the app already fails on several files formats for just this reason.
DeusExMachina wrote:
As to other issues, file headers can be faked by nefarious evil-doers just as easily as file extensions.
Which is why we need headers to play automatically, and to check them. Thank you for proving my point. Files without headers cannot be played automatically.
It does not prove your point. A spoofed header is not magically rendered inert by your reading them automatically. I could just as easily claim that since file extensions can be spoofed, they need to be played automatically. This is the EXACT mirror of your argument. and recapitulate my exact point.
DeusExMachina wrote:
You even go so far as to invite me to write code to allow the file to play. If security was really the concern here, such code would never be allowed in the code base in the first place.
Of course, because you seem to imply that you know more than me (us). Therefore, probably you are way smarter and have an excellent idea that would be allowed in the codebase. But I seriously doubt it.
I did nothing of the kind. Feel free to point out specifically where I did. I DID point out errors in your statements, that I can prove empirically, such as you claiming VLC can't play a file, when I know for a fact that it can, because I HAVE done so.
What I also see is someone who thinks he knows better than everyone. Maybe you do, but then, we wait for your patches.
Again, feel free to quote specifically where I made any statements that implied that. Me pointing out clearly incorrect statements made in this thread is not a example.
Nor is me pointing to other media players that seem to manage to play PCM files automatically with no parameters supplied by the user.

If all your statements above are true, please explain:
1) how it can be true that such a file quote "is not playable by VLC" unquote (your words) when I CAN play it with VLC.
You keep saying "It is not playable by VLC" when it is playable by VLC.
2) how it can be true that there is no way to ascertain the necessary data to play back the files when other apps, such as BZR Player CAN play the file just fine. As well as Audacity.

You claim you see "someone who thinks he knows better than everyone". What I see, in every post from other people that brings up this exact same issue, is a condescending dismissal of the issue, followed by vigorously attacking the poster if they do not accept at face value your pronouncements. To be clear, this issue has come up in these fora several times, and each time the end result is an attack on the person posting about the issue.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: PCM files not playing

Postby Jean-Baptiste Kempf » 23 Jun 2013 13:49

1) Learn the meaning of the word "automatically" and "autodetection"
They are on almost all my messages of this thread.
Files without headers are not going to be playable automatically, by default, by VLC. There is no safe way to do so.
If you don't like that, fork it.

2) Audacity is an AUDIO editor, whose main purpose is to edit PCM file. This is normal that it opens raw PCM files without headers. BZR player is an AUDIO player, done to play audio files. It is expected that in the end it assumes it is a raw audio file. VLC is not that.

Repeating over and over your nonsense, your insults and your refusal to listen, and your aggression will not make your point at all.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

DeusExMachina
Blank Cone
Blank Cone
Posts: 29
Joined: 09 Nov 2012 02:13

Re: PCM files not playing

Postby DeusExMachina » 23 Jun 2013 14:11

Not once did I insult anyone.

Vendeka
New Cone
New Cone
Posts: 1
Joined: 22 Sep 2016 21:27

Re: PCM files not playing

Postby Vendeka » 22 Sep 2016 22:01

(September 2016) So VLC does not autodetect raw audio files, but maybe it could play with values stored against the PCM filetype.
This particular file was recorded by the Android app 'Virtual Recorder' on a mobile phone (where it plays) and copied to a Windows 10 PC (where it doesn't play).
Starting with the command line offered by DeusExMachina it plays properly by changing 44000 t o 11000 like this:
VLC -I rc --demux=rawaud --rawaud-channels=2 --rawaud-samplerate=11000 /Path/To/MyFile.pcm

I'd like to store these settings for the next PCM file that needs to be played, without having to resort to a black screen command line.
How can VLC be persuaded to store and apply these settings? Or maybe they can be set with the Open action for PCM filetype?
Suggestions welcome!

dfuhrmann
Developer
Developer
Posts: 1183
Joined: 02 Jul 2012 11:09

Re: PCM files not playing

Postby dfuhrmann » 23 Sep 2016 08:12

Convert your files to a correct audio format, with header, its as simple as that. Such information needs to be stored within the file, not somehwere else in VLC.

You might be able to even use VLCs command line to do that, and you can write a script so you do not need to type the commands every time.

(Note: You do not need to give any time in your posts, its already printed by the forum software. :-) )

DeusExMachina
Blank Cone
Blank Cone
Posts: 29
Joined: 09 Nov 2012 02:13

Re: PCM files not playing

Postby DeusExMachina » 08 Mar 2018 21:10

So VLC does not autodetect raw audio files, but maybe it could play with values stored against the PCM filetype.
This is EXACTLY the suggestion I made, and was given some completely bogus argument about security issues with MIMEtypes and a bunch of other factually erroneous or logically invalid statements.
FTR, as I stated earlier, this is not the first time this issue has been raised, and I am not the only, nor the first, person to raise it.
Every person who has done so, however, has been attacked for doing so.

And yet still no explanation why other players manage to play these files just fine.
Last edited by DeusExMachina on 08 Mar 2018 21:18, edited 1 time in total.

DeusExMachina
Blank Cone
Blank Cone
Posts: 29
Joined: 09 Nov 2012 02:13

Re: PCM files not playing

Postby DeusExMachina » 08 Mar 2018 21:18

Convert your files to a correct audio format, with header, its as simple as that. Such information needs to be stored within the file, not somehwere else in VLC.

You might be able to even use VLCs command line to do that, and you can write a script so you do not need to type the commands every time.

(Note: You do not need to give any time in your posts, its already printed by the forum software. :-) )
What on earth is "a correct audio format"?!? How is PCM not "a correct audio format"?
Just because you pronounce it so?
There is no inherent requirement that "such information needs to be stored in the file", other that VLCs baseless requirement that it be so. Again, other players play these files with NO problem whatsoever. So the fact that VLC can't play them properly is not proof they can't be played, only that they can't be played by VLC< and this thread is proof that the reason they can't be played is NOT the files themselves, but the recalcitrance of the developers.
And that's fine. They can do as they please. But they should at least be honest and upfront about it.

Seriously, don't blame the file, just say "VLC does not have the ability to properly play PCM files".
Is that so hard?

Furthermore, the idea that using the CLI is an appropriate solution is absurd. Leaving aside the fact that the vast majority of VLC users would not be able to do so (even using the exact command I suggested as a template), in fact, using the command line doesn't work in some instances, anyway, such as, again, the initial purpose that prompted this thread, namely getting VLC to properly play PCM/CDG file pairs. Using the command line does NOT cause VLC to properly play the tracks simultaneously as it is supposed to.


Return to “VLC media player for macOS Troubleshooting”

Who is online

Users browsing this forum: No registered users and 4 guests