Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
How can I check compression type(lossless or lossy) for .wav, .flac and .m4a in python ?
20 juin 2017, par MichaelHow can I check compression type (lossless or lossy) for .wav, .flac and .m4a in python?
-
How to force libav to update duration for a growing file ?
20 juin 2017, par skrewI have a video player in C who read files on local and distant network.
All works fine except for growing files (EG: a tv show currently in recording mode).
Is there a way to force the current context to update duration ? A flag in AVFormatContext ?
-
After a clean install of OpenCV via pip it throws an ImportError : DLL load failed
20 juin 2017, par Kev1n91After installing OpenCV via pip on Windows 10 with:
pip install opencv-python
I can not import the module. When executing the command:
import cv2
I get the error:
File "C:\ProgramData\Anaconda3\lib\site-packages\cv2__init__.py", line 7, in from . import cv2
ImportError: DLL load failed:...
If I look into the file throwing the code, it looks like the following:
import sys import os # FFMPEG dll is not found on Windows without this os.environ["PATH"] += os.pathsep + os.path.dirname(os.path.realpath(__file__)) from . import cv2 sys.modules['cv2'] = cv2
So I guess it is ffmpeg which is missing. Thus I installed ffmpeg like described here: http://www.wikihow.com/Install-FFmpeg-on-Windows
Thus, ffmpeg is in my path. However, the error message still occurs. I also tried to install the ffmpeg via pip with
pip install ffmpeg-normalize
But this did not help either.
-
ffmpeg send video to one process and audio to another
20 juin 2017, par mooI'm using Sailfish OS (Linux), and have built ffmpeg with the hope of using the ffplay player. Video works fine, but audio doesn't work and I think ffplay would need to be patched to use libaudioresource, which is beyond my skills (others have verified the problem).
However, the pulseaudio paplay and pacat commands work fine, so for example, I can do:
ffmpeg -i file.mp4 -f wav - | paplay
What I'm trying to achieve, is to send video to ffplay and audio to paplay, but the best solution I've found so far, is:
ffmpeg -i file.mp4 -f avi - | tee >(ffplay -) >(ffmpeg -i - -f wav - | paplay) > /dev/null
This is not very efficient though, and whilst it works, it breaks up frequently, and I was hoping there was a better way of achieving this, using -map 0:a and -map 0:v or FIFOs of something? Any suggestions much appreciated.
Thanks
-
Bash - Not able to replace the variable in ffmpeg subtitle
20 juin 2017, par Steven FoongI have 175 mp4 video files and subtitle file with extension ass. Unfortunately my smart TV not able to read the subtitle title. I plan to burn (hardcode) the subtitle into the video.
I use this command
ffmpeg -i orgvideo.mp4 -vf subtitles="subtitle.ass" newvideo.mp4
it work. So I plan to use bash shell script to automate the process.
Everything is the script is working , but the ffmpeg command line wouldn't able to retrieve the subtitle variable.
After google around, I found that my file name has special character and space, that cause my script not working. If the video file name and the subtitle file is simple, then the script should be no problem.
This is my script.
for f in *.mp4 do new="${f%%.mp4} (CHT).mp4" subtitle="${f%%.mp4}.chi.ass" < /dev/null ffmpeg -i "$f" -vf subtitles="$subtitle" "$new" done
The ffmpeg having problem reading the subtitle file variable. Anyone can help?