Can a byte-range in a m3u8 playlist be length 0? - playlist

According to the HLS Pantos spec, a byte-range in a m3u8 playlist should look like #EXT-X-BYTERANGE:<n>[#<o>] where "n is a decimal-integer indicating the length of the sub-range in bytes".
However, this doesn't specify if "n" can be 0 or negative. This is a particular issue for caption playlists which may have a gap where no captions appear...
Is this a valid playlist?
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-VERSION:4
#EXTINF:10.0,
#EXT-X-BYTERANGE:100#0
media.ts
#EXTINF:10.0,
#EXT-X-BYTERANGE:0#100
media.ts
#EXTINF:10.0,
#EXT-X-BYTERANGE:50#100
media.ts

No, playlist entries with a byte-range length of 0 are NOT valid.

Byte-range can not be zero in any case. I don't think any streamer will send zero value for this.

Related

What is Twitter Direct message max length with media attachment?

I just want to confirm what is the actual Twitter Direct message length when a media is attached?
Currently we observe that it's going down to 9,976 but can't find any twitter official notes. All I can find is one of the many sites that says it's 10,000 characters.
https://marketingland.com/twitter-will-increase-dm-character-limit-from-140-to-10000-131947
Here's the sample JSON payload with attachment
{
"event":{
"type":"message_create",
"message_create":{
"target":{
"recipient_id":"xxxxx"
},
"message_data":{
"text":"Post Man Test with media. Max character is reduce to 9,976 instead of 10,000...",
"attachment":{
"type": "media",
"media": {
"id": 1243471116468800000 }
}}}}}
Without the attachment object, max characters becomes 10,000
When media is attached, the message will contain a t.co link to the image itself. The length of t.co links is currently 23 characters, so (with a single character space to separate from the text) this would match the length you are seeing.
You can confirm this by checking the Twitter help/configuration endpoint, which returns:
"short_url_length_https": 23
So, yes, the maximum text length with an image in a Direct Message would be 10,000-24, i.e. 9,976 characters. Unlike a regular Tweet, Direct Messages do not have the ability to "discount" the media link from the body of the message.

What is the maximum length of a Dailymotion video title?

What characters can I use in a Dailymotion video title (UTF-8) ? Are there any forbidden chars ("<>") ? And what is the maximum length of a video title ?
The title of a video needs to have a length between 1 and 255 characters and accepts any UTF-8 charater.
You can find all the list of our guidelines here: API guidelines

ODATA: Special Character in URL

I am facing an issue in creating a ODATA URL.
For the Following URL,
https://xxxxxxx.xxx.xxxxxxxx.com/sap/c4c/odata/v1/c4codataapi/CorporateAccountHasContactPersonCollection?$filter=AccountID eq '1000024'
Result :
- <m:properties>
<d:ObjectID>00163E10AD0B1ED686EF458B4E8C51D5</d:ObjectID>
<d:ParentObjectID>00163E10AD201EE5A4F0B592DE751AE8</d:ParentObjectID
<d:AccountID>1000024</d:AccountID>
<d:ContactID>1002636</d:ContactID>
<d:FunctionCode>Z021</d:FunctionCode>
<d:Mobile>+33 123456789</d:Mobile>
<d:Phone>+33 987654321</d:Phone>
</m:properties>
Same for result when i change filter to FunctionCode
https://xxxxxxx.xxx.xxxxxxxx.com/sap/c4c/odata/v1/c4codataapi/CorporateAccountHasContactPersonCollection?$filter=FunctionCode eq 'Z021'
But When I search with filter Phone
https://xxxxxxx.xxx.xxxxxxxx.com/sap/c4c/odata/v1/c4codataapi/CorporateAccountHasContactPersonCollection?$filter=Phone eq '+33 123456789'
URL doesnt work at all. Is it becuase of special character "+" in Phone Number
I tried with $filter=endswith(Phone, '123456789'), It worked fine. But this is not solution i am looking for.
Can any one suggest another ways?
Thank you
Regards
Prat
The reason is that these special characters has different meaning when used in URLs. The JavaScript “encodeUri” or “encodeUriComponent” does not solve this problem.
Here is the list of the special characters that needs to be replaced when used in the OData queries:
https://msdn.microsoft.com/en-us/library/aa226544(SQL.80).aspx
The special character + Indicates a space (and spaces cannot be used in a URL) so you need to replace the character's with its hexadecimal value, in this case %2B.
Your corrected filter should then be $filter=Phone eq '%2B33 123456789'.
Find a good article here.

hls aes encrypted video not playing after EXT-X-DISCONTINUITY tag on ios

It looks like the ios doesn't like hls m3u8 files that mixes encrypted .ts files with the EXT-X-DISCONTINUITY tag.
Here is a test play list, it's a mix of two video. a preroll ad un encrypted and the main encrypted video. Both plays well separatly but when I put them together in a single m3u8, separated by a EXT-X-DISCONTINUITY, only the preroll is played and then the player stop.
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXTINF:10,
http://ixemes-ppweb.ixemes.com/prerollmain/vig_400-0.ts
#EXTINF:10,
http://ixemes-ppweb.ixemes.com/prerollmain/vig_400-1.ts
#EXT-X-DISCONTINUITY
#EXTINF:10,
#EXT-X-KEY:METHOD=AES-128,URI="http://ixemes-ppweb.ixemes.com/prerollmain/113760.key"
http://ixemes-ppweb.ixemes.com/prerollmain/02-0.ts
#EXTINF:10,
http://ixemes-ppweb.ixemes.com/prerollmain/02-1.ts
#EXTINF:10,
http://ixemes-ppweb.ixemes.com/prerollmain/02-2.ts
#EXTINF:10,
http://ixemes-ppweb.ixemes.com/prerollmain/02-3.ts
#EXTINF:10,
http://ixemes-ppweb.ixemes.com/prerollmain/02-4.ts
#EXTINF:10,
http://ixemes-ppweb.ixemes.com/prerollmain/02-5.ts
#EXTINF:10,
http://ixemes-ppweb.ixemes.com/prerollmain/02-6.ts
#EXTINF:10,
http://ixemes-ppweb.ixemes.com/prerollmain/02-7.ts
#EXTINF:10,
http://ixemes-ppweb.ixemes.com/prerollmain/02-8.ts
#EXTINF:10,
http://ixemes-ppweb.ixemes.com/prerollmain/02-9.ts
#EXTINF:10,
http://ixemes-ppweb.ixemes.com/prerollmain/02-10.ts
#EXTINF:10,
http://ixemes-ppweb.ixemes.com/prerollmain/02-11.ts
#EXTINF:2,
http://ixemes-ppweb.ixemes.com/prerollmain/02-12.ts
#EXT-X-ENDLIST
I have tryed with two un-encrypted videos and it works. And I see nothing in the HLS specs that says it's forbidden to use the EXT-X-DISCONTINUITY tag with encrypted videos : https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-08#section-6.3.3
So I guess it's apple implementation of it's own specs that is wrong, but maybe it's me doing it wrong.
I have made a quick html page to test it (open it in safari on any ios5 device) : http://ixemes-ppweb.ixemes.com/prerollmain/index.html
I noticed your EXT-X-KEY doesn't have an IV term, a.k.a. an initialization vector. This is supported by the standard, e.g.:
#EXT-X-KEY:METHOD=AES-128,URI="https://priv.example.com/key.php?r=52",IV=0x9c7db8778570d05c3177c349fd9236aa
If this is missing, here's how https://developer.apple.com/library/ios/technotes/tn2288/_index.html says the player should pick the IV:
The default Initialization Vector for media encryption (if none is
specified) is the sequence number of the media file. You should
specify an Initialization Vector value, and not rely on sequence
numbers. The main reason for this is portability. For example, if you
change where the segment appears in the playlist (e.g. inserting an
ad), that changes its sequence number, requiring a re-encrypt.
On my team we were having trouble figuring out why encrypted content with inserted ads weren't playing. We had an example of encrypted content that played:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:11
#EXT-X-KEY:METHOD=AES-128,URI="http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans.key"
#EXTINF:11,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-1.ts
#EXTINF:7,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-2.ts
#EXTINF:7,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-3.ts
#EXTINF:8,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-4.ts
#EXTINF:10,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-5.ts
#EXTINF:6,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-6.ts
#EXTINF:9,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-7.ts
#EXTINF:7,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-8.ts
#EXTINF:9,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-9.ts
#EXTINF:8,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-10.ts
#EXTINF:8,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-11.ts
#EXTINF:8,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-12.ts
#EXTINF:6,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-13.ts
#EXTINF:9,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-14.ts
#EXTINF:5,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-15.ts
#EXT-X-ENDLIST
You can try this at http://demo.theplatform.com/dev/m3u8/encrypted.m3u8. But then when we inserted content before it, like this, it didn't play:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:11
#EXT-X-KEY:METHOD=NONE
#EXTINF:10.01,
http://ne.edgecastcdn.net/0008B0/mps/Inkola_VMS/20/687/15_WordIsOut_UPFW1764H_1080p_20802040_m3u8_video_480x0_400000_primary_audio_eng_2_x5e1c9dd7b9834f38a319d348e1a5f9ee_00001.ts
#EXTINF:5.088,
http://ne.edgecastcdn.net/0008B0/mps/Inkola_VMS/20/687/15_WordIsOut_UPFW1764H_1080p_20802040_m3u8_video_480x0_400000_primary_audio_eng_2_x5e1c9dd7b9834f38a319d348e1a5f9ee_00002.ts
#EXT-X-DISCONTINUITY
#EXT-X-KEY:METHOD=AES-128,URI="http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans.key"
#EXTINF:11,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-1.ts
#EXTINF:7,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-2.ts
#EXTINF:7,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-3.ts
#EXTINF:8,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-4.ts
#EXTINF:10,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-5.ts
#EXTINF:6,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-6.ts
#EXTINF:9,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-7.ts
#EXTINF:7,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-8.ts
#EXTINF:9,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-9.ts
#EXTINF:8,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-10.ts
#EXTINF:8,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-11.ts
#EXTINF:8,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-12.ts
#EXTINF:6,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-13.ts
#EXTINF:9,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-14.ts
#EXTINF:5,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-15.ts
#EXT-X-ENDLIST
This URL is http://demo.theplatform.com/dev/m3u8/mix.m3u8. The problem, we figured out, was because we added two segments, the media sequence number was now off by 2. If you explicitly set the IV to "0x00000000000000000000000000000001", like this:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:11
#EXT-X-KEY:METHOD=NONE
#EXTINF:10.01,
http://ne.edgecastcdn.net/0008B0/mps/Inkola_VMS/20/687/15_WordIsOut_UPFW1764H_1080p_20802040_m3u8_video_480x0_400000_primary_audio_eng_2_x5e1c9dd7b9834f38a319d348e1a5f9ee_00001.ts
#EXTINF:5.088,
http://ne.edgecastcdn.net/0008B0/mps/Inkola_VMS/20/687/15_WordIsOut_UPFW1764H_1080p_20802040_m3u8_video_480x0_400000_primary_audio_eng_2_x5e1c9dd7b9834f38a319d348e1a5f9ee_00002.ts
#EXT-X-DISCONTINUITY
#EXT-X-KEY:METHOD=AES-128,URI="http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans.key",IV=0x00000000000000000000000000000001
#EXTINF:11,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-1.ts
#EXTINF:7,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-2.ts
#EXTINF:7,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-3.ts
#EXTINF:8,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-4.ts
#EXTINF:10,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-5.ts
#EXTINF:6,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-6.ts
#EXTINF:9,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-7.ts
#EXTINF:7,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-8.ts
#EXTINF:9,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-9.ts
#EXTINF:8,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-10.ts
#EXTINF:8,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-11.ts
#EXTINF:8,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-12.ts
#EXTINF:6,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-13.ts
#EXTINF:9,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-14.ts
#EXTINF:5,
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes-audio=65000-video=2042000-15.ts
#EXT-X-ENDLIST
Then it works. You can try this as http://demo.theplatform.com/dev/m3u8/mix_fixed.m3u8. So maybe that was the issue you were running into.
Ok it looks like it's not related to the encrytion of the main video but more how the main video is encoded. I don't have control on how the main video is encoded. I only encoded (and chuncked) myself the preroll video for testing purpose.
If i mix the preroll with the same main video but un encrypted, it doesn't work also.
if i mix two video encoded by the same exteral encoder, encrypted (or not) it doesn't work.
Don't know whats wrong with then encoding parameters of the external encoder, but the discontinuity tag doesn't works it.
But if i encode myself both video (preroll and main), encrypt the main one, and put them in a single m3u8 file using the discontinuity tag, it works.
So there is still something wrong of how ios handles the discontinuity tag and doesn't fully reset the player parameters, but at least it's possible to insert a un encrypted preroll video before an encrypted one.

Yahoo Pipes - How Do I Truncate the last 5 Characters

I am using Yahoo Pipes to rewrite a URL. Everything is fine but the last 6 characters of the URL need to be removed from all the links.
Ex.
http://www.mysite.com/blahblah/34567
needs to be rewritten to
http://www.mysite.com/blahblah
The number at the end is always changing, so I am hoping to just chop the last 6 characters off of each url.
You'll want the Sub string module. Presuming it functions in a similar way to other languages, you'll want an undefined From value, and a Length value of -6, which should cut 6 characters off the end of the URL.
Seems that a regex in (.*)(.....) and takinq only the first match should do the trick

Resources