BobStrogg / teslacam-browser

A very simple TeslaCam browser
Creative Commons Zero v1.0 Universal
237 stars 32 forks source link

No videos (no errors in console) #45

Open SimplyMinimal opened 4 years ago

SimplyMinimal commented 4 years ago

Hello,

Here's what I've done so far:

Cloned and ran npm install. After a while, no errors we reported and it successfully completed.

node server.js /mnt/TeslaCam (a mount point local on the pi)

I've also tried this on my Windows machine and pointed the path to: node server.js C:\Tools\Videos\TeslaCam\ (along with a few other various folder locations with the proper directory structure underneath)

In both cases I can successfully view the main page and select the folders but no videos get loaded or displayed. Selecting the days the events occurred shows 0 days found. No errors reported in console.

TeslaCamBrowserNoVids

I feel I am missing something here. Any help is greatly appreciated!

mitchcapper commented 4 years ago

Does the console backend show anything in that log (as it would be doing the most for the path). What does the structure under that folder look like?

SimplyMinimal commented 4 years ago

No errors there as well.

TeslaCamBrowserNoVids_2 TeslaCamBrowserNoVids_3 NoVids4

To add, I have also installed the HEVC codec. The videos themselves play just fine outside the browser.

SimplyMinimal commented 4 years ago

Using git bisect I was able to pinpoint that it's the latest commit that causes it to stop working for me. The previous commits work just fine for me.

Commit in question: https://github.com/BobStrogg/teslacam-browser/commit/9ed15107e4e5afc9a4ce052d4b6e96cbd5df6e68

SimplyMinimal commented 4 years ago

Specifically, removing the quotes brings back the videos and allows me to select the date but console reports the regex group is invalid: https://github.com/BobStrogg/teslacam-browser/commit/9ed15107e4e5afc9a4ce052d4b6e96cbd5df6e68#diff-9539354d35e1c6c1fa65496aaba008ccR8-R9

Solved

specked commented 4 years ago

I downgraded to before commit: 9ed1510#diff-9539354d35e1c6c1fa65496aaba008ccR8-R9 I then had to delete empty folders to restore video playback

malikmalikmalik commented 4 years ago

I have the same issue. Deleted the empty folders like @specked suggested. (browsed to the TeslaCam directory first!)

find . -type d -empty -print
find . -type d -empty -delete

Still no video's. Console shows no errors. Back-end just shows the folder where I'm browsing.

I used Safari and Chrome (macOS) TeslaCam-Browser runs on an Ubuntu machine.

appark commented 4 years ago

is this fixed yet?

malikmalikmalik commented 4 years ago

is this fixed yet?

Not for me. Haven't had time to tinker with it though. What's weird to me is that the regex for the folder structure seems to work fine, but it finds zero actual video files in any folder. The regex is basically the same, except for the camera.

image

appark commented 4 years ago

Is it true older version works?

malikmalikmalik commented 4 years ago

Haven't tried that. I just recently started using this and landed on the current version.

godarapradeep commented 4 years ago

As @SimplyMinimal suggested I tried removing single quotes that fixed the issue. It seems like a coding issue as Regular Expressions in JS is a special type and won't require a string notation.

Robvred commented 4 years ago

Hello It's seems this problem is still up to date.

Videos are still empty. Fresh install done today.

BobStrogg commented 4 years ago

Hello It's seems this problem is still up to date.

Videos are still empty. Fresh install done today.

The regex issue should be fixed in latest source. It should also show the rear camera view.

BobStrogg commented 4 years ago

Note the HEVC / H265 issue still exists. Chrome (which Electron uses internally) doesn't support HEVC / H265 -encoded video because Google. Clicking the "Browse" button will open the UI in your default browser, but if that doesn't work you'll need to copy the URL into Safari or an older version of Edge (the latest Edge versions are based on Chromium... which doesn't support HEVC / H265...)

malikmalikmalik commented 4 years ago

So I cloned the latest version. Tried again without tinkering. Get the regex error immediately.

Screenshot 2020-03-29 at 11 35 53

Then I add the quotes to the clipRegex and folderRegex in the helper.js file and it seems to run. Screenshot 2020-03-29 at 11 36 46

From there I open up Safari (not Chrome) and browse to the IP and port. Once I browse to the page, Terminal adds an error to the running process and quits.

Screenshot 2020-03-29 at 11 36 58

teslacam-browser is running on Ubuntu 18.04.4 LTS. I'm accessing it via Terminal/ssh on macOS 10.14.6 and using Safari here to access the teslacam-browser webpage.

So I went from seeing the browser in Safari without video's to not being able to run in anymore.

I checked out the error and found that changing

var mime = require('mime') to var mime = require('mime-types') in node_modules/send/index.js

fixes this. Not sure why I would be the only one with this issue/error though.

So the browser works now, but showing 0 video's. Screenshot 2020-03-29 at 11 54 10 Screenshot 2020-03-29 at 11 54 26 Screenshot 2020-03-29 at 11 54 40