Temat: Screenshot ffmpeg

Cześć,

Potrzebuje wykonać screenshot z kamery dostępnej w sieci lokalnej przy użyciu OpenWRT.
Urządzenie to FriendlyARM NanoPi NEO v1.4, system w wersji 21.02.0-rc4.

Zainstalowałem ffmpeg:

# opkg list-installed | grep ffmpeg

ffmpeg - 4.3.4-1
libffmpeg-full - 4.3.4-1
libffmpeg-mini - 4.3.4-1

Po uruchomieniu następujące błędy:

# ffmpeg -y -rtsp_transport tcp -i "rtsp://-1:-1@192.168.203.21/stream1" -vframes 1 output.jpg

ffmpeg version 4.3.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 8.4.0 (OpenWrt GCC 8.4.0 r16594-ce92de8c8c)
  configuration: --enable-cross-compile --cross-prefix=arm-openwrt-linux-muslgnueabi- --arch=arm --cpu=cortex-a7 --target-os=linux --prefix=/usr --pkg-config=pkg-config --enable-shared --enable-static --enable-pthreads --enable-zlib --disable-doc --disable-debug --disable-lzma --disable-vaapi --disable-vdpau --disable-outdevs --disable-runtime-cpudetect --enable-lto --enable-vfp --enable-neon --enable-vfp --disable-x86asm --enable-gnutls --disable-decoder=atrac3 --disable-decoder=h264 --disable-decoder=hevc --disable-decoder=vc1 --disable-muxer=h264 --disable-muxer=hevc --disable-muxer=vc1 --disable-demuxer=h264 --disable-demuxer=hevc --disable-demuxer=vc1 --disable-parser=h264 --disable-parser=hevc --disable-parser=vc1 --enable-libopus --enable-small --enable-libmp3lame --enable-libfdk-aac
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
[h264_v4l2m2m @ 0x14374d0] Could not find a valid device
[h264_v4l2m2m @ 0x14374d0] can't configure decoder
[rtsp @ 0x1434710] Failed to open codec in avformat_find_stream_info
[h264_v4l2m2m @ 0x14374d0] Could not find a valid device
[h264_v4l2m2m @ 0x14374d0] can't configure decoder
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://-1:-1@192.168.203.21/stream1':
  Metadata:
    title           : stream server
    comment         : stream1
  Duration: N/A, start: 0.227500, bitrate: N/A
    Stream #0:0: Video: h264, none, 1920x1080, 90k tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
[h264_v4l2m2m @ 0x1438e50] Could not find a valid device
[h264_v4l2m2m @ 0x1438e50] can't configure decoder
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_v4l2m2m) -> mjpeg (native))
Error while opening decoder for input stream #0:0 : Invalid argument

Testowałem to spod Debiana, nie mam tego problemu.
Proszę o pomoc przy OpenWRT.

2

Odp: Screenshot ffmpeg

Wywal libffmpeg-mini, przeinstaluj wszystko żeby było tylko i wyłącznie -full, bo on się drze że "Could not find a valid device" na h264 a ty masz h264 wyłączone podczas kompilacji:

--disable-decoder=h264
--disable-muxer=h264
--disable-parser=h264

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

3

Odp: Screenshot ffmpeg

To jest system składany przez imagebuildera. Czy muszę kompilować jądro od nowa?

4

Odp: Screenshot ffmpeg

Nie, sam ffmpeg musi być w odpowiedniej wersji. Jeżeli składałeś to przez imagebuildera to czemu masz dwie wersje biblioteki, -mini i -full?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

5

Odp: Screenshot ffmpeg

ffmpeg był akurat doinstalowany potem. Czemu zainstalował się mini podczas instalowania full, nie mam pojęcia.

Cezary napisał/a:

...ty masz h264 wyłączone podczas kompilacji:

--disable-decoder=h264
--disable-muxer=h264
--disable-parser=h264

To w którym miejscu mam to włączyć?

6

Odp: Screenshot ffmpeg

To są opcje do włączenia tylko podczas kompilacji pakietu ffmpeg. Wersja -mini tego na bank nie ma, wersja full nie pamiętam bo musi być jeszcze BUILD_PATENTED włączone żeby h264 chciało się zbudować, a nie wiem czy obrazy z openwrt to mają czy nie.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

7 (edytowany przez tinware 2022-06-14 16:35:15)

Odp: Screenshot ffmpeg

Dopisałem "ffmpeg" do mojego imagebuildera, oto efekt:

Collected errors:
 * check_data_file_clashes: Package libffmpeg-full wants to install file /root/OpenWRT/nanopineo1.4_v21.02.0-rc4_imagebuilder/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavcodec.so.58
        But that file is already provided by package  * libffmpeg-mini
 * check_data_file_clashes: Package libffmpeg-full wants to install file /root/OpenWRT/nanopineo1.4_v21.02.0-rc4_imagebuilder/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavcodec.so.58.91.100
        But that file is already provided by package  * libffmpeg-mini
 * check_data_file_clashes: Package libffmpeg-full wants to install file /root/OpenWRT/nanopineo1.4_v21.02.0-rc4_imagebuilder/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavformat.so.58
        But that file is already provided by package  * libffmpeg-mini
 * check_data_file_clashes: Package libffmpeg-full wants to install file /root/OpenWRT/nanopineo1.4_v21.02.0-rc4_imagebuilder/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavformat.so.58.45.100
        But that file is already provided by package  * libffmpeg-mini
 * check_data_file_clashes: Package libffmpeg-full wants to install file /root/OpenWRT/nanopineo1.4_v21.02.0-rc4_imagebuilder/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavutil.so.56
        But that file is already provided by package  * libffmpeg-mini
 * check_data_file_clashes: Package libffmpeg-full wants to install file /root/OpenWRT/nanopineo1.4_v21.02.0-rc4_imagebuilder/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavutil.so.56.51.100
        But that file is already provided by package  * libffmpeg-mini
 * opkg_install_cmd: Cannot install package ffmpeg.
make[2]: *** [Makefile:167: package_install] Error 255
make[1]: *** [Makefile:122: _call_image] Error 2
make: *** [Makefile:240: image] Błąd 2

Dopisałem tylko "libffmpeg-full", efekt niżej:

Collected errors:
 * check_data_file_clashes: Package libffmpeg-full wants to install file /root/OpenWRT/nanopineo1.4_v21.02.0-rc4_imagebuilder/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavcodec.so.58
        But that file is already provided by package  * libffmpeg-mini
 * check_data_file_clashes: Package libffmpeg-full wants to install file /root/OpenWRT/nanopineo1.4_v21.02.0-rc4_imagebuilder/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavcodec.so.58.91.100
        But that file is already provided by package  * libffmpeg-mini
 * check_data_file_clashes: Package libffmpeg-full wants to install file /root/OpenWRT/nanopineo1.4_v21.02.0-rc4_imagebuilder/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavformat.so.58
        But that file is already provided by package  * libffmpeg-mini
 * check_data_file_clashes: Package libffmpeg-full wants to install file /root/OpenWRT/nanopineo1.4_v21.02.0-rc4_imagebuilder/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavformat.so.58.45.100
        But that file is already provided by package  * libffmpeg-mini
 * check_data_file_clashes: Package libffmpeg-full wants to install file /root/OpenWRT/nanopineo1.4_v21.02.0-rc4_imagebuilder/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavutil.so.56
        But that file is already provided by package  * libffmpeg-mini
 * check_data_file_clashes: Package libffmpeg-full wants to install file /root/OpenWRT/nanopineo1.4_v21.02.0-rc4_imagebuilder/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavutil.so.56.51.100
        But that file is already provided by package  * libffmpeg-mini
 * opkg_install_cmd: Cannot install package libffmpeg-full.
make[2]: *** [Makefile:167: package_install] Error 255
make[1]: *** [Makefile:122: _call_image] Error 2
make: *** [Makefile:240: image] Błąd 2

8

Odp: Screenshot ffmpeg

Odinstaluj libffmpeg-mini

A tak w ogóle to czemu używasz takiej wersji zamiast normalnego wydania stabilnego?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

9

Odp: Screenshot ffmpeg

Ok, przesiadłem się na 21.02.3, aby to sprawdzić i faktycznie nie ma już tutaj tej zależności z pakietem mini, instaluje się tylko full.
Reboot i...

ffmpeg -y -rtsp_transport tcp -i "rtsp://-1:-1@192.168.203.21/stream1" -vframes 1 output.jpg
ffmpeg version 4.3.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 8.4.0 (OpenWrt GCC 8.4.0 r16594-ce92de8c8c)
  configuration: --enable-cross-compile --cross-prefix=arm-openwrt-linux-muslgnueabi- --arch=arm --cpu=cortex-a7 --target-os=linux --prefix=/usr --pkg-config=pkg-config --enable-shared --enable-static --enable-pthreads --enable-zlib --disable-doc --disable-debug --disable-lzma --disable-vaapi --disable-vdpau --disable-outdevs --disable-runtime-cpudetect --enable-lto --enable-vfp --enable-neon --enable-vfp --disable-x86asm --enable-gnutls --disable-decoder=atrac3 --disable-decoder=h264 --disable-decoder=hevc --disable-decoder=vc1 --disable-muxer=h264 --disable-muxer=hevc --disable-muxer=vc1 --disable-demuxer=h264 --disable-demuxer=hevc --disable-demuxer=vc1 --disable-parser=h264 --disable-parser=hevc --disable-parser=vc1 --enable-libopus --enable-small --enable-libmp3lame --enable-libfdk-aac
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
[h264_v4l2m2m @ 0x1b184d0] Could not find a valid device
[h264_v4l2m2m @ 0x1b184d0] can't configure decoder
[rtsp @ 0x1b15710] Failed to open codec in avformat_find_stream_info
[h264_v4l2m2m @ 0x1b184d0] Could not find a valid device
[h264_v4l2m2m @ 0x1b184d0] can't configure decoder
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://-1:-1@192.168.203.21/stream1':
  Metadata:
    title           : stream server
    comment         : stream1
  Duration: N/A, start: 0.077500, bitrate: N/A
    Stream #0:0: Video: h264, none, 1920x1080, 90k tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
[h264_v4l2m2m @ 0x1b19e50] Could not find a valid device
[h264_v4l2m2m @ 0x1b19e50] can't configure decoder
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_v4l2m2m) -> mjpeg (native))
Error while opening decoder for input stream #0:0 : Invalid argument

Gdzie w imagebuilderze znajdę źródła do tej paczki i co muszę zmienic?

10

Odp: Screenshot ffmpeg

W imagebuilderze nie ma źródeł, są tylko gotowe paczki z których składa się później obrazy. Jeżeli chcesz zmienić opcje kompialcji to ściągnij całe źródła openwrt i przekompiluj sobie albo caly system albo tylko ffmpeg z opcjami które chcesz. Poradnik o kompilacji znajdziesz na https://eko.one.pl

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

11

Odp: Screenshot ffmpeg

Cezary napisał/a:

...a ty masz h264 wyłączone podczas kompilacji:

--disable-decoder=h264
--disable-muxer=h264
--disable-parser=h264

Kompiluje cały system + dodałem do paczki ffmpeg.
Teraz chce dokonać tych zmian, o których wspomniałeś...
Czy to powinno znajdować się w pliku package/feeds/packages/ffmpeg/Makefile ?
Z tych trzech rzeczy znalazłem tam jedynie wpis: --disable-decoder=pcm_bluray,pcm_dvd

12

Odp: Screenshot ffmpeg

Ale ty nie masz zmieniać makefile tylko włączyć opcje kompilacji

make menuconfig, w global zaznaczasz compile with support for patented functionality, w libraries później libffmpeg-full lub libffmpeg-custom i zaznacz co tam chcesz, w szczególności h264 i później w multimedia ffmpeg-custom. Budujesz i masz.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

13

Odp: Screenshot ffmpeg

Cezary napisał/a:

i później w multimedia ffmpeg-custom

Czegoś takiego nie ma. W multimedia jest tylko "ffmpeg".

To zrobiłem:

1. Global build settings -> Compile with support for patented functionality -> zaznaczone [*]
2. Multimedia -> ffmpeg -> zaznaczone <*>
3. Libraries -> libffmpeg-custom -> odzaznaczone < >
4. Libraries -> libffmpeg-full -> zaznaczone -*-
5. Libraries -> libffmpeg-mini -> odzaznaczone < >
6. Libraries -> libx264 -> zaznaczone <*>

i niestety dalej to samo:

[h264_v4l2m2m @ 0x1a411a0] Could not find a valid device
[h264_v4l2m2m @ 0x1a411a0] can't configure decoder
[rtsp @ 0x1a3e4e0] Failed to open codec in avformat_find_stream_info
[h264_v4l2m2m @ 0x1a411a0] Could not find a valid device
[h264_v4l2m2m @ 0x1a411a0] can't configure decoder
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://-1:-1@192.168.203.21/stream1':
  Metadata:
    title           : stream server
    comment         : stream1
  Duration: N/A, start: 0.113875, bitrate: N/A
    Stream #0:0: Video: h264, none, 1920x1080, 90k tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
[h264_v4l2m2m @ 0x1b48b00] Could not find a valid device
[h264_v4l2m2m @ 0x1b48b00] can't configure decoder
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_v4l2m2m) -> mjpeg (native))
Error while opening decoder for input stream #0:0 : Invalid argument

14

Odp: Screenshot ffmpeg

Bo to zależy od wersji. Weź custom, zaznacz wszystko, skompiluj i używaj libffmpeg-custom.

Pokaz pierwsze linie tego logu.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

15

Odp: Screenshot ffmpeg

Tego logu z mojego postu wyżej:

# ffmpeg -y -rtsp_transport tcp -i "rtsp://-1:-1@192.168.203.21/stream1" -vframes 1 output.jpg
ffmpeg version 4.3.3 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 8.4.0 (OpenWrt GCC 8.4.0 r16554-1d4dea6d4f)
  configuration: --enable-cross-compile --cross-prefix=arm-openwrt-linux-muslgnueabi- --arch=arm --cpu=cortex-a7 --target-os=linux --prefix=/usr --pkg-config=pkg-config --enable-shared --enable-static --enable-pthreads --enable-zlib --disable-doc --disable-debug --disable-lzma --disable-vaapi --disable-vdpau --disable-outdevs --disable-runtime-cpudetect --enable-lto --enable-vfp --enable-neon --enable-vfp --disable-x86asm --enable-gnutls --disable-decoder=atrac3 --disable-decoder=h264 --disable-decoder=hevc --disable-decoder=vc1 --disable-muxer=h264 --disable-muxer=hevc --disable-muxer=vc1 --disable-demuxer=h264 --disable-demuxer=hevc --disable-demuxer=vc1 --disable-parser=h264 --disable-parser=hevc --disable-parser=vc1 --enable-small --enable-libmp3lame --enable-libfdk-aac
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100

16

Odp: Screenshot ffmpeg

Dobrą wersję zainstalowałeś? Bo ty nadal masz wyłączone h264.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

17

Odp: Screenshot ffmpeg

Tak, co robię nie tak?
Naniosłem poniższe zmiany w menuconfig:

1. Global build settings -> Compile with support for patented functionality -> zaznaczone [*]
2. Multimedia -> ffmpeg -> zaznaczone <*>
3. Libraries -> libffmpeg-custom -> odzaznaczone < >
4. Libraries -> libffmpeg-full -> zaznaczone -*-
5. Libraries -> libffmpeg-mini -> odzaznaczone < >
6. Libraries -> libx264 -> zaznaczone <*>

Zapisałem i make V=s -j1 i tyle. Obrazu na pewno nie pomyliłem...

18

Odp: Screenshot ffmpeg

Zrób to custom i zaznacz tylko swoje. A później to zainstaluj.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

19 (edytowany przez tinware 2022-06-15 22:31:05)

Odp: Screenshot ffmpeg

Usunąłem .config i zacząłem od nowa:

1. Global build settings -> Compile with support for patented functionality -> zaznaczone [*]
2. Libraries -> libffmpeg-custom -> zaznaczone <*> (i dodatkowo kilka kodeków)
3. Multimedia -> ffmpeg-custom -> zaznaczone <*>

I błąd:

cp: cannot stat '/root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/ffmpeg-custom/ffmpeg-4.3.3/ipkg-install/usr/bin/ffmpeg': No such file or directory
make[3]: *** [Makefile:751: /root/OpenWRT/openwrt/bin/packages/arm_cortex-a7_neon-vfpv4/packages/ffmpeg-custom_4.3.3-1_arm_cortex-a7_neon-vfpv4.ipk] Error 1
make[3]: Leaving directory '/root/OpenWRT/openwrt/feeds/packages/multimedia/ffmpeg'
time: package/feeds/packages/ffmpeg/custom/compile#409.00#47.71#437.74
    ERROR: package/feeds/packages/ffmpeg failed to build (build variant: custom).
make[2]: *** [package/Makefile:116: package/feeds/packages/ffmpeg/compile] Error 1
make[2]: Leaving directory '/root/OpenWRT/openwrt'
make[1]: *** [package/Makefile:110: /root/OpenWRT/openwrt/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory '/root/OpenWRT/openwrt'
make: *** [/root/OpenWRT/openwrt/include/toplevel.mk:230: world] Błąd 2

Jeśli zaznaczyłbym w Multimedia "ffmpeg" to od razu włączy się zależność "libffmpeg-full" w Libraries i wyrzuci wtedy błąd:

Collected errors:
 * check_data_file_clashes: Package libffmpeg-custom wants to install file /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavcodec.so.58
        But that file is already provided by package  * libffmpeg-full
 * check_data_file_clashes: Package libffmpeg-custom wants to install file /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavcodec.so.58.91.100
        But that file is already provided by package  * libffmpeg-full
 * check_data_file_clashes: Package libffmpeg-custom wants to install file /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavdevice.so.58
        But that file is already provided by package  * libffmpeg-full
 * check_data_file_clashes: Package libffmpeg-custom wants to install file /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavdevice.so.58.10.100
        But that file is already provided by package  * libffmpeg-full
 * check_data_file_clashes: Package libffmpeg-custom wants to install file /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavformat.so.58
        But that file is already provided by package  * libffmpeg-full
 * check_data_file_clashes: Package libffmpeg-custom wants to install file /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavformat.so.58.45.100
        But that file is already provided by package  * libffmpeg-full
 * check_data_file_clashes: Package libffmpeg-custom wants to install file /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavutil.so.56
        But that file is already provided by package  * libffmpeg-full
 * check_data_file_clashes: Package libffmpeg-custom wants to install file /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libavutil.so.56.51.100
        But that file is already provided by package  * libffmpeg-full
 * check_data_file_clashes: Package libffmpeg-custom wants to install file /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libpostproc.so.55
        But that file is already provided by package  * libffmpeg-full
 * check_data_file_clashes: Package libffmpeg-custom wants to install file /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-sunxi/usr/lib/libpostproc.so.55.7.100
        But that file is already provided by package  * libffmpeg-full
 * opkg_install_cmd: Cannot install package libffmpeg-custom.
make[2]: *** [package/Makefile:70: package/install] Error 255
make[2]: Leaving directory '/root/OpenWRT/openwrt'
make[1]: *** [package/Makefile:111: /root/OpenWRT/openwrt/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.package_install] Error 2
make[1]: Leaving directory '/root/OpenWRT/openwrt'
make: *** [/root/OpenWRT/openwrt/include/toplevel.mk:230: world] Błąd 2

20

Odp: Screenshot ffmpeg

Pokaż wcześniejsze linie z budowania, bo pojawia się że binarki nie ma.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

21

Odp: Screenshot ffmpeg

Proszę:

(cd /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/ffmpeg-custom/ffmpeg-4.3.3/ipkg-arm_cortex-a7_neon-vfpv4/libffmpeg-custom/CONTROL; ( echo "$CONTROL"; printf "Description: "; echo "$DESCRIPTION" | sed -e 's,^[[:space:]]*, ,g'; ) > control; chmod 644 control; ( echo "#!/bin/sh"; echo "[ \"\${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; echo "[ -s "\${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_postinst \$0 \$@"; ) > postinst; ( echo "#!/bin/sh"; echo "[ -s "\${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_prerm \$0 \$@"; ) > prerm; chmod 0755 postinst prerm;  )
install -d -m0755 /root/OpenWRT/openwrt/bin/packages/arm_cortex-a7_neon-vfpv4/packages
/root/OpenWRT/openwrt/staging_dir/host/bin/fakeroot /root/OpenWRT/openwrt/scripts/ipkg-build -m "" /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/ffmpeg-custom/ffmpeg-4.3.3/ipkg-arm_cortex-a7_neon-vfpv4/libffmpeg-custom /root/OpenWRT/openwrt/bin/packages/arm_cortex-a7_neon-vfpv4/packages
Packaged contents of /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/ffmpeg-custom/ffmpeg-4.3.3/ipkg-arm_cortex-a7_neon-vfpv4/libffmpeg-custom into /root/OpenWRT/openwrt/bin/packages/arm_cortex-a7_neon-vfpv4/packages/libffmpeg-custom_4.3.3-1_arm_cortex-a7_neon-vfpv4.ipk
mkdir -p /root/OpenWRT/openwrt/bin/targets/sunxi/cortexa7/packages /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/ffmpeg-custom/ffmpeg-4.3.3/ipkg-arm_cortex-a7_neon-vfpv4/ffmpeg-custom/CONTROL /root/OpenWRT/openwrt/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pkginfo
install -d -m0755 /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/ffmpeg-custom/ffmpeg-4.3.3/ipkg-arm_cortex-a7_neon-vfpv4/ffmpeg-custom/usr/bin
cp -fpR /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/ffmpeg-custom/ffmpeg-4.3.3/ipkg-install/usr/bin/ffmpeg /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/ffmpeg-custom/ffmpeg-4.3.3/ipkg-arm_cortex-a7_neon-vfpv4/ffmpeg-custom/usr/bin/
cp: cannot stat '/root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/ffmpeg-custom/ffmpeg-4.3.3/ipkg-install/usr/bin/ffmpeg': No such file or directory
make[3]: *** [Makefile:751: /root/OpenWRT/openwrt/bin/packages/arm_cortex-a7_neon-vfpv4/packages/ffmpeg-custom_4.3.3-1_arm_cortex-a7_neon-vfpv4.ipk] Error 1
make[3]: Leaving directory '/root/OpenWRT/openwrt/feeds/packages/multimedia/ffmpeg'
time: package/feeds/packages/ffmpeg/custom/compile#411.10#50.20#440.13
    ERROR: package/feeds/packages/ffmpeg failed to build (build variant: custom).
make[2]: *** [package/Makefile:116: package/feeds/packages/ffmpeg/compile] Error 1
make[2]: Leaving directory '/root/OpenWRT/openwrt'
make[1]: *** [package/Makefile:110: /root/OpenWRT/openwrt/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory '/root/OpenWRT/openwrt'
make: *** [/root/OpenWRT/openwrt/include/toplevel.mk:230: world] Błąd 2

22

Odp: Screenshot ffmpeg

Jeszcze wyżej, etap budowania biinarki.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

23 (edytowany przez tinware 2022-06-16 20:03:59)

Odp: Screenshot ffmpeg

Zacząłem próbować tego, zanim zobaczyłem Twój post:
https://forum.openwrt.org/t/how-to-buil … ort/116554
Co o tym sądzisz?

Aaaa, przełączyłem się na gałąź v21.02.3 - to chyba ostatnia oficjalnie wydana

24

Odp: Screenshot ffmpeg

Oficjalnie to mamy 22.03.0-rc4.

To samo config robi, tam masz w zależności od wersji i włączonych opcji kompilowane wsparcie dla danych rzeczy lub nie. Chcesz to przecież możesz na stałe to wymusić, ty to kompilujesz...

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

25 (edytowany przez tinware 2022-09-07 13:35:13)

Odp: Screenshot ffmpeg

Z powyższego linka rozwiązanie działa ;-)

root@OpenWRT:~# ffmpeg -y -rtsp_transport tcp -i "rtsp://-1:-1@192.168.203.21/stream1" -vframes 1 output.jpg
ffmpeg version 4.3.3 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 8.4.0 (OpenWrt GCC 8.4.0 r16554-1d4dea6d4f)
  configuration: --enable-cross-compile --cross-prefix=arm-openwrt-linux-muslgnueabi- --arch=arm --cpu=cortex-a7 --target-os=linux --prefix=/usr --pkg-config=pkg-config --enable-shared --enable-static --enable-pthreads --enable-zlib --disable-doc --disable-debug --disable-lzma --disable-vaapi --disable-vdpau --disable-outdevs --enable-libx264 --enable-gpl --enable-nonfree --disable-runtime-cpudetect --enable-lto --enable-vfp --enable-neon --enable-vfp --disable-x86asm --enable-gnutls --enable-small --enable-libmp3lame --enable-gpl --enable-libx264
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://-1:-1@192.168.203.21/stream1':
  Metadata:
    title           : stream server
    comment         : stream1
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264, yuvj420p(pc, progressive), 1920x1080, 10 fps, 10 tbr, 90k tbn, 180k tbc
    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
Output #0, image2, to 'output.jpg':
  Metadata:
    title           : stream server
    comment         : stream1
    encoder         : Lavf58.45.100
    Stream #0:0: Video: mjpeg, yuvj420p(pc), 1920x1080, q=2-31, 200 kb/s, 10 fps, 10 tbn, 10 tbc
    Metadata:
      encoder         : Lavc58.91.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
frame=    1 fps=0.0 q=8.9 Lsize=N/A time=00:00:00.10 bitrate=N/A speed=0.214x
video:133kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Teraz jeszcze odznaczę ffmpeg i pozaznaczam ffmpeg-custom ;-)