Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Processing 3 : using background subtraction, video not playing

I am trying to run simple processing program in eclipse to play video. this is the code:

import processing.core.*; import processing.video.*;

public class BackgroundSubtraction extends PApplet {

Movie video;

public void setup(){
size(720,480);
 video = new Movie(this,"/home/gurinderbeer/Desktop/new/Gurbinder/data/mv2_002.avi");  
video.loop();
video.play();
}

public void draw() {
image(video, 0, 0); 
}

   public void movieEvent(Movie m) {
  m.read();
}
}

when I run the program, it gives no error. Applet pops-up but video is not playing in applet. I can hear the audio when i run the program, but no visuals on applet. Can anyone please help...! Thanks

like image 779
Gurinderbeer Singh Avatar asked Aug 09 '26 16:08

Gurinderbeer Singh


1 Answers

I had a similar issue while running on Ubuntu 14.04 64 bit. The error seems to be due to missing FFmeg plugin for GStreamer 0.10. This plugin is not available in the official Ubuntu 14.04 repositories.

Look at this issue. Assuming it's 14.04 64 bit, try installing the FFmeg plugin as try the code again.

sudo apt-add-repository ppa:mc3man/trusty-media

sudo apt-get update

sudo apt-get install ffmpeg gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-gnonlin gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly totem-plugins-extra gstreamer-tools ubuntu-restricted-extras libxine1-ffmpeg gxine mencoder mpeg2dec vorbis-tools id3v2 mpg321 mpg123 libflac++6 totem-mozilla icedax tagtool easytag id3tool lame nautilus-script-audio-convert libmad0 libjpeg-progs flac faac faad sox ffmpeg2theora libmpeg2-4 uudeview flac libmpeg3-1 mpeg3-utils mpegdemux liba52-0.7.4-dev libquicktime2
like image 148
Anshuman Biswas Avatar answered Aug 11 '26 06:08

Anshuman Biswas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!