[FFmpeg-user] Loss of audio frames when adding watermark using ffmpeg
Venkata Satya Vara Prasad Musunuru
varaprasad.musunuru at suresby.net
Fri Dec 22 09:42:33 EET 2023
Hi,
Following is the sample watermark command
D:/test/ffmpeg.exe -i D:/test/index-720p194.ts -i D:/test/watermark.png -filter_complex "[1][0]scale2ref=w='iw*40/100':h='ow/mdar'[wm][vid];[vid][wm]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2"
-preset fast -codec:v libx264 -c:a aac -s:v 1280x720 -b:v 1500k -maxrate:v 1500k -bufsize:v 750k -copyts -y D:/test/tmp-index-720p194.ts
This command is working and I can see watermark overlayed.
But this is causing loss of audio
Can you suggest what arguments I need to pass so that I will not loose audio frames
and regenerate correct timestamps
When I run this fragment using hls.js
I get following error Audio frame @ 582.005s overlaps nextAudioPts by -46 ms.
Thanks
Vara Prasad
More information about the ffmpeg-user
mailing list