I am getting this message with the crash in my app whenever I am trying to add a watermark to the video[Specific video].

also, this message and crash are caused by the only specific video that I shoot using a screen recorder app on my smartphone.

there are more than 100 videos on my mobile but 2 or 3 videos causing this problem which are shoot in the screen recorder app.

size and duration of those videos:

  1. size is less than 5MB
  2. duration is less than 5 second

I am using this library: Bravobit FFMPEG

implementation 'nl.bravobit:android-ffmpeg:1.1.7'

FFmpeg command I am trying for adding watermark:

ffmpeg -i /storage/emulated/0/EZ-VideoRecorder/20200121-092724.mp4 -i /data/user/0/com.shotonvideostamp.shotonstampcameragallery/app_pic_process/stampvid.jpg -vsync vfr -filter_complex overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2 -pix_fmt yuv420p -c:a copy -movflags +faststart -preset ultrafast /storage/emulated/0/DCIM/Shot on Video/ShotOnVideo_2020-02-20_10:02:40.mp4

The same command I try in windows 10 FFmpeg[cmd] for the same video and it working fine

ffmpeg -i 20200121-092724.mp4 -i stampvid.jpg -vsync vfr -filter_complex overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2 -pix_fmt yuv420p -c:a copy -movflags +faststart -preset ultrafast ShotOnVideo_2020-02-20_10:02:40.mp4
  • I don't think your supposed to use colon's in a filename, have you tried it without using filenames with colons? – vssher Feb 20 at 4:54
  • yes I tried it's working fine for other videos – Milan Tejani Feb 20 at 5:13
  • Not a user of FFMpeg, but are you sure you didn't miss double quotes on the end since there are whitespaces on the path? "/storage/emulated/0/DCIM/Shot on Video/ShotOnVideo_2020-02-20_10:02:40.mp4" – Andrew T. Feb 24 at 20:23
  • It's not specifically about Android or any other OS. It's related to ffmpeg library. A web search shows relevant things: duckduckgo.com/?q=%22Input+buffer+exhausted%22 You should ask the developer or create an issue. – Irfan Latif Feb 24 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.