Pi Box
Posts: 17
Joined: Sun Dec 08, 2013 3:44 am

how do I $PATH omxplayer

Wed Jan 29, 2014 6:12 pm

I know this is a super easy question, but I couldn't find the answer anywhere.

I need omxplayer to run no matter where I am in the directory. The problem is, I have no idea where that path is. And I don't know how to add the path environment variable on Raspberry pi.

thank you.

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: how do I $PATH omxplayer

Wed Jan 29, 2014 6:18 pm

Omxplayer is already accessible from the path just call it by it's name.
If you want the full path of omxplayer then run: which omxplayer

Richard S.

Pi Box
Posts: 17
Joined: Sun Dec 08, 2013 3:44 am

Re: how do I $PATH omxplayer

Wed Jan 29, 2014 6:53 pm

Richard,

Thank you. I guess what im trying to do then is path the video i want to play. I have a program compiled in C# and I am trying to use the omxplayer to play it. when I use the launcher that is supposed to play it nothing happens. This is the code....

Code: Select all

protected void butStart_Click (object sender, EventArgs e)
{
 string fileName = System.IO.Path.Combine(g_basePath, "clipcanvas_14348_H264_640x360.mpr");
            g_currentProcess = new Process();
           Console.WriteLine("playing video " +  filename);
           g_currentProcess.StartInfo.FileName = "omxplayer";
           g_currentProcess.StartInfo.UseShellExecute = false;
g_currentProcess.StartInfo.Arguments = "-o hdmi " + "\" " +fileName + "\" ";
g_currentProcess.StartInfo.RedirectStandardInput = true;
g_currentProcess.StartInfo.RedirectStandardOutput = true;
g_currentProcess.OutputDataReceived +=currentProcess_OutputDataReceived;
g_nowPlaying = g_currentProcess.Start();

Pi Box
Posts: 17
Joined: Sun Dec 08, 2013 3:44 am

Re: how do I $PATH omxplayer

Wed Jan 29, 2014 6:56 pm

I tried putting the file path into ~/.bashrc for the actual clip i wanted to play. Does anyone know why this isnt playing? So even without my launcher program stated above. I can't get the omxplayer to play the clip anywhere, when i type

Code: Select all

omxplayer -o hdmi clipcanvas_14348_H264_640x360.mp4
I get the error
File "XXXXXXXX.mp4" not found.

Return to “General discussion”