<commit_before>#!/usr/bin/env python

import os.path
import subprocess

def has_ffmpeg_installed():
    try:
        subprocess.call(['ffmpeg', '-loglevel', '0'])
        return True
    except:
        return False

def ffmpeg_convert_ts_to_mkv(files, output = 'output.mkv'):
    for file in files:
        if os.path.isfile(file):
            params = ['ffmpeg', '-i']
            params.append(file)<commit_msg>avoid using the libav fork of FFmpeg, as in #159<commit_after>#!/usr/bin/env python

import os.path
import subprocess

def has_ffmpeg_installed():
    try:
        p = subprocess.Popen(['ffmpeg', '-version'], stdout=subprocess.PIPE)
        out, err = p.communicate()
        import re
        assert re.search('Libav', str(out, 'utf-8').split('\n')[0]) is None
    except:
        return False
    else:
        return True

def ffmpeg_convert_ts_to_mkv(files, output = 'output.mkv'):
    for file in files:
        if os.path.isfile(file):
            params = ['ffmpeg', '-i']
            params.append(file)
{'fraction_non_alphanumeric': 0.13365853658536586, 'fraction_numerical': 0.005853658536585366, 'mean_word_length': 2.5749128919860627, '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': '1984756', 'n_tokens_mistral': 350, 'n_tokens_neox': 341, 'n_words': 83}