Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LogAUR:Error: UAURVideoSourceVideoFile::Connect: Failed to open video file #6

Open
zarborg opened this issue Jun 3, 2017 · 3 comments

Comments

@zarborg
Copy link

zarborg commented Jun 3, 2017

Love the plugin!
It's working perfectly with 4.16 using my webcam using the most recent update, thanks very much for putting this out there for us to use.

I'm having a small problem when trying to use the example video files in the example project.

When I click on the menu choice to select the aur_example.webm file, I get the log error below saying that it can't open the video file.
I did notice that the file in that directory had an extra period in it (aur._example.webm) which I fixed, but that didn't solve the issue.

I've got gstreamer installed, I'm able to view the webm file, I made sure gstreamer was in my path and I checked permissions on the video file path since I wasn't sure what else to look at.
Gstreamer installed automatically to my D: drive and my Unreal project folders are also on the D: drive, in case that matters. Unreal Engine itself is installed in C:\Program Files.
If I change the name of the video files, I get a warning about them not being present instead of the failure to open error.

Here is the error from the log:
LogAUR:Error: UAURVideoSourceVideoFile::Connect: Failed to open video file D:/Collateral/UnrealProjects/AugmentedUnrealityEx/Content/AugmentedUnrealityVideos/aur_example.webm

Hoping you can help point me in the right direction, figure I must be doing something wrong but not sure where to start looking.
Thanks in advance!

Attached please find the entire output log from the latest runtime.
UnrealOutputLog-AugmentedUnreality_1.2.02run.txt

@adynathos
Copy link
Owner

Please try the "GStreamer Test" video source:

  • If it fails, then the plugin can't find any gstreamer modules.
  • If it opens, then it finds the modules (because it finds testvideosrc), but some modules needed to decode the video are not installed.

If it fails, maybe GStreamer needs the env variables to find its modules:

GSTREAMER_1_0_ROOT_X86_64 = path_to_gstreamer_installation\1.0\x86_64\
GSTREAMER_DIR = path_to_gstreamer_installation\1.0\x86_64\
GST_PLUGIN_PATH = path_to_gstreamer_installation\1.0\x86_64\lib\gstreamer-1.0
add all those dirs to $PATH

I am not sure which of them are needed, the documentation lists many of them


If it opens the test source, but not the video, maybe you don't have the necessary modules:


The plugin was built with gstreamer 1.12.0. If you have a different version, maybe it does not want to cooperate.


Finally, if you run the project in VS debugger, you can see which shared libraries are loaded (gstreamer libraries should show up there).


Since these problems with gstreamer are very common, and installation is confusing, I will try to include the modules with the plugin and override the env vars to point to them.
If you manage to make it work, please let me know what you did.

@zarborg
Copy link
Author

zarborg commented Jun 5, 2017

I checked and found I did not have the additional plugins you listed.
I reinstalled with those 4x additional options and had no initial change.

Found in the install guide for gstreamer one more possible system environment variable called GST_PLUGIN_SYSTEM_PATH, set that and got the gstreamer test source running finally!
Path variables screenie attached:
gstreamervariables

However, still getting the error message about not being able to open the webm file when I try to select it directly. Also noticing that I have two example files setup for the demo but only one shows in the new menu where they used to both show up.
I tried moving everything back to my C: drive just in case it was a weird hard coded path but that didn't fix it.

For gstreamer, do I need to have any other plugins enabled than the ones you showed already?
Do I need the devel kit installed or the merge modules? I only have the gstreamer-1.0-x86_64-1.12.0.msi installed at this time.
Is there a command line option I can run that would help me debug the way you are calling it through code?
Any other little things you can think of to check on my end? It's so close I can feel it!

Guess I'll have to try and get the source running so I can see where it breaks.
And thanks for the quick response on this one, appreciate it!

@adynathos
Copy link
Owner

adynathos commented Jun 9, 2017

Is there a command line option I can run that would help me debug the way you are calling it through code?
Any other little things you can think of to check on my end? It's so close I can feel it!

GStreamer writes to stderr, which unfortunately does not show up in UE's log.
To read GStreamer's output, you can run the following Python program (but set the paths to your engine and project):

import subprocess
proc = subprocess.run(
	# [ "path to engine" , "path to project"],
	[
		r"F:\unreal\engine\UE_4.16\Engine\Binaries\Win64\UE4Editor.exe", 
		r"E:\unreal_projects\AugmentedUnrealityEx\AugmentedUnrealityEx.uproject",
	],
	stdout=subprocess.PIPE, 
	stderr=subprocess.PIPE,
	encoding='"utf-8',
)
print('Return code:', proc.returncode)
print('StdOut:', proc.stdout)
print('StdErr:', proc.stderr)

Also before you run this, open the Epic Games Launcher. Otherwise the program will never end and will not print anything.

Or if you want more debug messages:

import os, subprocess

mod_env = os.environ.copy()
mod_env["GST_DEBUG"] = "*:5"

proc = subprocess.run(
	# [ "path to engine" , "path to project"],
	[
		r"F:\unreal\engine\UE_4.16\Engine\Binaries\Win64\UE4Editor.exe", 
		r"E:\unreal_projects\AugmentedUnrealityEx\AugmentedUnrealityEx.uproject",
	],
	stdout=subprocess.PIPE, 
	stderr=subprocess.PIPE,
	encoding='"utf-8',
	env = mod_env,
)
print('Return code:', proc.returncode)
print('StdOut:', proc.stdout)
print('StdErr:', proc.stderr)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants