Newest 'ffmpeg' Questions - Stack Overflow
Articles published on the website
-
FFMpeg Video & Audio Conversion
6 April 2016, by SivakumarI'm working with ffmpeg command in android. Now my need is to merge all image and audio files to a single video file. It means image to mp4 and audio to mp4, and finally those mp4's to a single mp4. Both are working separately but I could not merge image and audio mp4 files to a single mp4 file.
Below are the commands I used.
For audio to mp4:
ffmpegCmd = new String[]{"ffmpeg", "-i", inputpath, "-c:v", "libx264", "-c:a", "aac", "-strict", "experimental", "-shortest", output_path};
For image to mp4:
ffmpegCmd = new String[]{"ffmpeg", "-loop", "1", "-i", inputpath, "-s", "640x480", "-c:v", "libx264", "-t", "3", outputpath};
Finally merging the two mp4's:
ffmpegCmd = new String[]{"ffmpeg", "-f", "concat", "-i", filesList, "-vcodec", "copy", "-acodec", "copy", "-strict", "experimental", "-shortest", tempStr};
-
How to use fluent-ffmpeg module inside node.js scripts?
6 April 2016, by PrasanthI am using fluent-ffmpeg for compressing the images. Using command prompt png images compression working fine.
I tried to use node script for compressing images. Compressing jpg images working fine, but it is not supporting for png images. When compressing the PNG images below code throwing error. Is there any attributes missing?var targetPath = image path; ffmpeg() .input(targetPath) .complexFilter('scale=486:-1') .save(targetPath);
Please help me to to resolve this issue.
-
python ffmpeg "The system cannot find the file specified" [on hold]
5 April 2016, by k7zhengI'm pretty new to Python but I've been stuck on this for a while.
Whenever I run:
import subprocess, os os.ffmpeg = "/absolute/path/to/ffmpeg" subprocess.ffmpeg = "/absolute/path/to/ffmpeg" subprocess.call(['ffmpeg', '-i', 'C://Users//k7zheng//Desktop//A1//1.avi', '-r', '0.05', "newfiles//%02d.png"])
I get the following:
Traceback (most recent call last): File "C:/Users/k7zheng/Desktop/FT1.py", line 4, in
subprocess.call(['ffmpeg -i C:\\Users\k\Desktop\A1\1.avi -r 0.05 "newfiles\%02d.png"']) File "C:\Python34\lib\subprocess.py", line 537, in call with Popen(*popenargs, **kwargs) as p: File "C:\Python34\lib\subprocess.py", line 859, in __init__ restore_signals, start_new_session) File "C:\Python34\lib\subprocess.py", line 1114, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified Can you help me spot my issue? I've tried:
- changing slashes / to \ to double \ slashes
- getting rid of the 2nd and 3rd lines
- adding os.chdir(r"C:\software\ffmpeg\ffmpeg-20160330-git-be746e-win64-static\bin")
- changing line 4 to subprocess.call('ffmpeg -i c:\users\k7zheng\desktop\c1\1 -r -0.05 "newfiles\%02d.png"', shell=True)
I'm running Python 3.4.4
-
How to set up incoming stream in wowza from a file?
5 April 2016, by Ankit DhannaThe problem is simple. There is an mkv file that is updating in real time.Say it is a destination for live video streaming so its size continuously is being increased.
Question - How can I set up this file as an incoming stream in wowza ?
Is it even possible ?
Can I configure this file in real time to any format that wowza supports ?
-
Firefox, Chrome, Safari have grey background for MP4 HTML5 video
5 April 2016, by JamesAny video (that I can make) with a white background becomes grey in Firefox, Chrome, and Safari (it is white in IE). Well, on my Windows machine it is grey, on my Android phone/tablet and Mac it is white...
I am using ffmpeg to encode the video. If I encode it as webm, the background is white.
See: https://jsfiddle.net/Lbg8f6ck/
I found a hack that fixes it for Chrome:
code>
But it does not work for Firefox or Safari.
Another hack for Firefox:
filter:brightness(1.085)
But for some reason setting it through JavaScript does not work.
A few versions ago the background was white for Chrome, then became grey again...
The question is: Why is white grey?
Is it an issue with the video or with Chrome, Firefox, Safari in general? (How can they not support white?)
Is it possible to get a white background?
Any hacks, workarounds?