Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th July 2017, 03:03   #1  |  Link
MrVideo
Registered User
 
MrVideo's Avatar
 
Join Date: May 2007
Location: Wisconsin
Posts: 2,129
ffmpeg pcm_bluray fails

Consider the following:
Code:
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:
Code:
ffmpeg -codecs | grep bluray
results in pcm_bluray being listed.

So, why doesn't it work?
MrVideo is offline   Reply With Quote
Old 10th July 2017, 05:42   #2  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
No encoder.
Code:
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?

Last edited by sneaker_ger; 10th July 2017 at 05:45.
sneaker_ger is offline   Reply With Quote
Old 10th July 2017, 09:02   #3  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,342
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)
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is online now   Reply With Quote
Old 10th July 2017, 09:56   #4  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
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)
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 10th July 2017, 11:26   #5  |  Link
MrVideo
Registered User
 
MrVideo's Avatar
 
Join Date: May 2007
Location: Wisconsin
Posts: 2,129
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 is offline   Reply With Quote
Old 11th July 2017, 00:10   #6  |  Link
MrVideo
Registered User
 
MrVideo's Avatar
 
Join Date: May 2007
Location: Wisconsin
Posts: 2,129
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.
MrVideo is offline   Reply With Quote
Old 11th July 2017, 00:23   #7  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,342
Quote:
Originally Posted by MrVideo View Post
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).
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is online now   Reply With Quote
Old 11th July 2017, 00:42   #8  |  Link
MrVideo
Registered User
 
MrVideo's Avatar
 
Join Date: May 2007
Location: Wisconsin
Posts: 2,129
OK, thanks for the update.
MrVideo is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:12.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.