Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
ffmpeg uploaded file store path on cms
3 avril 2016, par Samir KarmacharyaIm using opencart and im trying to upload any video type and convert to mp4 format. c:\ffmpeg\bin\ffmpeg -i D:\xampp\tmp\php81B6.tmp -vcodec copy -acodec copy image/video/video.mp4 and also try using absolute path "c:\ffmpeg\bin\ffmpeg -i D:\xampp\tmp\php81B6.tmp -vcodec copy -acodec copy D:/xampp/htdocs/abc/image/video/video.mp4"
but unable to convert and move on my desire path.working code for core php`<?php if(isset($_POST['submit'])){ $ffmpeg="c:\\ffmpeg\\bin\\ffmpeg"; $file_name=$_FILES['file']['name']; $file_name=str_replace(' ','_', $file_name); $videoFile=$_FILES['file']['tmp_name']; $imageFile=$file_name.'.jpg'; $getFromSecond=5; $size="720*590"; $cmd="$ffmpeg -i $videoFile -an -ss $getFromSecond -s $size $imageFile";//ffmpeg code $cmd_video="$ffmpeg -i $videoFile -vcodec copy -acodec copy beight.mp4";//ffmpeg code if(!shell_exec($cmd)){ echo "thumbnail created"; }else{ echo "error"; } if(!shell_exec($cmd_video)){ echo "video create"; }else{ echo 'vidoe fail'; } } ?>`
above code create image and video convert but unable in cms due to path may be
-
Python capture subprocess output
3 avril 2016, par Kendall WeiheI'm working on a tensorflow project that learns from an audio stream. I'm using the subprocess module (with
Popen
) and FFMPEG to read in the audio data from an mp3. I successfully open the audio file withPopen()
and I can print the output throughstdout
. However, I can't seem to capture it.I have tried both
read()
andcommunicate()
I'm following a tutorial here
read()
simply returns nothing andcommunicate()
throws the error:AttributeError: 'file' object has no attribute 'communicate'
Here's my code:
for image_index, image in enumerate(image_files): count += 1 image_file = os.path.join(folder, image) try: output_files = "output/output" + str(count) + ".png" if image_file != 'train/rock/.DS_Store': command = [FFMPEG_BIN, '-i', image_file, '-f', 's16le', '-acodec', 'pcm_s16le', '-ar', '44100', '-ac', '2', output_files] pipe = sp.Popen(command, stdout=sp.PIPE) print (pipe) raw_audio = pipe.stdout.communicate(88200*4)
-
node-mlt - setting argument for watermark
3 avril 2016, par Ali DavudovI have get project where server get json file and media file and convert to xml. Server use mlt with node-mlt lib. My task is add watermark. I did it, but I can't find any description for node-mlt method arguments except URL to file. node-mlt have example:
var watermark = new MLT.Filter.Watermark({resource:'/home/jeffrey/Desktop/signature.jpg'});
Does anybody know how I must setting opacity, size, position for this method? Standard arguments for mlt this lib don't recognize.
-
Lossy compression for video files before being uploaded on server (Django web app)
2 avril 2016, par Hassan BaigI need a bit of guidance. I have a Django app, where users upload photos and captions.
I want to integrate video uploading and playback as well. My question revolves specifically around video file size.
Most of my users have bandwidth issues. It's best if uploaded videos are as small a size as possible (quality can be compromised upon, it can be lossy). What's the best currently-supported Python library to get me started on this (an illustrative example)? I do something similar for photos uploaded on my site using Python Imaging Library.
Pyffmpeg seems to be the closest fit so far. But it doesn't seem to be supported any longer, nor do I find examples of what I'm trying to achieve. ffmpeg seems to be well documented however.
-
How can I hide a text on udp video streaming ?
2 avril 2016, par c0rnw19