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

H265 not working in event view #950

Closed
jeroenst opened this issue May 31, 2020 · 17 comments
Closed

H265 not working in event view #950

jeroenst opened this issue May 31, 2020 · 17 comments

Comments

@jeroenst
Copy link

jeroenst commented May 31, 2020

The version of zmNinja you are reporting:

1.4.007 (android) 

The version and OS of ZoneMinder you are using:

1.34.15 linux mint 19.3

Platform zmNinja is running on

Samsung Galaxy Note 9 

Did you build the package from source code yourself?
N

Describe the bug
When I use h265 cameras, live view works fine, but playback of events fail.
I only hear audio but don't see any video.

Debug logs

Jun 1, 2020 12:19:06 AM DEBUG Video state=stop
Jun 1, 2020 12:19:06 AM DEBUG not going to next event, gapless is off
Jun 1, 2020 12:19:06 AM INFO Playback of event 14577 is finished
Jun 1, 2020 12:19:06 AM DEBUG Video state=pause
Jun 1, 2020 12:18:55 AM DEBUG Video state=play
Jun 1, 2020 12:18:55 AM DEBUG Setting play at rate:1 as video can be played
Jun 1, 2020 12:18:55 AM DEBUG obfuscate: original:9054 obfuscated:2325 scheme:lzs
Jun 1, 2020 12:18:55 AM DEBUG This video can be played
Jun 1, 2020 12:18:52 AM DEBUG Player-Total length:0
Jun 1, 2020 12:18:52 AM DEBUG API-Total length:9.32
Jun 1, 2020 12:18:52 AM DEBUG Setting cue points..
Jun 1, 2020 12:18:52 AM DEBUG On Play Ready invoked
Jun 1, 2020 12:18:51 AM INFO >>>Starting checkAllEvents interval...
Jun 1, 2020 12:18:50 AM DEBUG neighbors of 14577are pre=14576 next=
Jun 1, 2020 12:18:50 AM DEBUG resize/orient: 360(w) * 668(h)
Jun 1, 2020 12:18:50 AM DEBUG Video url passed to player is: https://secret

Screenshots

Additional context

When playing events in zm webpage I have to use mjpeg instead of mp4

When I download the video in zmninja and open it with vlc the video works fine.

A fast temporary workaround would be to have a setting to use mjpeg instead of mp4.

@welcome
Copy link

welcome bot commented May 31, 2020

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you follow the issue template or I may not respond.

@pliablepixels
Copy link
Member

Open up a chrome browser on your mobile device, go to ZM console and try playing the same video. Does it play? If not, zmNinja won't play either.

Your idea of mjpeg is worth investigation. What is the URL when you play using mpeg?

@jeroenst
Copy link
Author

jeroenst commented Jun 1, 2020

It doesn't play. Chrome browser doesn't support h265, only safari supports it...

The url is:
/zm/cgi-bin/nph-zms?mode=jpeg&frame=1&scale=0&rate=100&maxfps=30&replay=none&source=event&event=14582&connkey=316603&rand=1590996970&auth=######################

@pliablepixels
Copy link
Member

Okay, so that is the old style playback. Good idea. How about I add a per monitor setting in the monitors screen that force plays the video in mpeg format even if its mp4? Then you can change on a per monitor basis. I assume thumbnails show correctly, only playback is the issue.

@jeroenst
Copy link
Author

jeroenst commented Jun 1, 2020

Per monitor basis would be perfect. I also have h264 camera's and h265 camera's so that would fit like a charm, thanx

@pliablepixels
Copy link
Member

I have a desktop version for you to test first - can you let me know which OS you can try?

@jeroenst
Copy link
Author

jeroenst commented Jun 4, 2020

I'm using Ubuntu 20.04 on my laptop and Android 10 on my Galaxy Note 9.

@pliablepixels
Copy link
Member

https://drive.google.com/file/d/15-p_xu55mXYmNspHwbUws3Kc42t3MpM8/view?usp=sharing
Go to Monitor->Click on configuration->force MJPEG

then try it out

@jeroenst
Copy link
Author

jeroenst commented Jun 8, 2020

Ok, I did test it and I can confirm it works, thank you!

In the mean time I configured all cameras as H264 so for me the issue is now fixed. Hopefully H265 will be implemented to android webview and chrome in the future.

@pliablepixels
Copy link
Member

Sounds good. I’ll make this part of the next release in a few weeks. I assume you are not waiting for it urgently as you have switched to 264?

@jeroenst
Copy link
Author

Yes, no urgency at the moment. Thanx for your support!

@withanhdammit
Copy link

withanhdammit commented Jun 30, 2020

I have the same issue. iOS 13.5.1 (iPhone X), Windows 10 1809, MacOS Catalina 10.15.5
Would be happy to test if you'd like.

My ZM is on Debian 10 Buster, v1.34.15

@jeroenst
Copy link
Author

jeroenst commented Jun 30, 2020

I have the same issue. iOS 13.5.1 (iPhone X), Windows 10 1809, MacOS Catalina 10.15.5
Would be happy to test if you'd like.

My ZM is on Debian 10 Buster, v1.34.15

The best use case is to use h264. H265 is not supported by many browsers and due to licensing it is probably not going to be supported also. That's why Facebook and YouTube don't use h265 but VP9 which is license free.

But with the mjpeg option you can view your h265 recordings but no sound on that case. Altough you can download the video and play it in a h265 supporting video player with sound.

It would be nice if zmninja could use a h265 library on top of the browser functionality to show h265, but that is a major change.

@pliablepixels
Copy link
Member

@withanhdammit The feature I added to mitigate this is to stream those cameras via MJPEG. ZM supports this functionality.
There is no way to play H265 if the platform browser doesn't support it. I'll make a release soon.

@pliablepixels
Copy link
Member

Closing this as #951 addresses this via ZM side MJPEG transcoding

@rajil
Copy link

rajil commented Dec 12, 2020

I am recording video using this method. The camera supports both H264 and H265 streams. If i use H264 the video plays fine in zmninja, however with H265 the video is blank only the audio comes through. H265 consumes only half the storage which is very useful for 24x7 recording.

My device is Samsung Note9 and is able to play the HEVC mp4 file natively. Is there any way we can use the native capabilities of the device?

@pliablepixels
Copy link
Member

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

4 participants