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

    schliemannw

    04/03/2023, 4:10 AM
    Hi guys! I just recently pushed my first project using Stream to prod but now that I have it all configured for the production environment (webhooks, etc), I realized how difficult it is to keep using this same setup for dev and prod. What is the usual approach here? Do you guys typically keep a different CF account for development? I've been reading the docs didn't seem to find any info about a dev mode or something similar...
  • e

    encounter

    04/03/2023, 5:20 PM
    I'm also very curious how others have used CF stream webhooks across environments; we're running into the exact same problem
  • d

    DemosJarco

    04/04/2023, 1:18 AM
    I think I've narrowed down some. I had the theory that of recording is on, the player keeps infinitely loading the m3u8 even though input is webrtc. But what i found was even if recording is on, if webrtc is streamed first then iframe player is fine. But if you stream (the the same stream id) with rtmps/srt, and then (later, not at the same time) stream as webrtc to the same stream id, then the iframe player will never play webrtc again. But using a custom WHEP player (or even WHEPClient.ts from the stack blitz) will play just fine. So it's a player issue, not infrastructure issue (i think)
  • t

    tt2468

    04/04/2023, 9:01 AM
    ahh that sounds very plausible
  • t

    tt2468

    04/04/2023, 9:01 AM
    hopefully that's an easy fix!
  • t

    tt2468

    04/04/2023, 9:01 AM
    I'd love to see the WHEP-based player appear even if recording is disabled, as that'd help with previewing what the heck is being published on a given input
  • r

    Rachel

    04/05/2023, 2:58 AM
    Interesting. I will have to look into this
  • x

    Xetera

    04/05/2023, 5:16 PM
    do any of you use mobile libraries for live streaming that are compatible with the whip/whep protocols? I looked around with many different languages but there's nothing that's quite compatible and low latency
  • x

    Xetera

    04/05/2023, 5:19 PM
    honestly kinda lost to how I'd set up a toy Twitch app poc even with cloudflare dealing with all the video data
  • d

    DemosJarco

    04/05/2023, 8:36 PM
    For stream webhooks (https://developers.cloudflare.com/stream/manage-video-library/using-webhooks/), which cloudflare ASN is the one performing the
    POST
    ? I'm getting a bunch of crawlers and spam requests to my url so I want to setup a WAF to filter out as much as it can before it even triggers my webhook processor. Right now I'm getting
    AS132892
    and I want to double check that is the one to expect them from and hard code it in
  • f

    fritex

    04/05/2023, 9:17 PM
    Copy code
    curl \
    -X POST \
    -H "Authorization: Bearer AUTH" \
    -d "{\"exp\":\"1680815347\",\"accessRules\":[{\"type\":\"ip.geoip.country\",\"country\":[\"HR\"],\"action\":\"allow\"},{\"type\": \"any\",\"action\": \"block\"}]}" \
    https://api.cloudflare.com/client/v4/accounts/ACCID/stream/VID_ID/token
    I am doing something wrong with the body request (data) with a cURL to generate a signed request which has got expire after 24 hours, limited to mc country, others blocked. Receiving error related to the parsing:
    Copy code
    "code": 10005,
    "message": "Failed to parse body"
    Issue only when I add exp:, while only with accessRules, works fine.
  • f

    fritex

    04/05/2023, 9:21 PM
    Possibly I forgot how to create "one-liner" ...
  • f

    fritex

    04/05/2023, 9:39 PM
    Ou, seems I missed --header 'Content-Type: application/json' while sending data-raw
  • d

    deepdev

    04/05/2023, 9:42 PM
    Could use a webView…? I am but on an electron / desktop app
  • d

    DemosJarco

    04/05/2023, 10:20 PM
    Also for the webhook, i know the event triggers on video process complete. But can you get an event like when process starts?
  • d

    DemosJarco

    04/05/2023, 10:21 PM
    Like, I'm not uploading videos manually. But I'm going for the recording from the corresponding live stream.
  • r

    Rachel

    04/06/2023, 12:10 AM
    can you send renan@cloudflare.com an email?
  • r

    Rachel

    04/06/2023, 12:12 AM
    the community mvp is now also asking the question oh no
  • r

    Rachel

    04/06/2023, 12:12 AM
    @Mickie Betz is that something we can support?
  • r

    Rachel

    04/06/2023, 12:14 AM
    Live video is recording when the livestream starts and ends when the livestream ends. The VOD is ready to be played once the livestream ends: https://developers.cloudflare.com/stream/stream-live/replay-recordings/
  • r

    Rachel

    04/06/2023, 12:15 AM
    There's no "transcoding" step
  • d

    DemosJarco

    04/06/2023, 12:15 AM
    From my testing, I don't get the webhook of ready for about 2-3min after a stream ends
  • r

    Rachel

    04/06/2023, 12:15 AM
    interesting, I will report back to my team
  • r

    Rachel

    04/06/2023, 12:16 AM
    if you try it right now you should see in the dashboard that the video is ready once the livestream ends
  • d

    DemosJarco

    04/06/2023, 12:16 AM
    I thought it might need some time to process, so that's why I was wondering if I can get something immediately when stream ends, and then some follow-up when ready
  • d

    DemosJarco

    04/06/2023, 12:17 AM
    In the dashboard, the video has the "Live" badge and then after about 2-3 min (same as webhook time) the badge changed to "Ready"
  • r

    Rachel

    04/06/2023, 12:17 AM
    Did you change the
    timeoutSeconds
    by any chance?
  • r

    Rachel

    04/06/2023, 12:18 AM
    https://developers.cloudflare.com/stream/stream-live/start-stream-live/
  • d

    DemosJarco

    04/06/2023, 12:20 AM
    Oh. I thought I had it set to 300 (5 min) and it was set to 420 (7 min). So I was expecting it to be ready after 5 min, but it was ready after 7 min. That's why I thought there was a delay
  • d

    DemosJarco

    04/06/2023, 12:20 AM
    yep. that one is on me...
1...929394...105Latest