5

The error code when video load error

{"error": {"errorException": "com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.640034, -1, null, [2160, 3840, 24.000002], [-1, -1]), format_supported=NO_EXCEEDS_CAPABILITIES", "errorString": "ExoPlaybackException type : 1"}}

Currently I'm using this version and building on real Android device

react-native: 0.64

react-native-video: ^5.2.0-alpha1

This is h.264 video example: https://lifebeligum.s3.ap-southeast-1.amazonaws.com/documents/2021-10-04/ef07eb88-1e53-4800-b7cb-64e908a264c3.mp4

Does anyone have any idea for it?

  • The video file is 2160x3840 pixels (4K) in size. You should [edit](https://stackoverflow.com/posts/69543538/edit) your post to include how you testing (emulator or physical device with make/model/OS version). – Morrison Chang Oct 12 '21 at 15:58
  • Thanks for your reply. I just updated! – Lê Hoàng Chinh Oct 12 '21 at 16:06
  • When mentioning a physical device you should state tech specs, for example Samsung S9, model number G9600 running Android 10. Or at least state if the video plays with VLC for Android on the device you are using. Also realize that the plugin is using Exoplayer under the hood, so you should read: https://exoplayer.dev/debug-logging.html – Morrison Chang Oct 12 '21 at 16:18

1 Answers1

3

The video linked is using the H.264 High profile - this is not one of the standard Android supported formats, although some devices may support it.

Currently Baseline and Main profile are listed as supported as standard. You can see the list here:

You can check the encoding profile using a tool like ffprobe:

ffprobe version N-95216-ge6625ca41f-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2007-2019 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.8)
  configuration: ......
  libavutil      56. 35.100 / 56. 35.100
  libavcodec     58. 59.101 / 58. 59.101
  libavformat    58. 33.100 / 58. 33.100
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 61.100 /  7. 61.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Desktop/ef07eb88-1e53-4800-b7cb-64e908a264c3.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41isomavc1
    creation_time   : 2020-07-07T20:03:53.000000Z
  Duration: 00:00:16.50, start: 0.000000, bitrate: 13565 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 2160x3840, 13562 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc (default)
    Metadata:
      creation_time   : 2020-07-07T20:03:53.000000Z
      handler_name    : L-SMASH Video Handler
      encoder         : AVC Coding

You can re-encode your video with Main or Baseline and test to confirm or test with a video which you know meets the recommendation

Mick
  • 24,231
  • 1
  • 54
  • 120