View Full Version : ffmpeg pcm_bluray fails
MrVideo
10th July 2017, 03:03
Consider the following:
ffmpeg -i input.mkv -vcodec copy -acodec pcm_bluray output.mkv
The video is correctly described as 1080p H.264 and the audio as EAC3 5.1.
Yet, ffmpeg errors with pcm_bluray as unknown codec. But, doing:
ffmpeg -codecs | grep bluray
results in pcm_bluray being listed.
So, why doesn't it work?
sneaker_ger
10th July 2017, 05:42
No encoder.
Codecs:
D..... = Decoding supported
.E.... = Encoding supported
..V... = Video codec
..A... = Audio codec
..S... = Subtitle codec
...I.. = Intra frame-only codec
....L. = Lossy compression
.....S = Lossless compression
-------
[...]
D.A..S pcm_bluray PCM signed 16|20|24-bit big-endian for Blu-ray media
Can't you use the "normal" PCM formats and let the authoring software deal with it? Why you need it in mkv?
nevcairiel
10th July 2017, 09:02
pcm_bluray should only ever be put in Blu-ray-style m2ts files, Matroska has no format mapping for it anyway. Use normal PCM (ie. pcm_s16le or pcm_s24le depending on bitdepth). It contains the same data, just differently arranged.
And as sneaker_ger says, there is no encoder for it, but even if there was, don't put it in mkv (or anywhere except m2ts)
tebasuna51
10th July 2017, 09:56
I don't know for what you want decode the EAC3 5.1 to PCM in mkv, but you can use (like sneaker_ger and nevcairiel say):
ffmpeg -i input.mkv -vcodec copy -acodec pcm_s24le output.mkv
(better than pcm_s16le to preserve the max quality)
If you convert after the output.mkv to m2ts, with tsMuxeR for instance, the pcm_s24le is converted to pcm_bluray lossless.
The differences between pcm_s24le and pcm_bluray are only in data order:
- Channel order (FL,FR,FC,LF,SL,SR -> FL,FR,FC,SL,SR,LF)
- Byte order (little endian -> big endian)
MrVideo
10th July 2017, 11:26
The reason for it being MKV wrapped is for later importing into BDRB for authoring a BD disc. But, looking at the import again, it looks like I should be able to import M2TS files.
I did screw up and not look up the codec key. Silly me.
The idea was to keep from recoding EAC3 to AC3. Dolby AC3 was not really designed to be recoded. By the time I got the file, I have no idea the history of the audio. By coverting to PCM, there wouldn't be any quality loss and the potential addition of coding artifacts. But, after doing a test encoding, it looks like it is going to be a moot point. The resulting PCM stream was 10x the size of the original EAC3 stream. It means that I will only be able to get two files on the disc instead of three. That isn't viable, as I wanted to get at least four episodes to a disc. But, only three will be able to fit if they contain PCM audio. Sigh. :(
Thanks for the responses, as I learned more this morning.
MrVideo
11th July 2017, 00:10
I'm curious... does anyone know why there isn't a pcm_bluray encoder? There are of the other pcm encoder options, but not this one.
nevcairiel
11th July 2017, 00:23
I'm curious... does anyone know why there isn't a pcm_bluray encoder? There are of the other pcm encoder options, but not this one.
Quite simply because noone has made one. The reasons for that vary, but primarily coming from the fact that FFmpeg cannot mux fully Blu-ray compatible m2ts anyway, and without that pcm_bluray is pretty useless (as mentioned above, outside Blu-ray m2ts the codec is not relevant)
So most people just use tsMuxer or other specialized applications, which already include "encoding" of PCM to Blu-ray PCM (which is just a reshuffling, no actual encoding takes place).
MrVideo
11th July 2017, 00:42
OK, thanks for the update.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.