Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
How to access video frames from external process ?
15 septembre 2019, par gaamaaWindows 32 bit application memory limit is around 2gb approximately. I need to play 4 to 8 HD video files or live camera graphs. Which is not possible by a single 32 bit application. So I would like to play each graph in separate 32 bit application and access those video frames from my main application. In this case I could manage my need.
Could some experts give me some clue to do this if c++ ?
Is there any ready solution to achieve this ?
gaamaa
-
Converting multiple ffmpeg command into one line (burn subtitle & watermark)
14 septembre 2019, par Ammad Khalidi'm first burning subtitles of mkv and then adding watermark which is taking so long to convert one video. It takes like x2 time i guess. For example on my current server it takes 30 min on each command. My server may not be good enough. But i was thinking if there way to do this in one command instead? will it effect the speed? i really have almost zero knowledge on ffmpeg:
here is command for burning subtitle. I'm using python for achieving this:
ffmpeg -i subtitles=/Users/Test/Desktop/test.mkv -vf subtitles=subtitles=subtitles=/Users/Test/Desktop/test.mkv -c:v libx264 -c:a aac -preset ultrafast -strict -2 /Users/Test/Desktop/test.mp4
command for adding watermark:
ffmpeg -i /Users/Test/Desktop/test.mp4 -i /Users/Test/Desktop/watermark-logo.png -filter_complex "[1][0]scale2ref=w='iw*10/100':h='ow/mdar'[wm][vid]; [vid][wm]overlay=main_w-overlay_w-5:main_h-overlay_h-5" /Users/Test/Desktop/output.mp4
If there are more ways to speed up then kindly let me know. All i want to achieve this faster and expecting best result. Thank you.
-
FFMPEG audio plays faster then video after conversion
14 septembre 2019, par Yevhen NalisnyiI have code which geting raw videos from one folder and adding intro and outro videos individually to each of them. There is only one issue. After convertion audio plays faster then video. What should I change or apply?
ffmpeg -i intro.mp4 -r 30 -c:v libx264 -c:a libmp3lame -crf 22 -preset ultrafast -c:a libmp3lame intro-converted.mp4 ffmpeg -i outro.mp4 -r 30 -c:v libx264 -c:a libmp3lame -crf 22 -preset ultrafast -c:a libmp3lame outro-converted.mp4 cd input for %%f in (*.mp4) do ( echo %%f ffmpeg -i %%f -i ..\overlay.png -filter_complex "[1:v]scale=320:-1,format=rgba,colorchannelmixer=aa=1[fg];[0][fg]overlay=950:645:enable='between(t,0,240)'" -r 30 -pix_fmt yuv420p -c:v libx264 -preset ultrafast -crf 22 -c:a libmp3lame ..\temp-%%f echo file '..\intro-converted.mp4' > ..\list.txt echo file '..\temp-%%f' >> ..\list.txt echo file '..\outro-converted.mp4' >> ..\list.txt ffmpeg -f concat -safe 0 -i ..\list.txt -r 30 -pix_fmt yuv420p -c:v libx264 -preset ultrafast -crf 22 -c:a libmp3lame ..\output\%%f del ..\temp-%%f ) cd ..
-
How to use audio volume data to affect other filters in FFMPEG ?
14 septembre 2019, par Dan WeaverIs it possible to use the audio level to affect other filter parameters in FFMPEG?
Use case would be to use the audio level of a video file to affect the
zoompan
filter so the video stream is scaled up and down with changes in the audio level.I looked at the audio filters but can't find anything so far that outputs the audio level as data.
Example: extract the audio level at each frame (assuming audio level is output 0.0-1.0)
level = [0, 0.01, 0.03, 0.07, 0.1, 0.4, 0.35, 0.2, 0.05, 0.01, 0.0]
then use
level
in as a parameter in a video filter like scale or zoompan. -
how to enumerate codec specific parameters (encoding qualities and presets) in ffmpeg
14 septembre 2019, par blackcatI'm using libavcodec to encode captured video. When using ffmpeg utility we can setup encoding quality, encoding preset and bitrate. But how to check what values are available, i suppose it's possible as ffmpeg enumerate them somehow?