mp4 stream

tryp's Avatar

tryp

04 Jun, 2011 10:13 PM via web

hello again

I am trying to setup a stream but i cant seem to figure out how to request a mp4 version of a stream.

what i have done so far is get the access token and merged it with stream url to get the full path but i am assuming the stream is in the original video format

i converted a video i had to mp4 but it does not create the mp4 and put it in folder.

so how do i get the stream url of the mp4 version of a video?

thx

  1. 2 Posted by tunix on 04 Jun, 2011 11:01 PM

    tunix's Avatar

    Hello tryp,

    After you start the convertion process for any video, its link will be
    available on the same place where you started the convertion. By design,
    put.io considers MP4 files as part of any video file so you can find their
    URL's from the video's page and at the bottom of the video.

    I hope this helps..

    ---
    Quis custodiet ipsos custodes?

  2. 3 Posted by tryp on 04 Jun, 2011 11:05 PM

    tryp's Avatar

    sry i guess i was not clear when i asked. I meant when requesting the stream url in the api.

    when u get the content item in the api it only has a boolean value of has_mp4

    what i would like to know is how do i get the mp4 url using the api?

    thx

  3. 4 Posted by tunix on 06 Jun, 2011 11:53 AM

    tunix's Avatar

    Hello tryp,

    I've just converted a video file to MP4 and succeeded to retrieve its URL
    with the following commands:

    login to api:

    In [7]: a = putio.Api("XXXXXXX", "XXXXXXX")
    In [13]: x = a.get_items(id = 13789934)[0]

    In [15]: x.has_mp4
    Out[15]: 1

    In [18]: x.get_download_url()
    Out[18]: u'http://put.io/download-file/140/13789934'

    In [16]: x.mp4_stream_url
    Out[16]: u'http://frc02.put.io/stream-mp4/140/13789934'

    You can also create MP4 files via APIv1.

    ---
    Quis custodiet ipsos custodes?

  4. 5 Posted by tryp on 06 Jun, 2011 01:02 PM

    tryp's Avatar

    hi,

    Something to keep in mind i am using the raw http requests.

    When i make the api call i get "has_mp4" but i dont get "mp4_stream_url".

    "mp4_stream_url" is simply not one of the parameters returned.

    do i need to construct the url some how?(i know about the token i mean the base url)

    thx

  5. Support Staff 6 Posted by aybars.badur on 06 Jun, 2011 01:36 PM

    aybars.badur's Avatar

    Hi,

    You can construct the stream mp4 url like this,
    http://put.io/stream-mp4/4/17503886/atk/c7c43c2bf1d19b5605bf4598e00...

    where 4 is the user_id, 17503886 is the file id and c7c43c2bf1d19b5605bf4598e003d97794ce27 is the token,

    hope this information helps, please don't hesitate to ask if you need further information.

  6. aybars.badur closed this discussion on 06 Jun, 2011 01:36 PM.

Comments are currently closed for this discussion. You can start a new one.