Reputation: 1
I need to stream a audio to a Multicast address. And I konw the command could be:
ffmpeg -i input -f mpegts udp://hostname:port?pkt_size=188&buffer_size=65535
But i don't konw how to do this via code? Can you help me, thanks.
Upvotes: 0
Views: 686
Reputation: 11769
This is not different from any other video conversion with ffmpeg - open input stream, open output stream, and loop around av_read_packet, av_decode_video, av_encode_video, av_write_packet_interleaved.
The easiest way would be to reap apart the ffmpeg
utility source code, which is in ffmpeg.c
in the ffmpeg source directory.
Upvotes: 1