0

I have a bash script to capture images using the webcam and it depended on ffmpeg. I recently upgraded from 13.10 to 14.04 and noticed that ffmpeg was removed and this script wouldn't work anymore. Searching led me to answers that suggested adding some ppa to repository and install ffmpeg. But I do not want to add any unofficial ppa. What to do? What is the official substitute for ffmpeg?

3
  • @Sneetsher I did see that q&a you refer, but that is a very broad discussion, even suggesting adding unofficial repository. My question is very specific and I am very clear about not adding unofficial repository. My own one line answer is exactly what needs to be done to solve the issue raised in my question. Hence, I would not consider this as a duplicate.
    – Sri
    Sep 28, 2014 at 14:32
  • Actually, 2nd high votes answer suggests to replace ffmpeg with avconv (from libav which is a fork of ffmpeg). It has almost same syntax.
    – user.dz
    Sep 28, 2014 at 17:41
  • Even though I am a die-hard Linux Ubuntu convert, I didn't notice the 2nd answer because I was already out of patience with the long discussion in the 1st answer. Moreover, I also don't understand that if Ubuntu has a simple replacement for ffmpeg in avconv, why doesn't the community simply highlight that, instead of going on about doing umpteen patches etc., and creating confusion for average users.
    – Sri
    Sep 28, 2014 at 19:07

1 Answer 1

2

The script I used is as below:

#!/bin/bash
ts=`date +%s`
ffmpeg -f video4linux2 -s vga -i /dev/video0 -vframes 3 Downloads/grab-$ts.%01d.jpg
exit 0  #important - has to exit with status 0

Some search suggested using avconv, so I replaced the ffmpeg with avconv and the script worked as before.

avconv -f video4linux2 -s vga -i /dev/video0 -vframes 3 Downloads/grab-$ts.%01d.jpg

Not the answer you're looking for? Browse other questions tagged .