<commit_before>import subprocess
import os


from svtplay_dl.log import log
from svtplay_dl.utils import which


class postprocess(object):
    def __init__(self, stream):
        self.stream = stream
        self.detect = which("avconv")

    def mux(self):
        if self.detect is None:
            log.error("Cant detect ffmpeg or avconv. cant mux files without it")
            return
        if self.stream.finished is False:
            return
        orig_filename = self.stream.options.output
        new_name = "{0}.mp4".format(os.path.splitext(self.stream.options.output)[0])<commit_msg>postprocess: do check for ffmpeg and avconv<commit_after>import subprocess
import os


from svtplay_dl.log import log
from svtplay_dl.utils import which


class postprocess(object):
    def __init__(self, stream):
        self.stream = stream
        self.detect = None
        for i in ["ffmpeg", "avconv"]:
            self.detect = which(i)
            if self.detect:
                break


    def mux(self):
        if self.detect is None:
            log.error("Cant detect ffmpeg or avconv. cant mux files without it")
            return
        if self.stream.finished is False:
            return
        orig_filename = self.stream.options.output
        new_name = "{0}.mp4".format(os.path.splitext(self.stream.options.output)[0])
{'fraction_non_alphanumeric': 0.09165424739195231, 'fraction_numerical': 0.004470938897168405, 'mean_word_length': 2.349127182044888, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4497513', 'n_tokens_mistral': 401, 'n_tokens_neox': 392, 'n_words': 109}