music_album_creation.ffmpeg.ffmpeg.ffmpeg   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A FFMPEG.__init__() 0 2 1
1
"""FFMpeg as a Proxy to a Singleton instance using subprocess and ffmpeg CLI.
2
3
Audio options:
4
-aframes number     set the number of audio frames to output
5
-aq quality         set audio quality (codec-specific)
6
-ar rate            set audio sampling rate (in Hz)
7
-ac channels        set number of audio channels
8
-an                 disable audio
9
-acodec codec       force audio codec ('copy' to copy stream)
10
-vol volume         change audio volume (256=normal)
11
-af filter_graph    set audio filters
12
"""
13
from .ffmpeg_proxy import FFMPEGProxy
14
from .ffmpeg_subject import FFMPEGSubject
15
16
17
# Singleton ffmpeg binary
18
class FFMPEG(FFMPEGProxy):
19
    def __init__(self, ffmpeg_binary: str):
20
        super().__init__(FFMPEGSubject(ffmpeg_binary))
21