Occasional bad fragments from f4fpackager?
Hello
I am experiencing occasional odd behavior on packaged content. Sometimes, when playing a stream, the player completely stalls on a fragment. Manually skipping forward a minute solves the stall and the player continues playing the stream.
I see this behavior in several different players (pure OSMF Strobe, as well as mpx thePlatform's player) across multiple OS and Flash 10.x and 11.x runtimes.
If I take the same input .mp4 files (I use multiple bitrates) and repackage, using the exact same f4fpackager command, I often get an output that is playable. I have tried with v4.5.1 and v5 of f4fpackager and see the same behavior. There are no errors or warnings thrown during the packaging process.
This problem of stalls is a major problem for a VOD service as I now have to manually look through each bitrate and check that it is playable without stalls.
I saved two .f4f files: one that fails and one that works. Not knowing exactly the format of f4f (I cannot find a parser) I post my findings here. Perhaps it triggers someone's knowledge. I can only hope. Let me know if more info is needed.
The files are of identical size:
$ ls -l correct_Seg1.f4f failed_Seg1.f4f
-rw-r--r-- 1 hans hans 91378076 Dec 5 09:20 correct_Seg1.f4f
-rw-r--r-- 1 hans hans 91378076 Dec 4 18:07 failed_Seg1.f4f
But they don't contain the same content:
$ diff correct_Seg1.f4f failed_Seg1.f4f
Binary files correct_Seg1.f4f and failed_Seg1.f4f differ
$ cmp -l -b correct_Seg1.f4f failed_Seg1.f4f
55 346 M-f 266 M-6
56 130 X 7 ^G
63 346 M-f 266 M-6
64 130 X 7 ^G
183 346 M-f 266 M-6
184 130 X 7 ^G
191 346 M-f 266 M-6
192 130 X 7 ^G
295 346 M-f 266 M-6
296 130 X 7 ^G
303 346 M-f 266 M-6
304 130 X 7 ^G
40757 346 M-f 266 M-6
40758 130 X 7 ^G
40765 346 M-f 266 M-6
40766 130 X 7 ^G
40869 346 M-f 266 M-6
40870 130 X 7 ^G
40877 346 M-f 266 M-6
40878 130 X 7 ^G
81280 346 M-f 266 M-6
81281 130 X 7 ^G
81288 346 M-f 266 M-6
81289 130 X 7 ^G
81416 346 M-f 266 M-6
81417 130 X 7 ^G
81424 346 M-f 266 M-6
81425 130 X 7 ^G
A more visual diff using emacs hexl-mode:
Correct file, notice the "X" (hex cce3 e658)
00000000: 0000 001c 6674 7970 6634 7620 0000 0001 ....ftypf4v ....
00000010: 6973 6f6d 6d70 3432 6d34 7620 0001 e007 isommp42m4v ....
00000020: 6d6f 6f76 0000 0078 6d76 6864 0100 0000 moov...xmvhd....
00000030: 0000 0000 cce3 e658 0000 0000 cce3 e658 .......X.......X
00000040: 0000 03e8 0000 0000 0002 45eb 0001 0000 ..........E.....
00000050: 0100 0000 0000 0000 0000 0000 0001 0000 ................
00000060: 0000 0000 0000 0000 0000 0000 0001 0000 ................
00000070: 0000 0000 0000 0000 0000 0000 4000 0000 ............@...
00000080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000090: 0000 0000 0000 0000 0000 0004 0000 9e7e ...............~
000000a0: 7472 616b 0000 0068 746b 6864 0100 000f trak...htkhd....
000000b0: 0000 0000 cce3 e658 0000 0000 cce3 e658 .......X.......X
000000c0: 0000 0001 0000 0000 0000 0000 0002 45b9 ..............E.
000000d0: 0000 0000 0000 0000 0000 0000 0100 0000 ................
000000e0: 0001 0000 0000 0000 0000 0000 0000 0000 ................
000000f0: 0001 0000 0000 0000 0000 0000 0000 0000 ................
00000100: 4000 0000 0400 0000 0240 0000 0000 01a2 @........@......
00000110: 6d64 6961 0000 002c 6d64 6864 0100 0000 mdia...,mdhd....
00000120: 0000 0000 cce3 e658 0000 0000 cce3 e658 .......X.......X
00000130: 0000 03e8 0000 0000 0002 45b9 15c7 0000 ..........E.....
00000140: 0000 002c 6864 6c72 0000 0000 0000 0000 ...,hdlr........
00000150: 7669 6465 0000 0000 0000 0000 0000 0000 vide............
...
Incorrect failed file, notice absence of "X" (hex cce3 b607)
00000000: 0000 001c 6674 7970 6634 7620 0000 0001 ....ftypf4v ....
00000010: 6973 6f6d 6d70 3432 6d34 7620 0001 e007 isommp42m4v ....
00000020: 6d6f 6f76 0000 0078 6d76 6864 0100 0000 moov...xmvhd....
00000030: 0000 0000 cce3 b607 0000 0000 cce3 b607 ................
00000040: 0000 03e8 0000 0000 0002 45eb 0001 0000 ..........E.....
00000050: 0100 0000 0000 0000 0000 0000 0001 0000 ................
00000060: 0000 0000 0000 0000 0000 0000 0001 0000 ................
00000070: 0000 0000 0000 0000 0000 0000 4000 0000 ............@...
00000080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000090: 0000 0000 0000 0000 0000 0004 0000 9e7e ...............~
000000a0: 7472 616b 0000 0068 746b 6864 0100 000f trak...htkhd....
000000b0: 0000 0000 cce3 b607 0000 0000 cce3 b607 ................
000000c0: 0000 0001 0000 0000 0000 0000 0002 45b9 ..............E.
000000d0: 0000 0000 0000 0000 0000 0000 0100 0000 ................
000000e0: 0001 0000 0000 0000 0000 0000 0000 0000 ................
000000f0: 0001 0000 0000 0000 0000 0000 0000 0000 ................
00000100: 4000 0000 0400 0000 0240 0000 0000 01a2 @........@......
00000110: 6d64 6961 0000 002c 6d64 6864 0100 0000 mdia...,mdhd....
00000120: 0000 0000 cce3 b607 0000 0000 cce3 b607 ................
00000130: 0000 03e8 0000 0000 0002 45b9 15c7 0000 ..........E.....
00000140: 0000 002c 6864 6c72 0000 0000 0000 0000 ...,hdlr........
00000150: 7669 6465 0000 0000 0000 0000 0000 0000 vide............
...
Any insights most welcome.
Thanks!
Hans
