We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I am trying to load a video using GSPipeline, but specifying the absolute path of the file with datacaps "filesrc=video.avi" doesn't work. I don't know what I'm doing wrong here:
pipeline = new GSPipeline(this, "filesrc location=video.avi ! video/x-raw-yuv" , GSVideo.VIDEO);
Where is the pipeline command reading from? What directory is it trying to read from? Andres, somebody please help this is driving me crazy!
Answers
Have you tried to give an absolute path? If the file is in the data folder, you can try something like:
pipeline = new GSPipeline(this, "filesrc location=" + dataPath("video.avi") + " ! video/x-raw-yuv" , GSVideo.VIDEO);
pipeline = new GSPipeline(this, "filesrc location=" + dataPath("E:/Diatom/Diatom_1_5/movie/TremulousEnnuithisistheancientdiscipline.avi") + "! video/x-raw-yuv");
PhiLho, this technique does not work. Yes, that is the audio example provided in the GSVideo library, but everytime I run it I get an off-white colored screen, no movement, no sound, no nothing. I don't know what I'm doing wrong. There's no spaces in the absolute path either. Where are you Andres Colubri? I can't be the only one who is experiencing this issue.
Mmm, you are mixing up things... Either you use dataPath() like I did, to get an absolute path to your file in the data folder, wherever it is. Or you give an absolute path directly, without using dataPath().
Hi, wouldn't be better just to use the GSMovie object to load a movie file?
Anyways, this GSPipeline works (note the file uri):
Thank you, Andres. I will try that. The reason I want to use GSPipeline over GSMovie is that I read that displaying video in YUV with the data caps "video/x-raw-yuv" is faster than displaying it in RGB with GSMovie. I wanted to see if that was true, so I've been since trying to use pipelines.
I tried using uridecodebin and playbin, but with no success. Whenever I run the sketch the screen within the frame is an off-white color and there is no sound. Does this sound familiar to anybody? I can't be the first one to be experiencing this...