tanersener / mobile-ffmpeg

FFmpeg for Android, iOS and tvOS. Not maintained anymore. Superseded by FFmpegKit.
https://tanersener.github.io/mobile-ffmpeg
GNU General Public License v3.0
3.87k stars 791 forks source link

Error while opening decoder for input stream #0:1 : Function not implemented #500

Closed Mr-Ramzan closed 4 years ago

Mr-Ramzan commented 4 years ago

Description Getting "Error while opening decoder for input stream #0:1 : Function not implemented" in the logs for failed execution of Command for encoding video

              String cmd1 =       " -i "
                   + "\""+videoUrl+"\""
                   + " -s 480x320"
                   + " -acodec mp2"
                   + " -strict -2"
                   + " -ac 1"
                   + " -ar 16000"
                   + " -r 13"
                   + " -ab 32000"
                   + " -aspect 3:2 "

                   + " -y "
                   +"\""+ compressedFile.getAbsolutePath() +"\"" ;

Expected behavior The video should be Compressed or encoded to the given command.

Current behavior It worked on like App Videos but Not On Device's videos[recoded].

Screenshots If applicable, add screenshots to help explain your problem. image image

Logs

            I/mobile-ffmpeg: ffmpeg version v4.3-dev-2955
              Copyright (c) 2000-2020 the FFmpeg developers
            built with Android (5900059 based on r365631c) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm- 
             project 207d7abc1a2abf3ef8d4301736d6a7ebc224a290) (based on LLVM 9.0.8svn)
            configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk- 
               bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile- 
            ffmpeg/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 -- 
           cpu=armv8-a --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --target-os=android -- 
           enable-neon --enable-asm --enable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable- 
           optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev -- 
          enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test -- 
        disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages -- 
          disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable- 
           cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --
           libavutil      56. 42.102 / 56. 42.102
             libavcodec     58. 78.102 / 58. 78.102
          I/mobile-ffmpeg:   libavformat    58. 42.100 / 58. 42.100
             libavdevice    58.  9.103 / 58.  9.103
              libavfilter     7. 77.101 /  7. 77.101
           libswscale      5.  6.101 /  5.  6.101
            libswresample   3.  6.100 /  3.  6.100
            W/mobile-ffmpeg: [aac @ 0x7260ae9500] Audio object type 0
               [aac @ 0x7260ae9500]  is not implemented. Update your FFmpeg version to the newest one from Git. If the problem 
                still occurs, it means that your file has a feature which has not been implemented.
                  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7260aff400] Failed to open codec in avformat_find_stream_info
           W/mobile-ffmpeg: [aac @ 0x7260ae9500] Audio object type 0
                [aac @ 0x7260ae9500]  is not implemented. Update your FFmpeg version to the newest one from Git. If the problem 
              still occurs, it means that your file has a feature which has not been implemented.
            W/mobile-ffmpeg: Guessed Channel Layout for Input Stream #0.1 : mono
           I/mobile-ffmpeg: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 
                        '/storage/emulated/0/Movies/Nokat/videos/VIDEO_20200617_140940.mp4':
               Metadata:
                 major_brand     : 
                isom
                minor_version   : 
                0
              compatible_brands: 
              isom3gp4
              creation_time   : 
                2020-06-17T09:09:45.000000Z
                Duration: 
         I/mobile-ffmpeg: 00:00:11.25
            , start: 
            0.000000
        , bitrate: 
          2588 kb/s
         Stream #0:0
        (eng)
            : Video: h264 (avc1 / 0x31637661), yuv420p(tv, unknown/bt470bg/unknown), 720x1280, 2455 kb/s
, 
             15.83 fps, 
          14.25 tbr, 
          90k tbn, 
          180k tbc
           (default)
            Metadata:
         creation_time   : 
          2020-06-17T09:09:40.000000Z
          handler_name    : 
              VideoHandle
            Stream #0:1
             (eng)
               : Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 128 kb/s
               I/mobile-ffmpeg:  (default)
                 Metadata:
                  creation_time   : 
            2020-06-17T09:09:45.000000Z
              handler_name    : 
           VideoHandle
             W/mobile-ffmpeg: [aac @ 0x7260aea400] Audio object type 0
            [aac @ 0x7260aea400]  is not implemented. Update your FFmpeg version to the newest one from Git. If the problem 
           still occurs, it means that your file has a feature which has not been implemented.
            I/mobile-ffmpeg: Stream mapping:
                Stream #0:0 -> #0:0
             (h264 (native) -> mpeg4 (native))
            I/mobile-ffmpeg:   Stream #0:1 -> #0:1
             (aac (native) -> mp2 (native))
             E/mobile-ffmpeg: Error while opening decoder for input stream #0:1 : Function not implemented
             I/mobile-ffmpeg: Conversion failed!

Environment

tanersener commented 4 years ago

I can't see mobile-ffmpeg version in your logs. It this a local built or a published binary from jcenter/github?

Mr-Ramzan commented 4 years ago
implementation 'com.arthenica:mobile-ffmpeg-full:4.3.2'

i have no idea of the version i used above line in gradle

tanersener commented 4 years ago

It is 4.3.2. Can you try running the same command using 4.4?

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

PavloZoria commented 4 years ago

@tanersener I have a similar issue. I am trying to contact a set of videos from .txt file and get error: Error while opening decoder for input stream #0:1 : Function not implemented Log:

 Duration: 
N/A
, start: 
0.000000
, bitrate: 
864 kb/s
    Stream #0:0
(eng)
: Video: h264 (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 770 kb/s
, 
30 fps, 
30 tbr, 
30k tbn, 
60 tbc
    Metadata:
      handler_name    : 
Apple Video Media Handler
      timecode        : 
00:00:00:00
    Stream #0:1
(eng)
: Audio: aac, 0 channels, fltp
    Metadata:
      handler_name    : 
Snap Audio
[aac @ 0x76d08a7800] Audio object type 0
[aac @ 0x76d08a7800]  is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
Stream mapping:
  Stream #0:0 -> #0:0
 (copy)
  Stream #0:1 -> #0:1
 (aac (native) -> aac (native))
er: roundDifference: 0
Error while opening decoder for input stream #0:1 : Function not implemented
er: payloadLength: 15552, maxPayloadLength: 15552
Conversion failed!
roundDifference: 0
payloadLength: 51000, maxPayloadLength: 51000
roundDifference: 0
payloadLength: 15552, maxPayloadLength: 15552

Lib version: com.arthenica:mobile-ffmpeg-full-gpl:4.4.LTS

Mr-Ramzan commented 4 years ago

Can you mention the Android SDK you are yousing and file system code that you are accessing and providing it to ffmpeg

PavloZoria commented 4 years ago

SDK API 29. And the file that I am using it is a video from the application folder(.../Android/data/my.application.package/myvideos.txt)

Mr-Ramzan commented 4 years ago

Use SDK 28 and perform the same action.

Mine got resolved like so...

Binaries like FFmpeg are not allowed to access apps default dirs