Codefox icon

Untitled

Codefox | PRO | 05/23/14 01:06:54 PM UTC | 0 ⭐ | 795 👁️ | Never ⏰ | []
Python |

1 KB

|

None

|

0 👍

/

0 👎

    if re.match('.*, gif, from.*', infos, re.DOTALL):
        pipe = subprocess.Popen([ffmpeg_bin,
                            '-y',  # force overwrite
                            '-i', chunked_file.file.name,
                            '-f', 'webm',
                            '-c:v', 'libvpx',
                            '-crf', '12',
                            '-b:v', '500K',
                            chunked_file.file.name],  # output to original file
                            stdout=subprocess.PIPE,
                            stderr=subprocess.PIPE)
 
        pipe.wait()
 
        pipe = subprocess.Popen([ffmpeg_bin,
                                '-i', chunked_file.file.name],
                                stdout=subprocess.PIPE,
                                stderr=subprocess.PIPE)
 
        pipe.stdout.readline()
        infos = pipe.stderr.read()
    elif not re.match('.*matroska,webm,.*', infos, re.DOTALL):
        return AjaxResponseError({'error': 'wrongformat'})

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎