I am running ffmpeg script that captures webcam video and microphone audio and then uses video compression before saving the audio/video mp4 file. The script works on my desktop but cause error on my Pi. ffmpeg does not crash but instead says two erros. 1) Queue input is backward in time. 2) Non-monotonous DTS in output stream 0:1; previous: 232, current: 218: changing to 232. This may result in incorrect timestamps in the output file.

ffmpeg command :

 ffmpeg -f v4l2 -thread_queue_size 5000 -framerate 25 -video_size 
 640x480 -i /dev/video0 -thread_queue_size 5000 -f alsa -i plughw:1,0 
 -c:v libx264 -ac 1 -ar 44100 -c:a aac -y 

Is there a fix or does the Pi no have enough ram or something? My ram levels are jumping between 80-98 percent when I run this command.


The bash script was causing crashing becauses it was being fired through nodeJs spawn process. The process size was to big and caused crash. Fixed by configuring spawn process configurations.

  • And what exactly did you do? – RalfFriedl Jul 26 '19 at 18:51
  • Appended the following options to my spawn process child; detached:true and stdio:ignore – z Eyeland Jul 27 '19 at 4:07

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.