Closed RegProctor closed 3 months ago
This is the second time I see such issue with openSUSE provided builds. In both cases ffmpeg
works fine, but motion
fails to perform simple operation. It looks like motion has been built with other ffmpeg libs which are missing needed codecs (licensing issue?)
Can you show what repos do you have in your openSUSE?
zypper lr
Also, are the other cameras H264 and this is only one that is H265?
To me, it looks like Opensuse requires manual install of additional libs for the codec's. (FFMPEG may have been built with static libs that allow it to work but don't provide access for Motion. An internet search for h265/hevc codec and Opensuse indicate something about "pacman" but I'm an Opensuse user to know if that would help.....)
Also, @RegProctor please email me at MotionMrDave@gmail.com
# | Alias | Name | Enabled | GPG Check | Refresh
--+----------------------------------+----------------------------------------+---------+-----------+--------
1 | Packman | Packman | Yes | (r ) Yes | Yes
2 | download.opensuse.org-non-oss | Main Repository (NON-OSS) | Yes | (r ) Yes | Yes
3 | download.opensuse.org-oss | Main Repository (OSS) | Yes | (r ) Yes | Yes
4 | download.opensuse.org-tumbleweed | Main Update Repository | Yes | (r ) Yes | Yes
5 | openSUSE-20230319-0 | openSUSE-20230319-0 | No | ---- | ----
6 | repo-debug | openSUSE-Tumbleweed-Debug | No | ---- | ----
7 | repo-openh264 | Open H.264 Codec (openSUSE Tumbleweed) | Yes | (r ) Yes | Yes
8 | repo-source | openSUSE-Tumbleweed-Source | No | ---- | ----
and yast shows:
All repositories▒↓
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│Priority │Enabled│Autorefresh│Name │Service│URL │
│ 99 (Default)│ x │ x │Main Repository (NON-OSS) │ │http://download.opensuse.org/tumbleweed/repo/non-oss/ │
│ 99 (Default)│ x │ x │Main Repository (OSS) │ │http://download.opensuse.org/tumbleweed/repo/oss/ │
│ 99 (Default)│ x │ x │Main Update Repository │ │http://download.opensuse.org/update/tumbleweed/ │
│ 99 (Default)│ x │ x │Open H.264 Codec (openSUSE Tumbleweed)│ │http://codecs.opensuse.org/openh264/openSUSE_Tumbleweed │
│ 99 (Default)│ x │ x │Packman │ │https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/ │
│ 99 (Default)│ │ x │openSUSE-20230319-0 │ │hd:/?device=/dev/disk/by-id/usb-Specific_STORAGE_DEVICE_63655065-0:0-part│
│ 99 (Default)│ │ x │openSUSE-Tumbleweed-Debug │ │http://download.opensuse.org/debug/tumbleweed/repo/oss/ │
│ 99 (Default)│ │ x │openSUSE-Tumbleweed-Source │ │http://download.opensuse.org/source/tumbleweed/repo/oss/ │
I guess at some point Tumbleweed didn't have H264 which is why I have a repo. in there just for it. I don't know if that is still the case, maybe that's something I can remove now but I won't change anything while you are in the middle of figuring this out unless you want me to.
This camera is the only one that is H265, the other cameras are H264 cameras so that's go to be something there.
Yea....so finding the codec's for HEVC(H265) definitely looks like the issue. Not sure if it is a additional package or what. The H264 cameras needed that extra one you've included.
I did a search and it's in there.
zypper se 265
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
---+-----------------------------+-----------------------------------------------------------+-----------
| libde265 | Open H.265 video codec implementation | srcpackage
i+ | libde265-0 | Open H.265 video codec implementation - libraries | package
| libde265-0-32bit | Open H.265 video codec implementation - libraries | package
| libde265-0-32bit-debuginfo | Debug information for package libde265-0 | package
| libde265-0-debuginfo | Debug information for package libde265-0 | package
| libde265-debugsource | Debug sources for package libde265 | package
| libde265-devel | Open H.265 video codec implementation - development files | package
i | libx265-199 | A free H265/HEVC encoder - encoder binary | package
i | libx265-209 | A free H265/HEVC encoder - encoder binary | package
| libx265-209-32bit | A free H265/HEVC encoder - encoder binary | package
| libx265-209-32bit-debuginfo | Debug information for package libx265-209 | package
| libx265-209-debuginfo | Debug information for package libx265-209 | package
| libx265-devel | Libraries and include file for the libx265 encoder | package
i+ | x265 | A free h265/HEVC encoder - encoder binary | package
| x265 | A free h265/HEVC encoder - encoder binary | srcpackage
| x265-debuginfo | Debug information for package x265 | package
| x265-debugsource | Debug sources for package x265 | package
I also did some cleanup so my repos look like this now:
zypper lr -P
# | Alias | Name | Enabled | GPG Check | Refresh | Priority
--+----------------------------------+----------------------------+---------+-----------+---------+---------
1 | Packman | Packman | Yes | (r ) Yes | Yes | 90
2 | download.opensuse.org-non-oss | Main Repository (NON-OSS) | Yes | (r ) Yes | Yes | 99
3 | download.opensuse.org-oss | Main Repository (OSS) | Yes | (r ) Yes | Yes | 99
4 | download.opensuse.org-tumbleweed | Main Update Repository | Yes | (r ) Yes | Yes | 99
5 | openSUSE-20230319-0 | openSUSE-20230319-0 | No | ---- | ---- | 99
6 | repo-debug | openSUSE-Tumbleweed-Debug | No | ---- | ---- | 99
7 | repo-source | openSUSE-Tumbleweed-Source | No | ---- | ---- | 99
then did a zypper dup
to make sure all the changes took effect and then I retested with ffmpeg and it still works so there is an H.265 codec there and working it's just not being utilized by motion.
That added package of H265, I took out in the steps above (you can see it's no longer in the repo list) so now it's just using what's native to openSUSE and Packman.
It was there because I moved over to Tumbleweed pretty early when it was released and it wasn't in the distro back then. Now I have a standard basic setup of openSUSE. It showed this when I did the zupper dup
(dup = disro. upgrade) as the only change that was made was an update to x265 because it was now taking it out of Packman and not that extra repo. I removed.
I did just build a OpenSuse Tumbleweed machine and the "stock" ffmpeg does not include H265. This is also consistent with the ffmpeg banner page output from above. The following is a snippet from that output parsed out for clarity.
--snip--- configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --snip--- --enable-libopenh264-dlopen
--snip--- --disable-encoders --disable-decoders --disable-decoder='h264,hevc,vc1' ---snip---
This could also probably be seen via the command ffmpeg -encoders
. In my build of OpenSuse, it does not show H265 being available.
I believe what is occurring is that your test of ffmpeg isn't valid. You've used the -c copy
option which does not do any decoding of the streams. It just copies packets. You need to tell ffmpeg to encode the video into a different format for a proper test. At that point I suspect ffmpeg will fail because it would need to decode the H265 packets in order to re-encode them into a different format.
Bottom line is that you'll need to either pick a different distro or build ffmpeg and Motion from source in order to have H265 support.
Did you add Packman? This is how in openSUSE you get the codecs and a few other goodies, you won't find it in OpenSUSE without Packman, they do it this way for copyright issues. That said, I found it. It seems just zypper dup
wasn't enough. I also had to:
zypper dist-upgrade --from Packman --allow-vendor-change
(I thought I did this a long time ago)
Then it got everything from Packman and it came up.
Did you read the guide?
Yes
What is the base version number of Motion being used?
4.6.x
What was the install method?
Installed via package tool
What is base architecture?
x86
What is the distro being used?
Other
Disto version number
OpenSUSE Tumbleweed
Camera type(s) being used?
Network camera with RTSP
Describe the issue/problem and steps to reproduce
I added a new camera to my network which is a: SV3C HX02
It doesn't want to connect. To make sure I could connect to the camera on the machine with motion I did:
ffmpeg -i rtsp://zzzzzzz:XXXXXXXXXX@YYYYYYY:554/11 -c copy output.mkv
and since this machine has no monitor copied the output to another machine and was able to see the video just fine. The camera config is nothing special, just:
My OS details are:
Since I was able to stream from the camera through through ffmpeg I figured this is more likely a motion issue than an issue with my computer setup.
ffmpeg showed:
Here is more detail about the hardware:
Motion log output at log_level 8