Recently I have been experimenting with some custom versions of ffmpeg, as I needed h264 support and ts demuxing. However, it has come to my attention that although the already compiled packages available online contain support for RTMP, the self compiled ffmpeg-full do not. Furthermore, ffmpeg-custom doesn't even have an RTMP option! Thus I would like to add support for librtmp, but I am encountering some problems.
So far, I have gathered the following info:
In order to support RTMP, ffmpeg needs the following build arguements:
--enable-protocol=rtmp --enable-librtmp --enable-encoder=flv --enable-decoder=flv. This makes sense, as RTMP uses FLV and we need the library to add support. However, it cannot find the library as the openwrt do not contain it
The librtmp git repository can be found here. This is what I've been trying to get into a Makefile to add librtmp as an openwrt package. By default, librtmp is included with ffmpeg.
So far, I've got the following Makefile which I am almost certain isn't even half way complete:
# # Copyright (C) 2019 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # include $(TOPDIR)/rules.mk PKG_NAME:=librtmp PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=http://git.ffmpeg.org/rtmpdump.git PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING include $(INCLUDE_DIR)/package.mk define Package/librtmp SECTION:=libs CATEGORY:=Libraries TITLE:=librtmp URL:=http://git.ffmpeg.org/rtmpdump.git endef define Package/librtmp/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/librtmp $(1)/usr/bin/ endef $(eval $(call BuildPackage,librtmp))
I have made this, following the documentation and other packages that are already available. This Makefile is inside the directory openwrt/package/feeds/packages/librtmp.
When running the command
make package/librtmp/download V=s I get the following result:
ERROR: please fix package/feeds/packages/librtmp/Makefile - see logs/package/feeds/packages/librtmp/dump.txt for details Collecting package info: done make: Entering directory '/home/chrismin13/openwrt' make: Entering directory '/home/chrismin13/openwrt/package/feeds/packages/librtmp' Makefile:33: *** ERROR: Unknown pack format for file /home/chrismin13/openwrt/tmp/dl/. Stop. make: Leaving directory '/home/chrismin13/openwrt/package/feeds/packages/librtmp' time: package/feeds/packages/librtmp/download#0.06#0.00#0.08 make: *** [package/Makefile:109: package/feeds/packages/librtmp/download] Error 2 make: Leaving directory '/home/chrismin13/openwrt' make: *** [/home/chrismin13/openwrt/include/toplevel.mk:218: package/librtmp/download] Error 2
The log mentioned in the above output is the following:
Package: librtmp Version: 1 Depends: +libc +GCC_LIBSSP:libssp +USE_GLIBC:librt +USE_GLIBC:libpthread Conflicts: Menu-Depends: Provides: Section: libs Category: Libraries Repository: packages Title: librtmp Maintainer: Source: License: GPL-2.0 LicenseFiles: COPYING Type: ipkg Description: librtmp http://git.ffmpeg.org/rtmpdump.git @@ Makefile:33: *** ERROR: Unknown pack format for file /home/chrismin13/openwrt/tmp/dl/. Stop.
Any advice on how to get this working would be greatly appreciated! I've also got the task of adding this in the ffmpeg-custom options, but that seems to be slightly easier and will be done later on anyways.
Thanks in advance,