Skip to content

Commit 05c2b17

Browse files
committed
feature: user-menu: add convertMovToMp3
1 parent d99dfd3 commit 05c2b17

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

menu/ffmpeg.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const isMp3 = (a) => /\.mp3$/.test(a);
33
export default {
44
'F - Convert flac to mp3': convertFlacToMp3,
55
'M - Convert mp4 to mp3': convertMp4ToMp3,
6+
'O - convert mov to mp3': convertMovToMp3,
67
};
78

89
export async function convertFlacToMp3({DOM, CloudCmd}) {
@@ -21,6 +22,14 @@ export async function convertMp4ToMp3({DOM, CloudCmd}) {
2122
});
2223
}
2324

25+
export async function convertMovToMp3({DOM, CloudCmd}) {
26+
const command = 'for f in *.MOV; do ffmpeg -i "$f" -filter_complex "[0:a]join=inputs=2:channel_layout=stereo" "${f%mp4}mp3"; done';
27+
await convert(command, {
28+
DOM,
29+
CloudCmd,
30+
});
31+
}
32+
2433
async function convert(command, {DOM, CloudCmd}) {
2534
const {IO, Dialog, CurrentInfo} = DOM;
2635

0 commit comments

Comments
 (0)