![]() ![]() seek ( 0 ) return self def _exit_ ( self, exc_type, exc_val, exc_tb ): if os. join ( tmpdir_path, 'output_file' ) with open ( self. join ( tmpdir_path, 'input_file' ) self. _result = result def _enter_ ( self ): tmpdir_path = super (). TemporaryDirectory ): def _init_ ( self, source, result ): super (). loads ( string_result ) return json_obj def _get_decoder_and_stream_type ( probe_data ): decoder_name = probe_data stream_type = '' for stream in probe_data : if stream = 'video' : stream_type = 'video' break elif stream = 'audio' : stream_type = 'audio' return decoder_name, stream_type class _FFmpegContext ( tempfile. PIPE, check = True ) string_result = result. name ) result = subprocess_run ( command, stdout = subprocess. seek ( 0 ) command = 'ffprobe -loglevel error -print_format json -show_format -show_streams'. ![]() NamedTemporaryFile ( mode = 'wb' ) as temp_in : shutil. ![]() Import io import json import multiprocessing import os import shutil import subprocess import tempfile from bidict import bidict from re import Asset, MetadataProcessor, Processor, operator, OperatorError, UnsupportedFormatError from madam.future import CalledProcessError, subprocess_run def _probe ( file ): with tempfile. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |