https://discord.cloudflare.com logo
Join Discord
Powered by
# stream
  • h

    HardAtWork

    05/12/2023, 4:53 PM
    Yeah, basically this is a WebRTC proxy. If you have two devices next to each other, it might be a little slower, but if they are on the other side of the globe, it should be a lot faster
  • h

    HardAtWork

    05/12/2023, 4:53 PM
    Plus, you don’t have to deal with thousands of inbound connections
  • m

    Mini_

    05/12/2023, 4:55 PM
    is it the whip/whep spec?
  • k

    kamranicus

    05/12/2023, 6:34 PM
    Hey there, I was curious if I could upload a video to Stream and then dynamically play a clip from it using start/end times. Lo and behold I saw the Stream Clipping API, but I'm confused. I expected to pass start/end time in the POST and get back a URL or details to embed in a player ("given a start time and end time" which is exactly what I need). But it seems like it generates a clip? Not sure. I'm confused specifically because the response fields seem like they should be in the request object (
    startTimeSeconds
    and
    endTimeSeconds
    ) 😅 Is there an example of this? https://developers.cloudflare.com/api/operations/stream-video-clipping-clip-videos-given-a-start-and-end-time
  • k

    kamranicus

    05/12/2023, 6:36 PM
    OK, so I'm not crazy, that's what this doc says, but the API doc itself seems... wrong? 🙂 https://developers.cloudflare.com/stream/edit-videos/video-clipping/
  • k

    kamranicus

    05/12/2023, 6:37 PM
    This is awesome btw, very excited to try this for a specific use case
  • r

    Rachel

    05/12/2023, 7:06 PM
    @Mini_ effectively the publisher and viewers are talking to cloudflare. Stream handles the distribution of the stream, so neither the publisher or viewers will see each other. Think of running an nginx as reverse proxy, the backend wouldn't know the real client IP (except if you add the X- headers)
  • Quality on playback
    r

    Rachel

    05/12/2023, 7:07 PM
    @Kyle_Cloudflare do you maybe have some ideas on this
    k
    s
    • 3
    • 3
  • m

    Mickie Betz

    05/12/2023, 7:54 PM
    ah, you're right- the API docs seem to omit the important information around parameters to clip on (start and end time!). We'll get those fixed up, the stream docs you linked to contain the right info on how to use.
  • s

    Spenser

    05/15/2023, 1:39 AM
    Any word on when AV1 is coming back?
  • m

    maverick_sf

    05/15/2023, 9:18 PM
    Hi, I am trying to use the WebRTC endpoint. I created a live input, and added it's WHIP url in the stackblitz code here: https://stackblitz.com/edit/cloudflare-templates-gg4y2e?file=src%2Findex.html&terminal=start-stackblitz&title=Stream%20live%20video%20(using%20WHIP)%20over%20WebRTC%20with%20Cloudflare%20Stream While I see that the input status in the stream dashboard changed to connected, I was not able to see any video in the player. Waited for a while, but just kept getting the "Stream has not yet started" message. Any idea on what I am missing?
  • r

    Rachel

    05/16/2023, 12:53 AM
    🤔 did you have recording disabled for your input?
  • m

    maverick_sf

    05/16/2023, 12:53 AM
    No, the Live Playback and Recording is enabled
  • r

    Rachel

    05/16/2023, 1:02 AM
    that may explain the issue
  • r

    Rachel

    05/16/2023, 1:02 AM
    Could you create a new input but with recording disabled?
  • m

    maverick_sf

    05/16/2023, 1:20 AM
    Yeah, that worked like a charm. Thanks Rachel!
  • m

    maverick_sf

    05/16/2023, 1:22 AM
    I have also been trying to stream a video to Cloudflare via a python backend server. Do you know if there are any docs/examples that can guide me on how to stream to WHIP endpoint in python?
  • r

    Rachel

    05/16/2023, 4:35 AM
    WHIP specifically, no. However, you can take a look at https://github.com/aiortc/aiortc/blob/main/examples/webcam/webcam.py, but you may have to implement the exchange of SDP yourself
  • a

    altryne

    05/17/2023, 2:55 PM
    Noticed this issue return, the upload didn't encode due to an unknown error. last time I reported this became in incident, so figured I'd drop this here

    https://cdn.discordapp.com/attachments/893253103695065128/1108407533338636358/CleanShot_2023-05-17_at_08.54.162x.png▾

  • m

    maverick_sf

    05/18/2023, 12:55 AM
    Hi, I am tryin to send a sdp offer in my python backend to the cloudflare WHIP url with multiple tracks (audio and video). I have the following code:
    Copy code
    pc.addTransceiver("audio", direction="sendonly")
    pc.addTransceiver("video", direction="sendonly")
    .
    .
    .
    if player and player.audio:
        pc.addTrack(player.audio)
    
    if player and player.video:
        pc.addTrack(player.video)
    However, when I send the sdp offer via a post request, I receive an error 400 from the cloudflare endpoint. One difference that I observed between the StackBlitz javascript implementation and aiortc's python implementation is that there is no option to specify the bundlePolicy as max-bundle in python (not sure if that's the issue). Cloudflare team, can you please help me debug this?
  • m

    maverick_sf

    05/18/2023, 12:56 AM
    Also, my code works if I send only a video file and comment out the pc.addTransceiver("audio") part.
  • s

    Schachte

    05/18/2023, 4:26 PM
    Mind sharing video ID?
  • r

    Rachel

    05/18/2023, 5:58 PM
    What does the SDP look like? Can you dm me with it?
  • r

    Rachel

    05/19/2023, 6:01 PM
    @maverick_sf it seems like the python webrtc library does support bundling, but somehow generated two sets of ice credentials
  • r

    Rachel

    05/19/2023, 6:03 PM
    can you dm the code snippet that does the SDP generation?
  • m

    maverick_sf

    05/19/2023, 6:40 PM
    Sure
  • v

    VirtualGhost

    05/22/2023, 10:01 AM
    got a question about CF Stream, is it better to use this over AWS for building a VOD platform?
  • s

    SZYMON

    05/22/2023, 11:39 AM
    does anyone know what is the cost of distributing 1gb of video to the end user?
  • s

    screaminganus

    05/22/2023, 12:01 PM
    Cloudflare Stream doesn't bill by size of video, but instead by the minutes stored and minutes viewed. Therefore, it depends how long the video is, how many people watch it, and if you store it or not.
  • s

    screaminganus

    05/22/2023, 12:01 PM
    I seem unable to set a 'Custom Input Domain'. I've created a CNAME record on the side of my domain host, and it seems to reflect that when querying the domain, but it's stuck at 'Pending' in the Cloudflare interface. I've tried removing it and re-adding it several times with no luck. I've also tried to use the 'Revalidate' function, but again this has changed nothing. What can I do to fix this?
1...101102103104105Latest