2
1
We are using Helix Server in order to distribute Video On Demand (with multi-bitrate) Content among our audience. This means that there is one MP4 file that contains multiple video streams and one audio stream. The source for our MP4 files is Helix Producer (encodes raw video into a MP4 file).
Helix Server does recognize the multiple different video streams within the file if we use the MP4 file straight from Helix Producer. FFprobe output for it:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '..\..\validate\20140225095504.mp4':
Metadata:
major_brand : 3gr6
minor_version : 0
compatible_brands: 3gr63gp63gg63gp5isom
creation_time : 2014-02-25 08:55:04
Duration: 01:35:54.14, start: 0.000000, bitrate: 1051 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 568x320, 285 kb/s, 23.80 fps, 25 tbr, 1k tbn, 50 tbc (default)
Metadata:
handler_name : Video Stream
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 47 kb/s (default)
Metadata:
handler_name : Audio Stream
Stream #0:2(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 568x320, 653 kb/s, 23.80 fps, 25 tbr, 1k tbn, 50 tbc (default)
Metadata:
handler_name : Video Stream
Stream #0:3(und): Data: none (rtp / 0x20707472), 17 kb/s (default)
Metadata:
handler_name : Video Stream
Stream #0:4(und): Data: none (rtp / 0x20707472), 8 kb/s (default)
Metadata:
handler_name : Audio Stream
Stream #0:5(und): Data: none (rtp / 0x20707472), 31 kb/s (default)
Metadata:
handler_name : Video Stream
Unsupported codec with id 0 for input stream 3
Unsupported codec with id 0 for input stream 4
Unsupported codec with id 0 for input stream 5
However, we need to cut the file - we use FFmpeg in order to keep the multiple video streams:
ffmpeg.exe -i ..\..\validate\20140225095504.mp4 -map 0:0 -map 0:1 -map 0:2 -acodec copy -vcodec copy -ss 00:30:00 -t 00:03:00 -movflags faststart+rtphint out.mp4
This is where our problem starts. Helix Server does not recognize the different video streams anymore and only offers the first one to the client. FFprobe tells me the following about the new file:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.34.101
Duration: 00:03:00.00, start: 0.000000, bitrate: 2096 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 568x320, 286 kb/s, 23.87 fps, 25 tbr, 16k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 47 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream #0:2(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 568x320, 655 kb/s, 23.87 fps, 25 tbr, 16k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:3(eng): Data: none (rtp / 0x20707472), 335 kb/s
Metadata:
handler_name : HintHandler
Stream #0:4(eng): Data: none (rtp / 0x20707472), 3 kb/s
Metadata:
handler_name : HintHandler
Stream #0:5(eng): Data: none (rtp / 0x20707472), 762 kb/s
Metadata:
handler_name : HintHandler
Unsupported codec with id 0 for input stream 3
Unsupported codec with id 0 for input stream 4
Unsupported codec with id 0 for input stream 5
I already tried a considerable amount of combinations of all -movflags options and -rtpflag options. But none of them helped.
I futhermore tried to set the major_brand with mp4box:
mp4box -brand 3gr6 out.mp4
and to create the hinting tracks with mp4box:
mp4box -hint out.mp4
But I'm stuck.
Does anybody have experience with Helix Server in combination with multi-bitrate MP4 files? Or are there any other ways to cut and concatenate MP4 files?
Hi Florian. Facing the same issue, I'm curious to learn what you ended up doing. – Behnam – 2014-04-14T07:52:06.080