Skip to content

Commit

Permalink
update write
Browse files Browse the repository at this point in the history
  • Loading branch information
faroit committed May 13, 2024
1 parent 3275ca0 commit f3fd8ef
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions stempeg/write.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import stempeg

from .cmds import FFMPEG_PATH, mp4box_exists, get_aac_codec, find_cmd
from .cmds import FFMPEG_PATH, MP4BOX_PATH, mp4box_exists, get_aac_codec, find_cmd


def _build_channel_map(nb_stems, nb_channels, stem_names=None):
Expand Down Expand Up @@ -497,7 +497,6 @@ def __init__(
'Please install them before using NIStemsWriter().'
'See: https://github.com/faroit/stempeg'
)
self.mp4boxcli = find_cmd("MP4Box")
self.bitrate = bitrate
self.default_metadata = default_metadata
self.stems_metadata = stems_metadata
Expand Down Expand Up @@ -564,7 +563,7 @@ def __call__(
if self.stems_metadata is not None:
metadata['stems'] = self.stems_metadata

callArgs = [self.mp4boxcli]
callArgs = [MP4BOX_PATH]
callArgs.extend(["-add", str(Path(tempdir, '0.m4a#ID=Z')), path])
for s in range(1, data.shape[0]):
callArgs.extend(
Expand Down Expand Up @@ -758,7 +757,7 @@ def write_stems(
"""
# check if ffmpeg installed
if int(stempeg.ffmpeg_version()[0]) < 3:
warnings.warning(
warnings.warn(
"Writing stems with FFMPEG version < 3 is unsupported",
UserWarning
)
Expand Down

0 comments on commit f3fd8ef

Please sign in to comment.