Skip to content

Commit

Permalink
added debug logger output to see results of existing mc streams test
Browse files Browse the repository at this point in the history
  • Loading branch information
yajrendrag committed Apr 7, 2024
1 parent 7a4cc73 commit 1deb181
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions source/add_extra_multichannel_audio/changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

**<span style="color:#56adda">0.0.16</span>**
- added debug logger output for testing existing multichannel streams

**<span style="color:#56adda">0.0.15</span>**
- comment out data['add_file_to_pending_tasks'] = False in file test so subsequent plugins can test file

Expand Down
2 changes: 1 addition & 1 deletion source/add_extra_multichannel_audio/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"on_worker_process": 0
},
"tags": "audio,encoder,ffmpeg,library file test",
"version": "0.0.15"
"version": "0.0.16"
}
2 changes: 2 additions & 0 deletions source/add_extra_multichannel_audio/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ def s2_encode(probe_streams, encoder, replace_original, abspath):
existing_mc_stream = [i for i in range(0, len(probe_streams)) if "codec_type" in probe_streams[i] and probe_streams[i]["codec_type"] == 'audio' and probe_streams[i]["codec_name"] == encoder and probe_streams[i]["channels"] == 6]
mc_stream_exists_already = [existing_mc_stream[i] for i in range(0, len(existing_mc_stream)) if "tags" in probe_streams[existing_mc_stream[i]] and "language" in probe_streams[existing_mc_stream[i]]["tags"] and probe_streams[existing_mc_stream[i]]["tags"]["language"] in probe_streams[absolute_stream_num]["tags"]["language"]]
if mc_stream_exists_already == []:
logger.debug("Existing mc stream test: '{}'".format(existing_mc_stream))
logger.debug("audio stream to encode: '{}', new audio stream: '{}', absolute stream: '{}'".format(audio_stream_to_encode, new_audio_stream, absolute_stream_num))
return audio_stream_to_encode, new_audio_stream, absolute_stream_num, True
else:
logger.info("6 channel '{}' stream with matching language already exists, skipping file '{}'".format(encoder, abspath))
Expand Down

0 comments on commit 1deb181

Please sign in to comment.