From: Kevin Wang <kevmo314@gmail.com> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] Demuxing and decoding raw RTP stream Date: Sat, 5 Feb 2022 13:09:02 -0500 Message-ID: <CAPeaFSTjb-MLSTPgQtamNCa13TinvrMQBDdGwoxZ30ZYe3rL9Q@mail.gmail.com> (raw) 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".
reply other threads:[~2022-02-05 18:09 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAPeaFSTjb-MLSTPgQtamNCa13TinvrMQBDdGwoxZ30ZYe3rL9Q@mail.gmail.com \ --to=kevmo314@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git