Getting PVMFErrContentInvalidForProgressivePlayback errors when playing mp4 files on samsung devices

I am using the classic implementation of VideoView to play videos on Android.

The same mp4 url ​​file works fine on HTC Desire. However, it does not work on Samsung devices.

Samsung Galaxy S1 and Samsung Galaxy Tab say: "Cannot play video. Unable to play video. Invalid streaming data"
Samsung 5110 says: "Cannot play video. Sorry this video is not valid for streaming to this device"

When I looked at the mp4 file using a text editor, I realized that the mdat tag was before moov.

My question is how it works on HTC, whereas it doesn’t work on Samsung devices. And I have no chance to change the mp4 file format, so how can I solve this problem?

 07-29 15:24:21.740: ERROR/PlayerDriver(2402): PlayerDriver::it is a not Protected file 07-29 15:24:21.763: ERROR/(2402): IIIIIII Inside Constructor of PVMFMemoryBufferWriteDataStreamImpl 07-29 15:24:21.806: ERROR/MediaPlayerService(2402): Client::notify In 07-29 15:24:21.806: ERROR/(2402): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl 07-29 15:24:21.806: ERROR/(2402): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl 07-29 15:24:21.810: ERROR/MediaPlayer(15339): message received msg=3, ext1=0, ext2=0 07-29 15:24:21.810: ERROR/MediaPlayer(15339): callback application 07-29 15:24:21.810: ERROR/MediaPlayer(15339): back from callback 07-29 15:24:21.822: ERROR/(2402): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl 07-29 15:24:21.822: ERROR/(2402): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl 07-29 15:24:21.822: ERROR/MediaPlayerService(2402): Client::notify In 07-29 15:24:21.822: ERROR/MediaPlayer(15339): message received msg=200, ext1=1, ext2=26 07-29 15:24:21.822: ERROR/MediaPlayer(15339): callback application 07-29 15:24:21.822: ERROR/MediaPlayer(15339): back from callback 07-29 15:24:21.822: ERROR/PlayerDriver(2402): Command PLAYER_INIT completed with an error or info -82 07-29 15:24:21.822: ERROR/MediaPlayerService(2402): Client::notify In 07-29 15:24:21.822: ERROR/MediaPlayer(15339): message received msg=100, ext1=200, ext2=-82 07-29 15:24:21.822: ERROR/MediaPlayer(15339): error (200, -82) 07-29 15:24:21.822: ERROR/MediaPlayer(15339): callback application 07-29 15:24:21.826: ERROR/MediaPlayer(15339): back from callback 07-29 15:24:22.025: ERROR/MediaPlayer(15339): Error (200,-82) 
+2
source share
1 answer

Finally, I found the problem.

When I hinted at an mp4 file with mp4box, it also played on samsung devices.

mp4box -hint

This process correctly reconfigured the moov and mdat tags of the video file.

Prior to this, the same file plays well on devices with Android 2.3, but not with devices using Android 2.2. I'm not sure, but the restriction for "safe for streaming" may have been lifted after version 2.3.

+3
source

Source: https://habr.com/ru/post/1346188/


All Articles