1

This is a progress after the question Embedding Image/Video Stream into webpage that was answered for the picture only using curl, video is still an open issue.

Resuming, I need to avoid that the visitor of a web page see the real source of an image streming. So I want to embed the video a some wrapper php page that doesnt use any userid/password but is under my control. Embedding the video stream into any HTML page it's really easy:

<img src="http://5.246.77.89:8090/videostream.cgi?user=stack&amp;pwd=overflow&amp;resolution=32&amp;rate=15" alt="">

For some time I'll give you the opportunity to test the source of the video streaming that I want to hide here

http://93.58.198.189:8090/videostream.cgi?user=stack&pwd=overflow&resolution=32&rate=15

Now all I need is a simple web page let say video.php that is able to stream the video without asking credentials and hiding the original source IP, something like

<img src='my.php'>

How can I obtain this behavior? Note that despite the source is a video stream, the header is image/jpeg as you can see by yourself and it works with any browser. I've tried to use

<?php 
header("content-type:image/jpeg"); 
passthru("http://93.58.198.189:8090/videostream.cgi?user=stack&pwd=overflow&resolution=32&rate=15"); 
?>

but for some reason doesn't work. Any idea?

Community
  • 1
  • 1
Power Engineering
  • 713
  • 14
  • 26
  • [Have a look here, Please](http://stackoverflow.com/questions/15797762/reading-mp4-files-with-php) – Ohgodwhy Oct 05 '14 at 09:31
  • @Ohgodwhy thank you for your prompt feedback but the code for mp4 doesn't work in this case, despite it's easier. That code perform a kind of buffering on the file, something that is very slow even in case it work. Furthermore X-Sendfile is not a solution as looking at the header anyone can see the origin of the file. I just want to hide the IP:PORT and credentials of the streamer. Just that. – Power Engineering Oct 05 '14 at 09:42
  • Did you managed to get this figured out? I have this exact same need.. – Benjamin Vison May 19 '16 at 01:39
  • @BenjaminVison unfortunetely not. This issue is still unresolved at present. – Power Engineering May 19 '16 at 09:50

1 Answers1

-1

Good question, i was also had a same problem. Now its solved for me. just you can go to you tube video url where your video is stored and below the video there is share ad embed, you go to embed and there you will get a url which can be embeded to your video.php. it works.

  • thank you for your feedback but here the situation is more critical as the video is a live streming video coming from a real camera. On you tube the video is related to a file stored somewhere ... here there's nothing that can be stored as the live video is practically an endless file. – Power Engineering Oct 06 '14 at 13:19