2b08 video_raw_sink issues
in
Contributed Library Questions
•
4 months ago
Hi All,
trying to play some videos with the new processing and I'm having some troubles finding a compression setting that consistently works. I am currently using h264 mp4's and I get a java warning:
'gstvideo: failed to get caps of pad playsink1:video_raw_sink
gstvideo: failed to get framerate property of playsink1:audio_raw_sink'
and the video does not play. It seems like it may be an issue with trying to capture the duration property of the video. It seems to play when I don't track the progress.
Here's my video class:
- class VideoNode extends ImgNode {
- Movie movie;
- Ani fader;
- float slideIn, movDur;
- VideoNode (int _id, String _imgUrl, String _vidUrl) {
- super(_id, "video", _imgUrl);
- movie = new Movie(root, _vidUrl);
- movDur = movie.duration();
- slideIn = width;
- }
- void click() {
- if(world.activeChart != null){
- if(world.activeChart.contains(this)){
- super.click(world.activeChart);
- } else {
- super.click();
- }
- } else {
- super.click();
- }
- world.videoNode = this;
- Ani.to(this, 2, 1, "slideIn", 0, Ani.EXPO_IN_OUT);
- movie.play();
- movDur = int(movie.duration());
- println("about to play video " + movie + " : " +movDur);
- }
- void returnToWorld() {
- movie.pause();
- Ani.to(this, 2, "slideIn", width, Ani.EXPO_OUT, "onEnd:slideOut");
- }
- void slideOut() {
- world.videoNode = null;
- hasPlayed = false;
- movie.stop();
- }
- void displayVid() {
- fill(255);
- rect(slideIn+width/2, height/2, width, height);
- movie.read();
- pushMatrix();
- translate(width/2, height/2);
- rotate(world.activeChart.siblings[0].rotation);
- translate(-width/2, -height/2);
- image(movie, slideIn+width/2, height/2, width, height);
- popMatrix();
- if (movie.time() >= movDur) {
- returnToWorld();
- }
- }
- }
Thanks dudes!
ak
1