How do you plan to change the quality of the video in androids to the middle?



  • According to this page https://developer.android.com/guide/topics/media/c ...I can send some instructions, like:

    MediaStore. EXTRA_OUTPUT - This setting requires a Uri specifying a path and file name where you'd like to save the video. This setting is optional but strongly recommended. If you do not specify this value, the Camera application saves the requested video in the default location with a default name, specified in the returned intent's Intent.getData() field. MediaStore. EXTRA_VIDEO_QUALITY - This value can be 0 for lowest quality and smallest file size or 1 for highest quality and larger file size. MediaStore. EXTRA_DURATION_LIMIT - Set this value to limit the length, in seconds, of the video being captured. MediaStore. EXTRA_SIZE_LIMIT - Set this value to limit the file size, in bytes, of the video being captured.

    I tried to use one of the parameters.MediaStore.EXTRA_VIDEO_QUALITY😞

    Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
            intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0);
            startActivityForResult(intent, REQUEST_VIDEO_CAPTURE);
    

    and it's a very strange parameter. First, it not only changes the minimum permit but also changes the ratio to 4:3. Second, a 15-second image weighs ~ 300-500 cb when it is completely similar to that of 30 MB. It's a clear overtake.

    I don't need 30 MB videos (because it's still on the grid, most likely through the cellular connection), but 0.3 MB is a clear overtake. 0.5 is viewed by a camera as 0 (and not described).

    PS Yes, the video is already time-limited - 15 seconds.



  • Based on the documentation of only 2 values may be transferred either 0 or 1. Anything else can't be taken. Watch https://developer.android.com/reference/android/provider/MediaStore.html?hl=ru#EXTRA_VIDEO_QUALITY

    EXTRA_VIDEO_QUALITY

    Added in API level 3 String EXTRA_VIDEO_QUALITY The name of the Intent-extra used to control the quality of a recorded video. This is an integer property. Currently value 0 means low quality, suitable for MMS messages, and value 1 means high quality. In the future other quality levels may be added.

    Constant Value: "android.intent.extra.videoQuality."

    Because you get that it's only possible to decode the video, which in your experience is not a good idea. Usually takes a lot of time and eats a lot of batteries. So basically, there's only a choice between:

    1. Use a user battery on the carpet.
    2. Use the batteries for video transmission.
    3. To enjoy the size of the video in "low quality"



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2