<commit_before>var util = require('util')
var exec = require('child_process').exec;


module.exports = {

    convert: function(){

        var sources = './exports/merge/%05d.jpg';
        var destMP4 = './exports/video.mp4';
        var destOGG = './exports/video.ogg';

        console.log('start video encoding'.cyan);
        /*
         * -i input name
         * -r framerate
         * -y overwrite
         * -qscale 1 > max quality
         */
        exec("ffmpeg -r 10 -y -qscale 1 -i "+sources+" "+destMP4, function(error, stdout, stderr){
        //exec("~/bin/ffmpeg -r 10 -y -i "+sources+" -vcodec libx264 -preset slow -crf 24 -pix_fmt yuv420p "+destMP4+"", function(error, stdout, stderr){
            console.log('MP4 video encoded'.green);

            if (error !== null) {
                console.log('exec error: '.red + error);
            }

            exec("ffmpeg -r 10 -y -qscale 15 -i "+sources+" "+destOGG, function(error, stdout, stderr){
            //exec("~/bin/ffmpeg -r 10 -y -i "+sources+" "+destOGG, function(error, stdout, stderr){
                console.log('OGG video encoded'.green);

                if (error !== null) {
                    console.log('exec error: '.red + error);
                }
            });
        });
    }
};<commit_msg>Activated h264 encoding<commit_after>var util = require('util')
var exec = require('child_process').exec;


module.exports = {

    convert: function(){

        var sources = './exports/merge/%05d.jpg';
        var destMP4 = './exports/video.mp4';
        var destOGG = './exports/video.ogg';

        console.log('start video encoding'.cyan);
        /*
         * -i input name
         * -r framerate
         * -y overwrite
         * -qscale 1 > max quality
         */
        //exec("ffmpeg -r 10 -y -qscale 1 -i "+sources+" "+destMP4, function(error, stdout, stderr){
        exec("~/bin/ffmpeg -r 10 -y -i "+sources+" -vcodec libx264 -preset slow -crf 24 -pix_fmt yuv420p "+destMP4+"", function(error, stdout, stderr){
            console.log('MP4 video encoded'.green);

            if (error !== null) {
                console.log('exec error: '.red + error);
            }

            //exec("ffmpeg -r 10 -y -qscale 15 -i "+sources+" "+destOGG, function(error, stdout, stderr){
            exec("~/bin/ffmpeg -r 10 -y -i "+sources+" "+destOGG, function(error, stdout, stderr){
                console.log('OGG video encoded'.green);

                if (error !== null) {
                    console.log('exec error: '.red + error);
                }
            });
        });
    }
};
{'fraction_non_alphanumeric': 0.1617873651771957, 'fraction_numerical': 0.021956856702619414, 'mean_word_length': 1.7716115261472785, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1825626', 'n_tokens_mistral': 855, 'n_tokens_neox': 782, 'n_words': 210}