def test_video_settings_width(): target = VideoSettings(codec=Codec("AVC"), quality=25, preset="slow", width=720, encoder="software") assert str( target ) == " -map 0:v:0 -map 0:s? -c:s copy -vcodec h264 -preset slow -crf 25 -vf scale=720:-2"
def target(): audio_settings = AudioSettings(codec=Codec("AAC"), channels=2, bitrate=120) video_settings = VideoSettings(codec=Codec("HEVC"), quality=25, preset="slow", encoder="software") return VideoProcessor( video=Video("bar.mkv", "/asdf/foo"), video_settings=video_settings, audio_settings=audio_settings, container="asdf", in_place=False, dry_run=False, )
def target(): audio_settings = AudioSettings(codec=Codec("AAC"), channels=2, bitrate=120) video_settings = VideoSettings(codec=Codec("HEVC"), quality=25, preset="slow", encoder="software") return FFmpegConverter( source_file_path="/asdf/foo/bar.mkv", video_settings=video_settings, audio_settings=audio_settings, destination_file_path="/asdf/temp/path.mkv", extra_ffmpeg_input_args="", extra_ffmpeg_output_args="", dry_run=False, )
def test_video_settings_avc(): target = VideoSettings(Codec("AVC"), 25, "slow", None) assert str( target ) == " -map 0:v:0 -map 0:s? -c:s copy -vcodec h264 -preset slow -crf 25"
def test_video_settings_hevc_intel(): target = VideoSettings(Codec("HEVC"), 25, "slow", encoder="intel") assert str( target ) == " -map 0:v:0 -map 0:s? -c:s copy -vcodec hevc_qsv -preset slow -global_quality 25 -strict -2"
def test_video_settings_hevc_nvidia(): target = VideoSettings(Codec("HEVC"), 25, "slow", encoder="nvidia") assert str( target ) == " -map 0:v:0 -map 0:s? -c:s copy -vcodec hevc_nvenc -preset slow -rc constqp -qp 25 -b:v 0 -strict -2"
def test_video_settings_hevc(): target = VideoSettings(Codec("HEVC"), 25, "slow", None) assert str( target ) == " -map 0:v:0 -map 0:s? -c:s copy -vcodec libx265 -preset slow -crf 25 -strict -2"
def test_video_settings_avc_intel(): target = VideoSettings(Codec("AVC"), 25, "slow", encoder="intel") assert str( target ) == " -map 0:v:0 -map 0:s? -c:s copy -vcodec h264_qsv -preset slow -global_quality 25 -look_ahead 1"