Android — Can't play any videos (mp4/mov/3gp/etc.)?

前端 未结 3 1128
旧时难觅i
旧时难觅i 2020-12-03 06:16

I\'m having great difficulty getting my Android application to play videos from the SD card. It doesn\'t matter what size, bitrate, video format, or any other setting I can

3条回答
  •  庸人自扰
    2020-12-03 06:50

    Okay, here goes. The video I've been working on in Adobe Premiere is supposed to be 480x800 (WxH), but I have the Adobe Media Encoder output the sequence as an "Uncompressed Microsoft AVI" using the "UYVY" video codec, 24fps frame rate, progressive, square pixels, and dimensions: 720x800 (WxH). This outputs a rather large file with 120px black borders on either side of the video content. I then take the video into Handbrake 0.9.4 and use the following settings (I started with the Regular->Normal preset):

    Container: MP4 File
    Large file size: [un-Checked]
    Web-optimized: [un-Checked]
    iPod 5G support: [un-Checked]
    
    Width: 320 (this is key, any higher than 320 and it won’t work)
    Height: 528
    Keep Aspect Ratio: [Checked]
    Anamorphic: None
    
    Crop Left: 120
    Crop Right: 120
    
    Everything under the "Video Filter" tab set to "Off"
    
    Video Codec: H.264(x264)
    Framerate: same as source
    2-Pass Encoding: [Checked]
    Turbo first pass: [un-Checked]
    Avg Bitrate: 384
    
    Create chapter markers: [un-Checked]
    
    Reference Frames: 2
    Mixed References: [un-Checked]
    B-Frames: 0
    Motion Estimation Method: Uneven Multi-Hexagon
    Sub-pixel Motion Estimation: 9
    Motion Estimation Range: 16
    Analysis: Default
    8x8 DCT: [un-Checked]
    CABAC Entropy Coding: [un-Checked]
    No Fast-P-Skip: [un-Checked]
    No DCT-Decimate: [un-Checked]
    Deblocking: Default, Default
    Psychovisual Rate Distortion: [MAX]
    

    My main problem was that I was trying to output an mp4 file with 480x800 (WxH) dimensions. After changing the width to 320 (higher values didn't work), yet keeping the proper aspect ratio, the output video now plays without errors. I hope this helps someone else with a similar problem.

    Side note: I wish the Android video restrictions were better documented.

提交回复
热议问题