Live data from Hacker News

How Video Works

howvideo.works

11–20 of 26 posts

Re: How Video Works

#11
post #9

One thing i'd love to see added here is a blurb about the importance of the location of the video metadata in the file. Specifically that you need to have the metadata at the start of the file rather than the end of the file (which is the default) for low-latency playback on web. Explained: Freshly recorded MPEG (and almost all other container types) typically saves the header at the end of the file. This is the logi…

> The reality is their existing solution backed by a CDN would also have worked if they encoded the videos correctly. For folks who might not realize you can fix this post-encode, you can do this: ffmpeg -i in.mp4 -c copy -map 0 -movflags +faststart out.mp4

Aside from source code and hundred page technical specs, is there any good source for this type of information?

Re: How Video Works

#12
post #8

One thing i'd love to see added here is a blurb about the importance of the location of the video metadata in the file. Specifically that you need to have the metadata at the start of the file rather than the end of the file (which is the default) for low-latency playback on web. Explained: Freshly recorded MPEG (and almost all other container types) typically saves the header at the end of the file. This is the logi…

This is what the MP4 format calls the "moov atom". Writing metadata at the end, instead of periodically interleaving it inside the file, is not only useless for web playback, but also for any creation process (i.e., live recording) which intends to call itself robust . Imagine recording a 1-hour long video, only to have some unrelated issue abruptly stopping it all (e.g. the application crashes, or the video camera s…

> This is what the MP4 format calls the "moov atom".

One of the few surviving legacies of Apple technology created during the Jobs interregnum.

Like everything else not from NeXT, the modern Apple has killed QuickTime, but they can’t eliminate its concepts and wacky constants from the MPEG-4 standard.

Re: How Video Works

#15
For those who handles video streaming, which software do you use in production to segmented the video?

I've already tinkered around with ffmpeg including throwing around any movflags I could find and it will never be able to stream it properly in chunks.

My current working solution is using MP4Box with this command

  MP4Box -dash 1000 -rap -frag-rap test.mp4

Re: How Video Works

#16

One thing i'd love to see added here is a blurb about the importance of the location of the video metadata in the file. Specifically that you need to have the metadata at the start of the file rather than the end of the file (which is the default) for low-latency playback on web. Explained: Freshly recorded MPEG (and almost all other container types) typically saves the header at the end of the file. This is the logi…

> A user must download the entire video before playback starts.

That was not my experience. If the web server announces the Content-Length of the video file, most browsers will make a range request for the end of the file and then go on from there.

Latency is still a bit higher this way, but no way near downloading the entire video file.

Re: How Video Works

#17
post #9

Earlier quoted context omitted.

> The reality is their existing solution backed by a CDN would also have worked if they encoded the videos correctly. For folks who might not realize you can fix this post-encode, you can do this: ffmpeg -i in.mp4 -c copy -map 0 -movflags +faststart out.mp4

Aside from source code and hundred page technical specs, is there any good source for this type of information?

ffmpeg-fu is pretty googleable actually

Re: How Video Works

#18
Oh, I thought it was about VHS video for some reason. I guess I'm old enough to rant that this should be named 'how video streaming works', not 'how video works' :/

Re: How Video Works

#19
Perhaps someone here can answer a question I've had for a while: if you stream a video which is actually a static image (think a song on YouTube, the 'video' is just the album cover) is there any way to optimise that? Or must the server stream that same image constantly as though it was a regular video?

Re: How Video Works

#20
post #9

Earlier quoted context omitted.

> The reality is their existing solution backed by a CDN would also have worked if they encoded the videos correctly. For folks who might not realize you can fix this post-encode, you can do this: ffmpeg -i in.mp4 -c copy -map 0 -movflags +faststart out.mp4

Aside from source code and hundred page technical specs, is there any good source for this type of information?

This is the sort of thing you can't help but run into when looking up ffmpeg incantations over the course of building a solution.

Just look how easily you ran into it when you weren't even looking for it.

For such a complex tool, the internet (like StackOverflow answers) ends up becoming a recipe book of practical solutions that would be hard to derive even if you sat down with the documentation and read it front to back. Nothing wrong with embracing that.

Post reply on HN