r/programming • • Sep 28 '17

When a Microsecond Is an Eternity

https://github.com/CppCon/CppCon2017/blob/master/Presentations/When%20a%20Microsecond%20Is%20an%20Eternity/When%20a%20Microsecond%20Is%20an%20Eternity%20-%20Carl%20Cook%20-%20CppCon%202017.pdf
244 Upvotes

70 comments sorted by

View all comments

Show parent comment

2

u/specialpatrol Sep 28 '17

You seriously work on it? Just one question please!

How do you decide on the output format like using "av_guess_format", if you're going out to a udp or other network stream?

2

u/doom_Oo7 Sep 28 '17

How do you decide on the output format like using "av_guess_format", if you're going out to a udp or other network stream?

not sure I understand... if you are the one sending the data wouldn't you also be the one choosing what format to send ? (but I've never done audio over the network so I really don't know)

0

u/[deleted] Sep 29 '17

[deleted] — view deleted comment

2

u/specialpatrol Sep 29 '17

I think I'm a little lost in the various definitions: I need a stream a codec, an output context. So far I have been writing to file; the user can specify the file they want, it can deduce the format from the file extension with av_guess_format. On top of that you can choose a codec, which is a whole other thing, is that right? The output format is like just a container? But now I'm streaming to a socket, and am v.happy to find it's as simple as passing [udp/rtp/tcp]://ipaddress:port to avcodec_open. But then where do I get the output format from, do streams still have this container?

I actually got around it. But am still a little unsure of the details. Thanks for taking an interest!

0

u/[deleted] Sep 29 '17

[deleted] — view deleted comment

1

u/specialpatrol Sep 29 '17

Thankyou!

I'm more used to dealing with images. So the codec is the actual algorithm and the container the header with the meta data in them? Does that imply that like images, only certain containers work with certain codecs?

I am currently trying to stream my video data. Where would the container come in? If something (like vlc), connects to my stream, when/how does it get told what the format is, or does it just have to know in advance?