From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id F306F40C43 for ; Sat, 5 Feb 2022 18:09:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 27B4568AF04; Sat, 5 Feb 2022 20:09:42 +0200 (EET) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 48E6168AF00 for ; Sat, 5 Feb 2022 20:09:35 +0200 (EET) Received: by mail-lj1-f175.google.com with SMTP id z20so13424021ljo.6 for ; Sat, 05 Feb 2022 10:09:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=ayrqKxvDKSn/qfl7ZUQ0XlWe6iXpeVoGaAiE8cUwEK4=; b=h9+P1yzEp9UUo2zu7KY0s6TD6foVzC6ZhK70Hw5oOmFqA9oaZ/f0DsgvJ9nKBmk/3R MoMUuYwsNEU6Y5hP1UlMXN1yWpib/rVbig76QMbTYNN3RlnfGodAsJCtXlcc/Ll+NKRy wVlOsC87xhrKp1VYC5t51Szp5dmAG0G7IlsAaRi1ImUvrRNUdvl85T4IZ58+Ag2ZB58A rYqE6FNd+bY19ov3QH/3QAudg7ol9mzcZ+09U2kK/g2fRvWXNxuIsr0ukuNJYMkw+JUS /rlsmLsD5EolTwE9w+PQpLirVkqk62kCWzwuUbAKkdQ7USU/A0VA+AJoC4hO4fJfMbnp Ys8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ayrqKxvDKSn/qfl7ZUQ0XlWe6iXpeVoGaAiE8cUwEK4=; b=BhYowfKB5LyxkdNttoDGCnNuPhwAJnRLLmOt3OKzOdE0x7y9UUORLdz/zitxQWkUDP x1tpmMQkV58QEvBShqKYzhbgGmRV3rm0/SuuVr86vtTgHoyMBo2Ua5894juGpz6y+DMy QK5NMZdKd7EPRigwnYifR1XtmyvQB6nN6VpWkvyMP8T6xb4lWz8nSae65pUsSL+U/k0K nnUykRBhzOyw1Z8RqKDmoL20UJbOVaUVeJvm7ovZCrjm3Vi2/OtpkEgk1d1qB4EIZIyT hcZkGiIgNvj87hWp7ns0yyCMG5+xRN4sU/IDzNFzA6akTHmNJcQZVZ3c4JISV0gTbFqS Zo8w== X-Gm-Message-State: AOAM532QjtVY2X+mgx6BuLK4UMhxITE2OHfe+h1Vjne5YCC+/sBhW5vz ayRKDqwKHZ6rh5v4/qyl3geUalcInKqH3i/BunfgX2+Ib8k= X-Google-Smtp-Source: ABdhPJxtOk4ns4voJ0BEFHUsX1KEvE1/iLiWxsjVHbzqIpswacTQKYNeMkNdKFxOnvv8ExZap4fZVYPPFJSoWivEPno= X-Received: by 2002:a2e:7116:: with SMTP id m22mr3387196ljc.67.1644084573984; Sat, 05 Feb 2022 10:09:33 -0800 (PST) MIME-Version: 1.0 From: Kevin Wang Date: Sat, 5 Feb 2022 13:09:02 -0500 Message-ID: To: ffmpeg-devel@ffmpeg.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [FFmpeg-devel] Demuxing and decoding raw RTP stream X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Hi, I'm implementing a pipeline where I receive inbound RTP packets in memory but I'm having trouble figuring out how to set up libavformat to handle/unwrap the RTP packets. I have all relevant information about the underlying codec necessary but since it's h264 I cannot simply strip the RTP header trivially. I create the input context with goInputFunction writing one packet per invocation. void *readbuf = av_malloc(1500); AVIOContext *avioreadctx = avio_alloc_context(readbuf, 1500, 0, transcoder, &goInputFunction, NULL, NULL); AVFormatContext *inputctx = avformat_alloc_context(); inputctx->pb = avioreadctx; inputctx->flags |= AVFMT_FLAG_CUSTOM_IO; When I open it with avformat_open_input(&inputctx, NULL, NULL, NULL) it repeatedly calls the read function but doesn't actually progress. I suspect because the RTP stream itself does not have enough information to fully describe the codec? If I leave this open out, then av_read_frame(inputctx, input_packet) down the road segfaults, I'm guessing because the input context is uninitialized. So to my question, is it possible to set the codec details that the SDP would typically set, but manually? I'm looking for an example of how to manually configure the AVFormatContext to consume RTP packets without an SDP and setting up a UDP port listener. Thanks, Kevin _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".