GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    jwz (jwz@mastodon.social)'s status on Wednesday, 28-May-2025 16:19:57 JST jwz jwz

    RTMP / HLS segment corruption.

    Dear Lazyweb, When my internal video encoder machine relays its RTMP stream to the external public server, MPEG glitches get introduced, and I would like to know how to fix that. I am hoping for answers from someone who...
    https://jwz.org/b/ykoc

    In conversation about a month ago from mastodon.social permalink

    Attachments


    1. https://files.mastodon.social/media_attachments/files/114/583/367/987/989/343/original/16e17880aa62ae07.png

    • Embed this notice
      Peter Krefting (nafmo@social.vivaldi.net)'s status on Wednesday, 28-May-2025 16:19:56 JST Peter Krefting Peter Krefting
      in reply to

      @jwz Does your RTMP source create IDR frames in the H.264 stream? If not, the segmenter might be splitting on keyframes that are needed by the previous segment.

      Looking at the ext/1748393061627.ts, ffmpeg reports that it is not starting with a proper keyframe, which could definitely lead to problems on playback.

      (At $DAYJOB, I write software that can monitor both RTMP and HLS, but it is probably overkill for your application: <http://www.bridgetech.tv>/).

      In conversation about a month ago permalink

      Attachments

      1. No result found on File_thumbnail lookup.
        All Markets - Bridge Technologies
        from designcontainer
    • Embed this notice
      jwz (jwz@mastodon.social)'s status on Wednesday, 28-May-2025 17:01:29 JST jwz jwz
      in reply to
      • Peter Krefting

      @nafmo I don't have the slightest idea. The "int" files were created by OBS and sent to nginx. The "ext" files were sent from nginx to nginx. I don't know how the frames in the segments get split and recombined, but I am pretty sure they are not re-encoded.

      In conversation about a month ago permalink
    • Embed this notice
      Peter Krefting (nafmo@social.vivaldi.net)'s status on Wednesday, 28-May-2025 17:01:29 JST Peter Krefting Peter Krefting
      in reply to

      @jwz Right. I don't have much experience at that end of the chain; I briefly looked at the help pages for OBS but couldn't find any references to IDR or EBP for segmenting.

      What are you using to create the H.264 RTMP stream in the first place? Does it have a setting to generate IDR frames?

      Also, RTMP is an old and underspecified protocol that was used with Adobe Flash; can your encoder output MPEGTS multicasts or something else more modern that OBS can ingest? Does it support inserting EBP (Encoding Boundary Point) markers?

      In conversation about a month ago permalink
    • Embed this notice
      jwz (jwz@mastodon.social)'s status on Wednesday, 28-May-2025 18:17:36 JST jwz jwz
      in reply to
      • Peter Krefting

      @nafmo OBS is not ingesting, it is creating. OBS -> nginx RTMP creates the TS files in the "int" directory which seem fine. Then nginx -> other nginx creates the files in the "ext" directory which seem not. I linked to the doc for the nginx RTMP plugin which also doesn't mention IDR frames, but that is sensible since as far as I am aware moving MPEG frames over RTMP *does not create new frames*.

      "RTMP is old and busted, go find something else" is not what I find a compelling argument.

      In conversation about a month ago permalink
    • Embed this notice
      Peter Krefting (nafmo@social.vivaldi.net)'s status on Wednesday, 28-May-2025 18:17:57 JST Peter Krefting Peter Krefting
      in reply to

      @jwz I'm just trying to understand your setup. Where is the video stream coming from, initially?

      I didn't mean to come off sounding rude, but after 10+ years writing software monitoring RTMP, it is not something I would recommend anyone to use. It's probably not the culprit in this scenario, though.

      In conversation about a month ago permalink
    • Embed this notice
      Peter Krefting (nafmo@social.vivaldi.net)'s status on Wednesday, 28-May-2025 18:29:49 JST Peter Krefting Peter Krefting
      in reply to

      @jwz Sorry, I was not meaning to sound rude, but after 10+ years on writing software to monitor RTMP, it is not something I recommend using, that's why I asked if another transport could work.

      I was trying to understand the setup; what the original video source was and where the segmenting happened. Having the segmentation as close to the encoder as possible is usually better.

      HLS segments need to be playable separately, which is why they should be cut at IDR frames; EBP is a way to signal those cutting points, but having IDR frames in the source stream ought to be enough.

      In conversation about a month ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.