Compare commits
6 Commits
71456e74c2
...
v0.1.3
| Author | SHA1 | Date | |
|---|---|---|---|
| 90d5845755 | |||
| f0fdaf6f8e | |||
| 13cc1841d6 | |||
| 870be59ea9 | |||
| 2f97637b5f | |||
| f78de5c9b6 |
17
bin/ffx.py
17
bin/ffx.py
@@ -116,7 +116,7 @@ audioStreams = [s for s in streamData if s['codec_type'] == 'audio']
|
||||
subtitleStreams = [s for s in streamData if s['codec_type'] == 'subtitle']
|
||||
|
||||
for aStream in audioStreams:
|
||||
if 'channel_layout' in aStream.keys():
|
||||
if 'channel_layout' in aStream:
|
||||
print(f"audio stream: {aStream['channel_layout']}") #channel_layout
|
||||
else:
|
||||
print(f"unknown audio stream with {aStream['channels']} channels") #channel_layout
|
||||
@@ -169,6 +169,8 @@ for aStream in audioStreams:
|
||||
if channels == 6:
|
||||
audioTokens += [f"-c:a:{audioStreamIndex}",
|
||||
'libopus',
|
||||
f"-filter:a:{audioStreamIndex}",
|
||||
"channelmap=FL-FL|FR-FR|FC-FC|LFE-LFE|SL-BL|SR-BR:5.1",
|
||||
f"-b:a:{audioStreamIndex}",
|
||||
ac3Bandwidth]
|
||||
|
||||
@@ -185,17 +187,16 @@ for quality in qualities:
|
||||
|
||||
commandSequence = commandTokens + mappingTokens + generateAV1Tokens(quality, preset) + audioTokens
|
||||
|
||||
if cropStart:
|
||||
commandSequence += generateCropTokens(cropStart, cropLength)
|
||||
|
||||
if len(qualities) > 1:
|
||||
commandSequence += generateOutputTokens(outputFilename, quality)
|
||||
else:
|
||||
commandSequence += generateOutputTokens(outputFilename)
|
||||
|
||||
if cropStart:
|
||||
commandSequence += generateCropTokens(cropStart, cropLength)
|
||||
|
||||
print(f"Command: {' '.join(commandSequence)}")
|
||||
|
||||
print(f"Command Sequence: {commandSequence}")
|
||||
|
||||
executeProcess(commandSequence)
|
||||
|
||||
|
||||
@@ -210,7 +211,7 @@ for quality in qualities:
|
||||
commandSequence1 += nullTokens
|
||||
|
||||
|
||||
print(f"Command Sequence 1: {commandSequence1}")
|
||||
print(f"Command 1: {' '.join(commandSequence1)}")
|
||||
|
||||
if os.path.exists(TEMP_FILE_NAME):
|
||||
os.remove(TEMP_FILE_NAME)
|
||||
@@ -230,7 +231,7 @@ for quality in qualities:
|
||||
commandSequence2 += generateOutputTokens(outputFilename)
|
||||
|
||||
|
||||
print(f"Command Sequence 2: {commandSequence2}")
|
||||
print(f"Command 2: {' '.join(commandSequence2)}")
|
||||
|
||||
executeProcess(commandSequence2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user