* [FFmpeg-devel] How to implement pcap ffmpeg format? @ 2023-02-21 22:33 sonntex 2023-02-21 22:38 ` Kieran Kunhya 0 siblings, 1 reply; 12+ messages in thread From: sonntex @ 2023-02-21 22:33 UTC (permalink / raw) To: ffmpeg-devel I want to implement something which helps me to play rtp stored in pcap files. tcpdump -i lo udp port 50000 -s0 -w - | ffplay <codec options> -i - The specification of pcap files is really simple and I could create a new ffmpeg format, but don't know how to process rtp packets extracted from pcap, because it seems that all functions for rtp parsing are private. Need a good example of inner ffmpeg formats processing. _______________________________________________ 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". ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [FFmpeg-devel] How to implement pcap ffmpeg format? 2023-02-21 22:33 [FFmpeg-devel] How to implement pcap ffmpeg format? sonntex @ 2023-02-21 22:38 ` Kieran Kunhya 2023-02-21 22:55 ` sonntex 0 siblings, 1 reply; 12+ messages in thread From: Kieran Kunhya @ 2023-02-21 22:38 UTC (permalink / raw) To: FFmpeg development discussions and patches On Tue, 21 Feb 2023, 22:33 sonntex, <sonntex@gmail.com> wrote: > I want to implement something which helps me to play rtp stored in pcap > files. > > tcpdump -i lo udp port 50000 -s0 -w - | ffplay <codec options> -i - > > The specification of pcap files is really simple and I could create a new > ffmpeg format, but don't know how to process rtp packets extracted from > pcap, because it seems that all functions for rtp parsing are private. > > Need a good example of inner ffmpeg formats processing. > How is ffmpeg meant to know the meaning of the contents of a pcap and the format inside? This is a very bad idea. What's next, ffmpeg implementing userspace TCP? Are we going to add support for parsing filesystems as well? Regards, Kieran Kunhya > _______________________________________________ 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". ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [FFmpeg-devel] How to implement pcap ffmpeg format? 2023-02-21 22:38 ` Kieran Kunhya @ 2023-02-21 22:55 ` sonntex 2023-02-22 8:04 ` Gijs Peskens 0 siblings, 1 reply; 12+ messages in thread From: sonntex @ 2023-02-21 22:55 UTC (permalink / raw) To: FFmpeg development discussions and patches New pcap ffmpeg format can have all options rtpdec requires. Anyway, I don't suggest you implement this feature. I just want to find a good entry point to start coding personally. I need to create a development tool for rtp tracing, and pcap files seem a good idea because I can grab rtp using tcpdump, or create pcap files directly in my application, or whatever. It's better then wrap vp8/vp9 to ivf or h264 to byte stream and pass it to ffmpeg via pipe because it doesn't require coding of new solutions for every video and audio formats transferring over rtp. On Tue, Feb 21, 2023 at 10:38 PM Kieran Kunhya <kierank@obe.tv> wrote: > On Tue, 21 Feb 2023, 22:33 sonntex, <sonntex@gmail.com> wrote: > > > I want to implement something which helps me to play rtp stored in pcap > > files. > > > > tcpdump -i lo udp port 50000 -s0 -w - | ffplay <codec options> -i - > > > > The specification of pcap files is really simple and I could create a new > > ffmpeg format, but don't know how to process rtp packets extracted from > > pcap, because it seems that all functions for rtp parsing are private. > > > > Need a good example of inner ffmpeg formats processing. > > > > How is ffmpeg meant to know the meaning of the contents of a pcap and the > format inside? > > This is a very bad idea. > > What's next, ffmpeg implementing userspace TCP? Are we going to add support > for parsing filesystems as well? > > Regards, > Kieran Kunhya > > > > _______________________________________________ > 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". > _______________________________________________ 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". ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [FFmpeg-devel] How to implement pcap ffmpeg format? 2023-02-21 22:55 ` sonntex @ 2023-02-22 8:04 ` Gijs Peskens 2023-02-22 8:52 ` sonntex 2023-02-22 12:53 ` Rémi Denis-Courmont 0 siblings, 2 replies; 12+ messages in thread From: Gijs Peskens @ 2023-02-22 8:04 UTC (permalink / raw) To: ffmpeg-devel Wouldn't the simplest solution just be a tiny tool that unwraps the pcap stuff and just passes the packet data out on stdout? That's assuming ffmpeg allows receiving RTP packets on stdin. On 21-02-2023 23:55, sonntex wrote: > New pcap ffmpeg format can have all options rtpdec requires. > > Anyway, I don't suggest you implement this feature. I just want to find a > good entry point to start coding personally. > > I need to create a development tool for rtp tracing, and pcap files seem a > good idea because I can grab rtp using tcpdump, or create pcap files > directly in my application, or whatever. It's better then wrap vp8/vp9 to > ivf or h264 to byte stream and pass it to ffmpeg via pipe because it > doesn't require coding of new solutions for every video and audio formats > transferring over rtp. > > On Tue, Feb 21, 2023 at 10:38 PM Kieran Kunhya <kierank@obe.tv> wrote: > >> On Tue, 21 Feb 2023, 22:33 sonntex, <sonntex@gmail.com> wrote: >> >>> I want to implement something which helps me to play rtp stored in pcap >>> files. >>> >>> tcpdump -i lo udp port 50000 -s0 -w - | ffplay <codec options> -i - >>> >>> The specification of pcap files is really simple and I could create a new >>> ffmpeg format, but don't know how to process rtp packets extracted from >>> pcap, because it seems that all functions for rtp parsing are private. >>> >>> Need a good example of inner ffmpeg formats processing. >>> >> How is ffmpeg meant to know the meaning of the contents of a pcap and the >> format inside? >> >> This is a very bad idea. >> >> What's next, ffmpeg implementing userspace TCP? Are we going to add support >> for parsing filesystems as well? >> >> Regards, >> Kieran Kunhya >> >> _______________________________________________ >> 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". >> > _______________________________________________ > 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". _______________________________________________ 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". ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [FFmpeg-devel] How to implement pcap ffmpeg format? 2023-02-22 8:04 ` Gijs Peskens @ 2023-02-22 8:52 ` sonntex 2023-02-22 12:53 ` Rémi Denis-Courmont 1 sibling, 0 replies; 12+ messages in thread From: sonntex @ 2023-02-22 8:52 UTC (permalink / raw) To: FFmpeg development discussions and patches It might be interesting. I didn’t find how to pass rtp to ffmpeg stdin. That is why I started thinking about pcap. Could you please show an example? On Wed, 22 Feb 2023 at 08:04, Gijs Peskens <gijs@peskens.net> wrote: > Wouldn't the simplest solution just be a tiny tool that unwraps the pcap > stuff and just passes the packet data out on stdout? > That's assuming ffmpeg allows receiving RTP packets on stdin. > > On 21-02-2023 23:55, sonntex wrote: > > New pcap ffmpeg format can have all options rtpdec requires. > > > > Anyway, I don't suggest you implement this feature. I just want to find a > > good entry point to start coding personally. > > > > I need to create a development tool for rtp tracing, and pcap files seem > a > > good idea because I can grab rtp using tcpdump, or create pcap files > > directly in my application, or whatever. It's better then wrap vp8/vp9 to > > ivf or h264 to byte stream and pass it to ffmpeg via pipe because it > > doesn't require coding of new solutions for every video and audio formats > > transferring over rtp. > > > > On Tue, Feb 21, 2023 at 10:38 PM Kieran Kunhya <kierank@obe.tv> wrote: > > > >> On Tue, 21 Feb 2023, 22:33 sonntex, <sonntex@gmail.com> wrote: > >> > >>> I want to implement something which helps me to play rtp stored in pcap > >>> files. > >>> > >>> tcpdump -i lo udp port 50000 -s0 -w - | ffplay <codec options> -i - > >>> > >>> The specification of pcap files is really simple and I could create a > new > >>> ffmpeg format, but don't know how to process rtp packets extracted from > >>> pcap, because it seems that all functions for rtp parsing are private. > >>> > >>> Need a good example of inner ffmpeg formats processing. > >>> > >> How is ffmpeg meant to know the meaning of the contents of a pcap and > the > >> format inside? > >> > >> This is a very bad idea. > >> > >> What's next, ffmpeg implementing userspace TCP? Are we going to add > support > >> for parsing filesystems as well? > >> > >> Regards, > >> Kieran Kunhya > >> > >> _______________________________________________ > >> 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". > >> > > _______________________________________________ > > 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". > _______________________________________________ > 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". > _______________________________________________ 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". ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [FFmpeg-devel] How to implement pcap ffmpeg format? 2023-02-22 8:04 ` Gijs Peskens 2023-02-22 8:52 ` sonntex @ 2023-02-22 12:53 ` Rémi Denis-Courmont 2023-02-22 13:51 ` Devin Heitmueller 2023-02-22 13:59 ` sonntex 1 sibling, 2 replies; 12+ messages in thread From: Rémi Denis-Courmont @ 2023-02-22 12:53 UTC (permalink / raw) To: FFmpeg development discussions and patches, Gijs Peskens, ffmpeg-devel Hi, I agree with Kieran that this doesn't look like it belongs in FFmpeg or in any media framework. In fact, Wireshark has some support for extracting media from RTP, and that seems like the right place for it. With that said, you can't realistically pass RTP packets on the standard input. RTP is datagram-based. Packet boundaries are relevant; it can't go over a pipe. Unless you use a Unix datagram socket as standard input, but that would be very weird. Besides, there may be multiple streams on different ports, with different payload maps, and the receiver needs to know which port which packet came on. Note: Unfortunately, earlier attempts to standardise a container for RTP/RTCP packets have failed. _______________________________________________ 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". ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [FFmpeg-devel] How to implement pcap ffmpeg format? 2023-02-22 12:53 ` Rémi Denis-Courmont @ 2023-02-22 13:51 ` Devin Heitmueller 2023-02-22 13:59 ` sonntex 1 sibling, 0 replies; 12+ messages in thread From: Devin Heitmueller @ 2023-02-22 13:51 UTC (permalink / raw) To: FFmpeg development discussions and patches; +Cc: Gijs Peskens On Wed, Feb 22, 2023 at 7:54 AM Rémi Denis-Courmont <remi@remlab.net> wrote: > I agree with Kieran that this doesn't look like it belongs in FFmpeg or in any media framework. In fact, Wireshark has some support for extracting media from RTP, and that seems like the right place for it. > > With that said, you can't realistically pass RTP packets on the standard input. RTP is datagram-based. Packet boundaries are relevant; it can't go over a pipe. Unless you use a Unix datagram socket as standard input, but that would be very weird. > > Besides, there may be multiple streams on different ports, with different payload maps, and the receiver needs to know which port which packet came on. I generally use tcpreplay for this sort of use case (it replays pcap files back onto the network and then ffmpeg can receive them). It would support the use case with multiple streams. The timing isn't perfect though, so if you play files that are many Mbps you might find the stream is being played out +/- 1% of realtime, which can have some annoying effects with certain applications. Also its important to note that this does mean streams can't be processed faster than realtime (i.e. you can't process five minutes of RTP packets in a few seconds). One other thing worth noting is there can be some unexpected side-effects of tcpreplay that require you to rewrite MAC addresses if playing back on a different host than captured on, and rewriting UDP checksums if the NIC is doing hardware offloading. As a result I typically have to preprocess my pcap files (using tcprewrite) prior to playing them back out. Devin -- Devin Heitmueller, Senior Software Engineer LTN Global Communications o: +1 (301) 363-1001 w: https://ltnglobal.com e: devin.heitmueller@ltnglobal.com _______________________________________________ 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". ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [FFmpeg-devel] How to implement pcap ffmpeg format? 2023-02-22 12:53 ` Rémi Denis-Courmont 2023-02-22 13:51 ` Devin Heitmueller @ 2023-02-22 13:59 ` sonntex 2023-02-22 15:25 ` Zhao Zhili 1 sibling, 1 reply; 12+ messages in thread From: sonntex @ 2023-02-22 13:59 UTC (permalink / raw) To: FFmpeg development discussions and patches So, if I have an rtp stream inside my application and want to save it somehow to a playable media container, I have to wrap this stream to something that could be transferred by pipe to ffmpeg, for instance to ivf or to h264 byte stream. The first format requires deep codec parsing to extract at least width and height, perhaps other properties. Seems easy but non-unified. Another approach is to pass the stream to a local udp socket, simultaneously execute and control the ffmpeg process. It could lead to data loss and requires socket coding in such a simple application. I understand why ffmpeg developers don't want to include pcap support to ffmpeg but it could be implemented as an external code by somebody else for whom it seems to be useful. I can't really find any blockers to do that except that all the code inside rtpdec is encapsulated in its *.c file and is not accessible from a hypothetical new pcap format. What I found is that udp.c derives url protocol interface and does the same as pcap format should do - extract rtp packets from a source and pass it further to rtpdec. The problem is that pcap format is a format, not a protocol, which reads data from ffmpeg file protocol. And the question was how to build the chain of <file protocol> -> <input pcap format> -> <input rtp format>? On Wed, Feb 22, 2023 at 12:54 PM Rémi Denis-Courmont <remi@remlab.net> wrote: > Hi, > > I agree with Kieran that this doesn't look like it belongs in FFmpeg or in > any media framework. In fact, Wireshark has some support for extracting > media from RTP, and that seems like the right place for it. > > With that said, you can't realistically pass RTP packets on the standard > input. RTP is datagram-based. Packet boundaries are relevant; it can't go > over a pipe. Unless you use a Unix datagram socket as standard input, but > that would be very weird. > > Besides, there may be multiple streams on different ports, with different > payload maps, and the receiver needs to know which port which packet came > on. > > Note: Unfortunately, earlier attempts to standardise a container for > RTP/RTCP packets have failed. > _______________________________________________ > 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". > _______________________________________________ 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". ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [FFmpeg-devel] How to implement pcap ffmpeg format? 2023-02-22 13:59 ` sonntex @ 2023-02-22 15:25 ` Zhao Zhili 2023-02-22 17:22 ` sonntex 0 siblings, 1 reply; 12+ messages in thread From: Zhao Zhili @ 2023-02-22 15:25 UTC (permalink / raw) To: 'FFmpeg development discussions and patches' > -----Original Message----- > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of sonntex > Sent: 2023年2月22日 21:59 > To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> > Subject: Re: [FFmpeg-devel] How to implement pcap ffmpeg format? > > So, if I have an rtp stream inside my application and want to save it > somehow to a playable media container, I have to wrap this stream to > something that could be transferred by pipe to ffmpeg, for instance to ivf > or to h264 byte stream. The first format requires deep codec parsing to Why not remux RTP to something like TS at the first replace, instead of deal with pcap? > extract at least width and height, perhaps other properties. Seems easy but > non-unified. Another approach is to pass the stream to a local udp socket, > simultaneously execute and control the ffmpeg process. It could lead to > data loss and requires socket coding in such a simple application. > > I understand why ffmpeg developers don't want to include pcap support to > ffmpeg but it could be implemented as an external code by somebody else for > whom it seems to be useful. I can't really find any blockers to do that > except that all the code inside rtpdec is encapsulated in its *.c file and > is not accessible from a hypothetical new pcap format. What I found is that > udp.c derives url protocol interface and does the same as pcap format > should do - extract rtp packets from a source and pass it further to > rtpdec. The problem is that pcap format is a format, not a protocol, which > reads data from ffmpeg file protocol. And the question was how to build the > chain of <file protocol> -> <input pcap format> -> <input rtp format>? > > On Wed, Feb 22, 2023 at 12:54 PM Rémi Denis-Courmont <remi@remlab.net> > wrote: > > > Hi, > > > > I agree with Kieran that this doesn't look like it belongs in FFmpeg or in > > any media framework. In fact, Wireshark has some support for extracting > > media from RTP, and that seems like the right place for it. > > > > With that said, you can't realistically pass RTP packets on the standard > > input. RTP is datagram-based. Packet boundaries are relevant; it can't go > > over a pipe. Unless you use a Unix datagram socket as standard input, but > > that would be very weird. > > > > Besides, there may be multiple streams on different ports, with different > > payload maps, and the receiver needs to know which port which packet came > > on. > > > > Note: Unfortunately, earlier attempts to standardise a container for > > RTP/RTCP packets have failed. > > _______________________________________________ > > 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". > > > _______________________________________________ > 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". _______________________________________________ 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". ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [FFmpeg-devel] How to implement pcap ffmpeg format? 2023-02-22 15:25 ` Zhao Zhili @ 2023-02-22 17:22 ` sonntex 2023-02-22 17:59 ` Zhao Zhili 0 siblings, 1 reply; 12+ messages in thread From: sonntex @ 2023-02-22 17:22 UTC (permalink / raw) To: FFmpeg development discussions and patches Are you sure that vp8 and vp9 can be put to mpeg-ts? On Wed, Feb 22, 2023 at 3:25 PM Zhao Zhili <quinkblack@foxmail.com> wrote: > > -----Original Message----- > > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of > sonntex > > Sent: 2023年2月22日 21:59 > > To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> > > Subject: Re: [FFmpeg-devel] How to implement pcap ffmpeg format? > > > > So, if I have an rtp stream inside my application and want to save it > > somehow to a playable media container, I have to wrap this stream to > > something that could be transferred by pipe to ffmpeg, for instance to > ivf > > or to h264 byte stream. The first format requires deep codec parsing to > > Why not remux RTP to something like TS at the first replace, instead of > deal with pcap? > > > extract at least width and height, perhaps other properties. Seems easy > but > > non-unified. Another approach is to pass the stream to a local udp > socket, > > simultaneously execute and control the ffmpeg process. It could lead to > > data loss and requires socket coding in such a simple application. > > > > I understand why ffmpeg developers don't want to include pcap support to > > ffmpeg but it could be implemented as an external code by somebody else > for > > whom it seems to be useful. I can't really find any blockers to do that > > except that all the code inside rtpdec is encapsulated in its *.c file > and > > is not accessible from a hypothetical new pcap format. What I found is > that > > udp.c derives url protocol interface and does the same as pcap format > > should do - extract rtp packets from a source and pass it further to > > rtpdec. The problem is that pcap format is a format, not a protocol, > which > > reads data from ffmpeg file protocol. And the question was how to build > the > > chain of <file protocol> -> <input pcap format> -> <input rtp format>? > > > > On Wed, Feb 22, 2023 at 12:54 PM Rémi Denis-Courmont <remi@remlab.net> > > wrote: > > > > > Hi, > > > > > > I agree with Kieran that this doesn't look like it belongs in FFmpeg > or in > > > any media framework. In fact, Wireshark has some support for extracting > > > media from RTP, and that seems like the right place for it. > > > > > > With that said, you can't realistically pass RTP packets on the > standard > > > input. RTP is datagram-based. Packet boundaries are relevant; it can't > go > > > over a pipe. Unless you use a Unix datagram socket as standard input, > but > > > that would be very weird. > > > > > > Besides, there may be multiple streams on different ports, with > different > > > payload maps, and the receiver needs to know which port which packet > came > > > on. > > > > > > Note: Unfortunately, earlier attempts to standardise a container for > > > RTP/RTCP packets have failed. > > > _______________________________________________ > > > 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". > > > > > _______________________________________________ > > 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". > > _______________________________________________ > 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". > _______________________________________________ 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". ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [FFmpeg-devel] How to implement pcap ffmpeg format? 2023-02-22 17:22 ` sonntex @ 2023-02-22 17:59 ` Zhao Zhili 2023-02-22 18:34 ` sonntex 0 siblings, 1 reply; 12+ messages in thread From: Zhao Zhili @ 2023-02-22 17:59 UTC (permalink / raw) To: FFmpeg development discussions and patches > 在 2023年2月23日,01:22,sonntex <sonntex@gmail.com> 写道: > > Are you sure that vp8 and vp9 can be put to mpeg-ts? You missed the point. Use any (streaming) container which supports the codec, e.g., webm. Please don’t top post. > > On Wed, Feb 22, 2023 at 3:25 PM Zhao Zhili <quinkblack@foxmail.com> wrote: > >>> -----Original Message----- >>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of >> sonntex >>> Sent: 2023年2月22日 21:59 >>> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> >>> Subject: Re: [FFmpeg-devel] How to implement pcap ffmpeg format? >>> >>> So, if I have an rtp stream inside my application and want to save it >>> somehow to a playable media container, I have to wrap this stream to >>> something that could be transferred by pipe to ffmpeg, for instance to >> ivf >>> or to h264 byte stream. The first format requires deep codec parsing to >> >> Why not remux RTP to something like TS at the first replace, instead of >> deal with pcap? >> >>> extract at least width and height, perhaps other properties. Seems easy >> but >>> non-unified. Another approach is to pass the stream to a local udp >> socket, >>> simultaneously execute and control the ffmpeg process. It could lead to >>> data loss and requires socket coding in such a simple application. >>> >>> I understand why ffmpeg developers don't want to include pcap support to >>> ffmpeg but it could be implemented as an external code by somebody else >> for >>> whom it seems to be useful. I can't really find any blockers to do that >>> except that all the code inside rtpdec is encapsulated in its *.c file >> and >>> is not accessible from a hypothetical new pcap format. What I found is >> that >>> udp.c derives url protocol interface and does the same as pcap format >>> should do - extract rtp packets from a source and pass it further to >>> rtpdec. The problem is that pcap format is a format, not a protocol, >> which >>> reads data from ffmpeg file protocol. And the question was how to build >> the >>> chain of <file protocol> -> <input pcap format> -> <input rtp format>? >>> >>> On Wed, Feb 22, 2023 at 12:54 PM Rémi Denis-Courmont <remi@remlab.net> >>> wrote: >>> >>>> Hi, >>>> >>>> I agree with Kieran that this doesn't look like it belongs in FFmpeg >> or in >>>> any media framework. In fact, Wireshark has some support for extracting >>>> media from RTP, and that seems like the right place for it. >>>> >>>> With that said, you can't realistically pass RTP packets on the >> standard >>>> input. RTP is datagram-based. Packet boundaries are relevant; it can't >> go >>>> over a pipe. Unless you use a Unix datagram socket as standard input, >> but >>>> that would be very weird. >>>> >>>> Besides, there may be multiple streams on different ports, with >> different >>>> payload maps, and the receiver needs to know which port which packet >> came >>>> on. >>>> >>>> Note: Unfortunately, earlier attempts to standardise a container for >>>> RTP/RTCP packets have failed. >>>> _______________________________________________ >>>> 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". >>>> >>> _______________________________________________ >>> 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". >> >> _______________________________________________ >> 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". >> > _______________________________________________ > 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". _______________________________________________ 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". ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [FFmpeg-devel] How to implement pcap ffmpeg format? 2023-02-22 17:59 ` Zhao Zhili @ 2023-02-22 18:34 ` sonntex 0 siblings, 0 replies; 12+ messages in thread From: sonntex @ 2023-02-22 18:34 UTC (permalink / raw) To: FFmpeg development discussions and patches > On Wed, Feb 22, 2023 at 6:00 PM Zhao Zhili <quinkblack@foxmail.com> wrote: > > You missed the point. Use any (streaming) container which supports the codec, e.g., webm. I've already discussed solutions with ivf and h264 byte stream which are the same as webm but even easier in implementation. They are not applicable. _______________________________________________ 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". ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-02-22 18:35 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-02-21 22:33 [FFmpeg-devel] How to implement pcap ffmpeg format? sonntex 2023-02-21 22:38 ` Kieran Kunhya 2023-02-21 22:55 ` sonntex 2023-02-22 8:04 ` Gijs Peskens 2023-02-22 8:52 ` sonntex 2023-02-22 12:53 ` Rémi Denis-Courmont 2023-02-22 13:51 ` Devin Heitmueller 2023-02-22 13:59 ` sonntex 2023-02-22 15:25 ` Zhao Zhili 2023-02-22 17:22 ` sonntex 2023-02-22 17:59 ` Zhao Zhili 2023-02-22 18:34 ` sonntex
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