What encoding settings for BlackBerry HTML5 streaming?
-
03-07-2021 - |
문제
For several days I've been desperately trying to get my videos stream on BlackBerry as well as the major desktop and mobile browser. The videos are embedded in this way:
<video preload="auto" controls="controls">
<source src="url.mp4" type=video/mp4 />
<source src="url.ogv" type=video/ogv />
//flash fallback
</video>
When opening the page in the BB browser the black video frame with the controls appears but when I try to play the video the frame stays black and displays an error message: "Video portion is of an unsupported format". Sound does play however.
By now I have tried H.264 and mpeg4 with AAC audio and both of them don't play properly on my BB (OS version 6.0). I've been using ffmpeg to encode the files.
해결책
A video that finally worked has the following parameters (output from ffprobe)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf54.6.100
Duration: 00:02:03.74, start: 0.000000, bitrate: 917 kb/s
Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p , 480x360 [SAR 1:1 DAR 4:3], 786 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 24k tbc
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 22050 Hz, stereo, s16, 128 kb/s
Metadata:
handler_name : SoundHandler
0.00 A-V:-134874618Frame changed from size:0x0 to size:480x360
2.74 A-V: 0.070 fd= 9 aq= 7KB vq= 38KB sq= 0B f=0/0 f=0/0
To encode such a file use these parameters for ffmpeg:
ffmpeg.exe -i "input_file.mov" -strict -2 -vcodec mpeg4 -vb 786k -acodec aac -ab 128k "output_file.mp4"
제휴하지 않습니다 StackOverflow