VOD, stream alias and streaming over HTTP problems

VOD, stream alias and streaming over HTTP problems

Support ForumCategory: QuestionsVOD, stream alias and streaming over HTTP problems
keiser asked 3 months ago
Here is what I have:

  • mp4 files in media folder
  • in configuration I have set the following parameters to true
    • hasStreamAliases  (config.lua)
    • hasIngestPoints (config.lua)
    • hasGroupNameAliases (webconfig.json)
  • the reason is I don’t want to have direct links toward media sources in webpages/devices
  • and I want that each session gets it’s own alias and cannot share media link to the other session/user
When settings above are false I’m doing the following thing as described here :
  1. pullstream uri=rtmp://…/vod/xxx.mp4 localname=test
  2. use VLC to play video at URI: http://localhost:9999/test
and this seems to be working although (I’m missing few seconds from the beginning of the video??!?). Now when I enable aliasing as described above, I cannot repeat above steps. I know I’m missing addstreamalias command but I’m not sure when to issue.
  1. pullstream command reports success
  2. addstreamalias also reports success (addStreamAlias localStreamName=test  aliasName=123 )
  3. use VLC URI: http://localhost:9999/123    seems not to be working
  Is this possible. I was doing similar before when browsers supported FLASH and RTMP/RTSP protocols were supported. Today this is not possible for VOD, so the only option is described in docs. Please answer to my questions as follows:
  1. why I’m missing few seconds of video start (aliases disabled)?
  2. how to support VOD/mp4 without doing pullstream and is it possible? (HTML5 browsers now can stream mp4 directly if I’m not wrong)?
  3. how to setup EVO to support aliases on VOD, over HTTP(S) and what is the right command flow (in docs this is not covered properly)?
  4. do VOD files by default have some “localname” value or there is command I missed to issue to setup local name for VOD?
Let’s start with this set of questions. Tnx. K.



6 Answers
erika Staff answered 3 months ago

Hi keiser!

1. why I’m missing few seconds of video start (aliases disabled)?
A: There are different factors why. Is it consistent in all your stream sources? We might need additional logs for this issue.

2. how to support VOD/mp4 without doing pullstream and is it possible? (HTML5 browsers now can stream mp4 directly if I’m not wrong)?
A: If you have the VOD or MP4 file, you place it directly to the media folder. Modern browsers can play MP4 files directly.

3. how to setup EVO to support aliases on VOD, over HTTP(S) and what is the right command flow (in docs this is not covered properly)?
A: Alias in VOD: addStreamAlias localStreamName=mp4:myfile.mp4 aliasName=myVODalias expirePeriod=0
Media file with “myfile.mp4” filename will have an alias of “myVODalias”
https://docs.evostream.com/2.0/addStreamAlias.html#alias-in-vod

4. do VOD files by default have some “localname” value or there is command I missed to issue to setup local name for VOD?
A; If you want to issue a localstreamname to a vod file, you need to issue a pullStream command where your VOD is the stream source:
pullStream uri=rtmp://localhost/file.mp4 localStreamName=test
Note: The file should be in the media folder.
Hope this helps.

keiser answered 3 months ago
Erika, my comments below: 1.A: There are different factors why. Is it consistent in all your stream sources? We might need additional logs for this issue. This happens when I issue pullStream command to get localname for vod/mp4 file and stream on <video>           <source url=”http://localhost:9999/localname&#8221; type=”video/mp4″> </video> as described on docs link (you have suggested, btw I have gone through all docs and worked before with 1.7 version). There are some inconsistencies with this but I would like to get to clarification of this later when we resolve more important things below (it might be that this is result of other things rather then EVO) 2.  A: If you have the VOD or MP4 file, you place it directly to the media folder. Modern browsers can play MP4 files directly. I’m aware of this, so you propose not to use EVO for requesting/reproducing MP4 files? (there is or no gain with EVO is this case? can you elaborate what are benefits if there are for using EVO). 3. A: Alias in VOD: addStreamAlias localStreamName=mp4:myfile.mp4 aliasName=myVODalias expirePeriod=0 So after issuing addStreamAlias command, i can use http://localhost:9999/myVODalias to play mp4 file, right? 
Correct me if I’m wrong: to create HLS afterwards to support mobile device video reproduction (since not all videos might be supported on mobile devices), I would use
“HLS VOD Work Around” described in docs, this way: addStreamAlias localStreamName=mp4:myfile.mp4 aliasName=myVODalias expirePeriod=0
pullStream uri=rtmp://localhost/vod/myVODalias keepAlive=1 localstreamname=DummyLive
createHLSStream localstreamnames=DummyLive bandwidths=128 targetfolder=../evo-webroot/ groupname=hls playlisttype=appending

and now.. what is the rest of the commands that need to be issued to get HLS aliasing? That part I don’t understand from docs. An example full flow would be very helpful. What I would like to achieve is not to create for every page session full HLS, but to be able to reuse already prepared HLS files over and over again, without “encoding” and  to support every session with different alias URL for the same stream. Is that some how possible to get and what would be the proper order of commands? 4. A; If you want to issue a localstreamname to a vod file, ….. Why would I need to issue pullStream command if I can use addStream alias instead to get the same functionality (as described in Q.3)?    Regards, K.    
keiser answered 3 months ago
sry about format…when I was writing post it was visually fine..   K.
keiser answered 3 months ago
Erika, my comments below: 1.A: There are different factors why. Is it consistent in all your stream sources? We might need additional logs for this issue. This happens when I issue pullStream command to get localname for vod/mp4 file and stream on (without aliasing) <video>          
     <source url=”http://localhost:9999/localname” type=”video/mp4″>
 </video>  as described on docs link (you have suggested, btw I have gone through all docs and worked before with 1.7 version). There are some inconsistencies with this but I would like to get to clarification of this later when we resolve more important things below (it might be that this is result of other things rather then EVO) 2.  A: If you have the VOD or MP4 file, you place it directly to the media folder. Modern browsers can play MP4 files directly. 
I’m aware of this, so you propose not to use EVO for requesting/reproducing MP4 files? (there is or no gain with EVO is this case? can you elaborate what are benefits if there are for using EVO).   3. A: Alias in VOD: addStreamAlias localStreamName=mp4:myfile.mp4 aliasName=myVODalias expirePeriod=0  So after issuing addStreamAlias command, i can use http://localhost:9999/myVODalias to play mp4 file, right? 
Correct me if I’m wrong: to create HLS afterwards to support mobile device video reproduction (since not all videos might be supported on mobile devices), I would use
“HLS VOD Work Around” described in docs, this way:  addStreamAlias localStreamName=mp4:myfile.mp4 aliasName=myVODalias expirePeriod=0
pullStream uri=rtmp://localhost/vod/myVODalias keepAlive=1 localstreamname=DummyLive
createHLSStream localstreamnames=DummyLive bandwidths=128 targetfolder=../evo-webroot/ groupname=hls playlisttype=appending

and now.. what is the rest of the commands that need to be issued to get HLS aliasing? That part I don’t understand from docs. An example of the full flow would be very helpful. What I would like to achieve is not to create for every page session full HLS, but to be able to reuse already prepared HLS files over and over again, without “encoding” and  to support every session with different alias URL for the same stream. Is that some how possible to get and what would be the proper order of commands?    4. A; If you want to issue a localstreamname to a vod file, ….. Why would I need to issue pullStream command if I can use addStream alias instead to get the same functionality (as described in Q.3)?      Regards, K. 
keiser answered 3 months ago
P.S. something is wrong with this forum editor 🙁

Offcanvas

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.