meaningful label of audio track not retained

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
idiocratease
Posts: 6
Joined: Sun Jan 05, 2020 9:08 pm

meaningful label of audio track not retained

Post by idiocratease »

Description of problem or question:
I have set a preset with e.g. 5.1 DTS to AC3 prologic as the default (1st) track. Then 5.1 DTS to AC3 5.1 as a second option. By defaults it labels both as 5.1 Surround. I can manually edit the label of 1st track to e.g. Pro Logic II. But this is not savable as a custom preset. Also when adding additional track using e.g. batch or single import. The additional tracks are always labelled as 5.1 Surround (both 1st 2CH default track, and the second one, which is indeed 5.1.)

What I ideally want to do is to import all the DVD/Bluray MVK's with their native audio tracks, and transcode to AC3, with a 1st default track as 2Ch or pro logic II and have this label as such, and the second AC3 transcoded track as 5.1 (or maybe just pass through)...

Can you help...


Steps to reproduce the problem (If Applicable):
I have looked at the option of editing the *.json export file, and modifiying ... e.g. here is the naming of the 1st MVK is set up...

"DRC": 2.0,
"Gain": 0,
"MixDown": "dpl2",
"Encoder": 5,
"SampleRate": 48.0,
"EncoderRateType": 0,
"Bitrate": 320,
"Quality": 0.0,
"TrackName": "Stereo",
"ScannedTrack": {
"TrackNumber": 1,
"Language": "English",
"LanguageCode": "eng",
"Description": "English (AC3) (5.1 ch) (448 kbps)",
"Codec": 2048,
"SampleRate": 48000,
"Bitrate": 448000,
"ChannelLayout": 1551,
"Name": "Surround 5.1"


"DRC": 2.0,
"Gain": 0,
"MixDown": "dpl2",
"Encoder": 5,
"SampleRate": 48.0,
"EncoderRateType": 0,
"Bitrate": 320,
"Quality": 0.0,
"TrackName": "Surround 5.1",
"ScannedTrack": {
"TrackNumber": 1,
"Language": "English",
"LanguageCode": "eng",
"Description": "English (AC3) (5.1 ch) (448 kbps)",
"Codec": 2048,
"SampleRate": 48000,
"Bitrate": 448000,
"ChannelLayout": 1551,
"Name": "Surround 5.1"
},


HandBrake version (e.g., 1.0.0):

1.3.0



Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Windows 10 64 bit




HandBrake Activity Log ***required*** (see How-to get an activity log)

Code: Select all

Please replace this text with the contents of your log file between the two code tags - OR -  provide a pastebin URL in place of these 3 lines.
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: meaningful label of audio track not retained

Post by s55 »

Since the track names would typically be considered specific to the source you've scanned, they are not stored in presets.

The only way you could achieve this in an automated way, would be to write a shell script over HandBrakeCLI to parse/process your batch of sources.
idiocratease
Posts: 6
Joined: Sun Jan 05, 2020 9:08 pm

Re: meaningful label of audio track not retained

Post by idiocratease »

Thanks s55... I was thinking this might be a route, however I am not at all versed in writing scripts...if you or anyone could give me a pointer this would be great...

I am in the process of putting my whole blu ray and dvd library onto hard disk, at it makes sense for me to have
1) default track transcoded to ac3 pro logic (or stereo) and labelled as such
2) second track converted to ac3 5.1 (and by default this seems to be labelled correctly...

Anyway, at the very least I do now know that I might have to laboriously correct each track before it’s transcoded...

Thanks !

Alan
Deleted User 11865

Re: meaningful label of audio track not retained

Post by Deleted User 11865 »

The tracks are labeled by MakeMKV, HandBrake is just passing the names through.
idiocratease
Posts: 6
Joined: Sun Jan 05, 2020 9:08 pm

Re: meaningful label of audio track not retained

Post by idiocratease »

s55... update.. again, thanks for the pointers... I have a solution.
1) load the queue
2) export the queue to the .json file.
3) convert json to txt and import into excel, the use an excel macro to find and replace the Surround 5.1 for Pro Logic II (in my case, since I have 2 encodes, a pro logic and a 5.1, and my Pro Logic is the default, I.e 1st entry, it’s the 1st and 3rd entries which need correcting.
4) copy and past the revised instructions into a txt file. Rename to json. Import and run
...
I will upload my Marco in a minute...
idiocratease
Posts: 6
Joined: Sun Jan 05, 2020 9:08 pm

Re: meaningful label of audio track not retained

Post by idiocratease »

This is the macro... n = 2 (i.e. there are 2 encodes which need correcting). Note I am using DRC = 2.0 which i have set for the 5.1 --> AC3 pro logic ii track. It's a useful marker for me to seach on.

Then I need to find the next entry which says "Surround 5.1" and replace this with "Pro Logic II"

I have just done it successfully and now should be straight forward to correct n >>1 files for convesion :)

Sub Macro4()
'
' Macro4 Macro
'

For n = 1 To 2



Cells.Find(What:=" ""DRC"": 2.0,", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
Cells.Find(What:="Surround 5.1", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Replace What:="Surround 5.1", Replacement:="Pro Logic II", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _
False, ReplaceFormat:=False

Next n

End Sub
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: meaningful label of audio track not retained

Post by s55 »

Using Excel to edit a HandBrake Queue ... I don't even know what to say to that :)
idiocratease
Posts: 6
Joined: Sun Jan 05, 2020 9:08 pm

Re: meaningful label of audio track not retained

Post by idiocratease »

It works... I have a queue of 26 Blu-ray in the pot at the moment, and all seems to be working smoothly...3 done some far...
Deleted User 11865

Re: meaningful label of audio track not retained

Post by Deleted User 11865 »

Presumably a good plain text editor could edit the JSON directly though :)
idiocratease
Posts: 6
Joined: Sun Jan 05, 2020 9:08 pm

Re: meaningful label of audio track not retained

Post by idiocratease »

Oh, I had not thought of that...
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: meaningful label of audio track not retained

Post by Woodstock »

Well, a plain text editor that understands UTF-8, at least. Not all do.
Deleted User 11865

Re: meaningful label of audio track not retained

Post by Deleted User 11865 »

Rodeo wrote: Tue Jan 07, 2020 12:59 am Presumably a good plain text editor could edit the JSON directly though :)
Post Reply