We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Personal opkg Package Repo + youtube-dl + ffmpeg



  • It is really simple!

    First things first.
    Omega2 Build System

    After compile process packages will be create in the source folder.

    • Full path -> source/bin/packages/mipsel_24kc

    Just copy that folder to public domain and edit the /etc/opkg/distfeeds.conf
    file proper way.

    • I build for myself it includes youtube-dl, ffmpeg, some video tools etc.
    wget -qO- https://yasinkarabulak.com/omega2/packages/distfeeds.conf >> /etc/opkg/distfeeds.conf
    
    	OR
    
    nano /etc/opkg/distfeeds.conf
    
    # below lines goes in to /etc/opkg/distfeeds.conf
    # ------------------------------------------------
    src/gz ysnO2_base https://yasinkarabulak.com/omega2/packages/base
    src/gz ysnO2_luci https://yasinkarabulak.com/omega2/packages/luci
    src/gz ysnO2_onion https://yasinkarabulak.com/omega2/packages/onion
    src/gz ysnO2_packages https://yasinkarabulak.com/omega2/packages/packages
    src/gz ysnO2_routing https://yasinkarabulak.com/omega2/packages/routing
    src/gz ysnO2_telephony https://yasinkarabulak.com/omega2/packages/telephony
    src/gz ysnO2_main https://yasinkarabulak.com/omega2/packages/main
    
    ctrl + o; ctrl + x
    opkg update
    

    OR

    • you can copy the files in to flashdisk and define the addresses in to distfeed.conf
    src/gz local_base file:///tmp/mounts/USB-A1/packages/mipsel_24kc/base
    src/gz local_luci file:///tmp/mounts/USB-A1/packages/mipsel_24kc/luci
    src/gz local_onion file:///tmp/mounts/USB-A1/packages/mipsel_24kc/onion
    src/gz local_packages file:///tmp/mounts/USB-A1/packages/mipsel_24kc/packages
    src/gz local_routing file:///tmp/mounts/USB-A1/packages/mipsel_24kc/routing
    src/gz local_telephony file:///tmp/mounts/USB-A1/packages/mipsel_24kc/telephony
    src/gz local_main file:///tmp/mounts/USB-A1/packages/mipsel_24kc/main
    

    youtube-dl

    install the youtube-dl

    opkg install youtube-dl

    download some youtube video info

    youtube-dl -F https://www.youtube.com/watch?v=gGdhzmfIYtI

    download the neccecary file in to omega2

    youtube-dl -f140 https://www.youtube.com/watch?v=gGdhzmfIYtI

    root@Omega-C617:~# youtube-dl -f140 https://www.youtube.com/watch?v=gGdhzmfIYtI
    [youtube] gGdhzmfIYtI: Downloading webpage
    [youtube] gGdhzmfIYtI: Downloading video info webpage
    [youtube] gGdhzmfIYtI: Extracting video information
    WARNING: unable to extract uploader nickname
    [download] Destination: Onion Omega2 Kickstarter Video-gGdhzmfIYtI.m4a
    [download] 100% of 2.46MiB in 00:41
    WARNING: gGdhzmfIYtI: writing DASH m4a. Only some players support this container. Install ffmpeg or avconv to fix this automatically.
    root@Omega-C617:~# ls Onion*
    Onion Omega2 Kickstarter Video-gGdhzmfIYtI.m4a
    

    It's really slow but fun thing to do šŸ™‚ have a nice day
    0_1532687065585_b79b6ff3-eb7f-40f3-8699-058bd1e3841f-image.png

    before the installation
    0_1532687703661_f842a11c-1f1e-4575-9533-755c28c2b93d-image.png

    ffmpeg

    root@Omega-C617:~# opkg install ffmpeg
    Installing ffmpeg (3.2.2-1) to root...
    Downloading https://yasinkarabulak.com/omega2/packages/packages/ffmpeg_3.2.2-1_mipsel_24kc.ipk
    Installing libopus (1.1.4-1) to root...
    Downloading https://yasinkarabulak.com/omega2/packages/packages/libopus_1.1.4-1_mipsel_24kc.ipk
    Installing libffmpeg-full (3.2.2-1) to root...
    Downloading https://yasinkarabulak.com/omega2/packages/packages/libffmpeg-full_3.2.2-1_mipsel_24kc.ipk
    Configuring libopus.
    Configuring libffmpeg-full.
    Configuring ffmpeg.
    root@Omega-C617:~#
    

    after the installation
    0_1532687745163_56d6e036-fb2e-41b0-887c-c610b5b2607d-image.png

    Let's convert the downloaded m4a to mp3 file

    root@Omega-C617:~# ffmpeg -i Onion\ Omega2\ Kickstarter\ Video-gGdhzmfIYtI.m4a Onion\ Omega2\ Kickstarter\ Video-gGdhzmfIYtI.mp3
    

    0_1532688094260_39d927eb-b2c4-4ee7-9394-171625934220-image.png

    in the ext4 file system Omega2p has about 7kB second convert rate

    root@Omega-C617:~# ffmpeg -i Onion\ Omega2\ Kickstarter\ Video-gGdhzmfIYtI.m4a Onion\ Omega2\ Kickstarter\ Video-gGdhzmfIYtI.mp3
    ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 5.4.0 (LEDE GCC 5.4.0 r3503-d62d8430d1)
      configuration: --enable-cross-compile --cross-prefix=mipsel-openwrt-linux-musl- --arch=mipsel --target-os=linux --prefix=/usr --pkg-config=pkg-config --enable-shared --enable-static --enable-small --enable-pthreads --enable-zlib --disable-doc --disable-debug --enable-gpl --enable-version3 --disable-dxva2 --disable-lzma --disable-vaapi --disable-vda --disable-vdpau --disable-outdevs --disable-altivec --disable-vsx --disable-power8 --disable-amd3dnow --disable-amd3dnowext --disable-mmx --disable-mmxext --disable-sse --disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-avx --disable-xop --disable-fma3 --disable-fma4 --disable-avx2 --disable-aesni --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-inline-asm --disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --disable-msa --disable-mmi --disable-fast-unaligned --disable-runtime-cpudetect --disable-yasm --enable-libopus --enable-decoder=libopus --enable-libmp3lame
      libavutil      55. 34.100 / 55. 34.100
      libavcodec     57. 64.101 / 57. 64.101
      libavformat    57. 56.100 / 57. 56.100
      libavdevice    57.  1.100 / 57.  1.100
      libavfilter     6. 65.100 /  6. 65.100
      libswscale      4.  2.100 /  4.  2.100
      libswresample   2.  3.100 /  2.  3.100
      libpostproc    54.  1.100 / 54.  1.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Onion Omega2 Kickstarter Video-gGdhzmfIYtI.m4a':
      Metadata:
        major_brand     : dash
        minor_version   : 0
        compatible_brands: iso6mp41
        creation_time   : 2016-09-23T14:06:28.000000Z
      Duration: 00:02:42.28, start: 0.000000, bitrate: 127 kb/s
        Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 7 kb/s (default)
        Metadata:
          creation_time   : 2016-09-23T14:06:28.000000Z
          handler_name    : SoundHandler
    Output #0, mp3, to 'Onion Omega2 Kickstarter Video-gGdhzmfIYtI.mp3':
      Metadata:
        major_brand     : dash
        minor_version   : 0
        compatible_brands: iso6mp41
        TSSE            : Lavf57.56.100
        Stream #0:0(und): Audio: mp3 (libmp3lame), 44100 Hz, stereo, fltp (default)
        Metadata:
          creation_time   : 2016-09-23T14:06:28.000000Z
          handler_name    : SoundHandler
          encoder         : Lavc57.64.101 libmp3lame
    Stream mapping:
      Stream #0:0 -> #0:0 (aac (native) -> mp3 (libmp3lame))
    Press [q] to stop, [?] for help
    size=    2537kB time=00:02:42.29 bitrate= 128.0kbits/s speed=0.157x    
    video:0kB audio:2536kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.013322%
    

    in the fat file system Omega2p seems %10 faster for audio encoding

    ...
    Stream mapping:
      Stream #0:0 -> #0:0 (aac (native) -> mp3 (libmp3lame))
    Press [q] to stop, [?] for help
    size=     691kB time=00:00:44.14 bitrate= 128.1kbits/s speed=0.169x
    

    0_1532689219101_f7f15dd4-0d10-4ea3-83c6-f489cc97a845-image.png

    FFMPEG video to bmp sequence on omega2

    • In your 'ffmpeg installed computer' convert some video to your display size. (If you try this part in the omega it will possibly kill you, "time issue - life time" šŸ™‚ )
      ffmpeg -i some-video-file.mp4 -vf scale=320:240 scaled.avi
    • copy scaled.avi file to ffmpeg installed omega2 using flashdisk, scp etc.
    • then we are ready!

    connect the console of omega2 and type the command (edit the directory for your side)
    ffmpeg -i scaled.avi -pix_fmt rgb565 -r 1/1 seqtest/file%001d.bmp
    in this code 1/1 means 1 frame per second, 25/1 25 frame per second, and so on. Omega2p can handle 12fps

    root@Omega-C617:/tmp/run/mountd/sda1# ffmpeg -i scaled.avi -pix_fmt rgb565 -r 1/1 seqtest/file%1d.bmp
    ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 5.4.0 (LEDE GCC 5.4.0 r3503-d62d8430d1)
      configuration: --enable-cross-compile --cross-prefix=mipsel-openwrt-linux-musl- --arch=mipsel --target-os=linux --prefix=/usr --pkg-config=pkg-config --enable-shared --enable-static --enable-small --enable-pthreads --enable-zlib --disable-doc --disable-debug --enable-gpl --enable-version3 --disable-dxva2 --disable-lzma --disable-vaapi --disable-vda --disable-vdpau --disable-outdevs --disable-altivec --disable-vsx --disable-power8 --disable-amd3dnow --disable-amd3dnowext --disable-mmx --disable-mmxext --disable-sse --disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-avx --disable-xop --disable-fma3 --disable-fma4 --disable-avx2 --disable-aesni --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-inline-asm --disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --disable-msa --disable-mmi --disable-fast-unaligned --disable-runtime-cpudetect --disable-yasm --enable-libopus --enable-decoder=libopus --enable-libmp3lame
      libavutil      55. 34.100 / 55. 34.100
      libavcodec     57. 64.101 / 57. 64.101
      libavformat    57. 56.100 / 57. 56.100
      libavdevice    57.  1.100 / 57.  1.100
      libavfilter     6. 65.100 /  6. 65.100
      libswscale      4.  2.100 /  4.  2.100
      libswresample   2.  3.100 /  2.  3.100
      libpostproc    54.  1.100 / 54.  1.100
    Input #0, avi, from 'scaled.avi':
      Metadata:
        encoder         : Lavf57.56.101
      Duration: 00:04:14.67, start: 0.000000, bitrate: 345 kb/s
        Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 204 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 30k tbc
        Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, s16p, 128 kb/s
    [swscaler @ 0x7de250] No accelerated colorspace conversion found from yuv420p to rgb565le.
    Output #0, image2, to 'seqtest/file%1d.bmp':
      Metadata:
        encoder         : Lavf57.56.100
        Stream #0:0: Video: bmp, rgb565le, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 1 fps, 1 tbn, 1 tbc
        Metadata:
          encoder         : Lavc57.64.101 bmp
    Stream mapping:
      Stream #0:0 -> #0:0 (mpeg4 (native) -> bmp (native))
    Press [q] to stop, [?] for help
    frame=    5 fps=2.5 q=-0.0 size=N/A time=00:00:05.00 bitrate=N/A dup=0 drop=106 speed=2.47x
    frame=    6 fps=2.4 q=-0.0 size=N/A time=00:00:06.00 bitrate=N/A dup=0 drop=135 speed=2.37x
    frame=    7 fps=2.3 q=-0.0 size=N/A time=00:00:07.00 bitrate=N/A dup=0 drop=163 speed= 2.3x
    frame=    8 fps=2.3 q=-0.0 size=N/A time=00:00:08.00 bitrate=N/A dup=0 drop=191 speed=2.26x
    
    ...
    
    frame=  252 fps=1.9 q=-0.0 size=N/A time=00:04:12.00 bitrate=N/A dup=0 drop=7264 speed=1.87x
    frame=  253 fps=1.9 q=-0.0 size=N/A time=00:04:13.00 bitrate=N/A dup=0 drop=7292 speed=1.87x 
    frame=  254 fps=1.9 q=-0.0 size=N/A time=00:04:14.00 bitrate=N/A dup=0 drop=7321 speed=1.87x
    frame=  255 fps=1.9 q=-0.0 size=N/A time=00:04:15.00 bitrate=N/A dup=0 drop=7349 speed=1.87x 
    frame=  256 fps=1.9 q=-0.0 Lsize=N/A time=00:04:16.00 bitrate=N/A dup=0 drop=7371 speed=1.87x
    video:38416kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    

    If you have a frame buffer device, something like SPI TFTLCD display, this script might be helpfull for testing

    root@Omega-C617:/tmp/run/mountd/sda1/seqtest# for i in `ls -v *.bmp`; do cat $i > /dev/fb0; done
    


Looks like your connection to Community was lost, please wait while we try to reconnect.