Mars Box Stream Tv Channel

There are 2 replies in this Thread which was already clicked 2,284 times. The last Post () by tony34567.

  • Stream a Recording or prebufferd Tv Channel with Mars


    Ok before you read on I will say this was just something I did for fun and you might or might not find it useful but it works for me.


    Why is this useful?


    Maybe you have a handful of friends that are watching crappy iptv streams for a big fight or football match and you want to help them out.


    Here is how it works.


    Say something cool is on tv (Won't say any channels names ) and we book a recording from the epg on the Mars box that will save the file to our usb stick or usb storage.


    Now because I set my Mars to save recordings to /mnt/sda/sda1 <--- [my usb storage connected to Mars box] a .ts file will start saving the live recording of the TV channel to this file.


    Because we have an ftp server running on the Mars box FFmpeg can stream the .ts to file to FFserver.


    FFmpeg sends streams to FFserver and encodes them on the fly if needed
    FFserver then allows multiple users to access this stream via http.


    How many clients FFserver can stream to is down to your upload speed and the bitrate the video is being streamed at.



    Things needed


    1. Mars Box
    2. Android Ftp app
    3. Something running ubuntu 14.04 (I'm using 14.04 64bit)
    4. ffmpeg.zip setup.sh ffserver.conf




    Lets begin


    Start up ubuntu


    sudo -i <--- Login as root to make things easier


    6b065b7c46.png


    copy ffmpeg.zip setup.sh ffserver.conf to /tmp
    chmod 755 /tmp/setup.sh
    cd /tmp
    ./setup.sh


    ea8b8a9458.png



    This is going to take a long time to build and install so be prepared for long wait.


    653f7d167c34a9e6de118.jpg



    When it's finished you will have ffmpeg and ffserver installed.


    Now we move to the Mars box and install the Ftp server apk



    45d04b4b8b937ae48bff.jpg



    Goto settings -> Home directory -> Custom Folder



    3de359dd66a52f667f89c.jpg



    Now Click Custom Folder and find your usb device that you are recording too.


    0e1e809990645e94ab82557f.jpg
    40fde1da96b79602c351a7be.png


    Press the big red button


    Take note of your ip address and port.


    Ok so far so good the ftp server is now sharing our usb storage from the mars box.



    Next thing we do is make sure the Mars box is setup to record to our usb storage so go into:


    Mars Tv
    Press Menu on remote
    Goto Settings on far right
    Click PVR Settings and select your usb storage mine is /mnt/sda/sda1


    5da6f2598d7e9fffd.jpg


    DONT USE /mnt/sdcard because you will fill up your internal storage on Mars box.


    Ok now everything is ready to go and you are ready to start streaming your recording.


    If you want remote users to watch the stream you will need to open a DMZ on your router and point it at your ubuntu machine, my laptop is 192.168.1.75 on the local network so I go into my router settings and create the DMZ to point at this address.


    So the big fight is starting and the box is recording to the .ts file on your storage and you let the file build up for about 10 mins so it is a nice size. if we don't allow the file to get to a certain size FFmpeg will stop sending data to server because it will have reached the end of the file so thats why it needs to be big. Yours friends stream will be 10-15 mins behind but hey better than nothing.


    start your ffserver
    ffserver /etc/ffserver.conf &



    8abb299b10f2ca81b93.jpg



    Ok your recording is now at a nice size so ffmpeg wont chew up quicky, open up firefox broswer on ubuntu and type:


    ftp://192.168.1.142:2221 <-- change this to ip on the ftp app on your Mars box
    This will show the list of files on the usb storage, now copy the name of the .ts recording.


    2a1218.jpg


    Open another terminal and type this:
    ffmpeg -i "ftp://192.168.1.142:2221/BBC NEWS-20160919_22-32-59.ts" http://localhost:8090/stream1.ffm


    Congrats you are now streaming a delayed live channel to your friends.


    dd44ced9e.jpg


    178c38773b.jpg


    Another useful thing you can do with FFmpeg is restream a stream


    Say you are paying for IPTV and you have a direct link that only allows a single user to watch at one time well now you can use FFmpeg & FFserver to stream this to your friends and the IPTV provider knows not different plus its not using the IPTV providers bandwidth.


    Here is how to do it


    ffmpeg -i "http://mycooliptv.media.com:8080/flysports.ts" http://localhost:8090/stream1.ffm


    How can my friends watch the stream


    First get your remote ip > goto google type whats my ip and it will show it.


    so say my remote ip is 123.222.333.444


    I will give my friends this link http://123.222.333.444:8090/test.ts
    They can then enter this in the MxPlayer, Vlc player or the software of their choice


    Cheers

  • Very interesting :)

    PM for support 0nly with a Link to Y0ur
    P05t w1Th Wat5 up 0r 155u3 thaT5
    B33N ....... P05T3D


    0D3R PATCH3D 3H ;)
    much <3 th0ugh in d0 a5 Ab0v3
    1n Wh3n 533N r3plY n PM n 58PP0rt G1v3n ;)



    "I'm against Piracey so please DONT ATTACK SHIPS"
    :p

  • master G

    Added the Label Article

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!