0

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.

stuikomma
  • 61
  • 7
  • You didn't specify the video codecs used, only the container format. You may want to have a look at the [exact markup](http://diveintohtml5.info/video.html#markup) for the ` – user2428118 Sep 26 '12 at 11:12
  • I'm aware of that :) but the site gets generated via a php script that only knows the container format. It would take quite some effort to the codecs as well. So I would refrain from doing that unless it is absolutely vital for making it work on the BB browser. – stuikomma Sep 26 '12 at 12:45
  • [According to HTML5test.com](http://html5test.com/compare/browser/bb06.html#head-audio), the only audio codec supported by BlackBerry OS 6 is MP3. None of the video formats [tested](http://html5test.com/compare/browser/bb06.html#head-video) are supported. (This may be a problem with the BlackBerry browser not reporting the video support correctly, however.) – user2428118 Sep 26 '12 at 13:06
  • @user2428118 It will be the browser's reporting. What sense does it make to support the video tag but no common video codecs? .mp4 and and the two codecs I tried were the only formats I found that supposedly work. So I went with that. – stuikomma Sep 26 '12 at 14:14

1 Answers1

0

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"
stuikomma
  • 61
  • 7