4 ms·
An ffmpeg and SDL Tutorial (2015)
- ce4 4y agoShould have a (2015) tag.
- stinos 4y agoAlso because since 2015 there have been some API changes so some of the content/code in there might not work out of the box.
- michelb 4y agosomewhat related: https://ffmpeg.guide https://ffmpeg.guide
- alias_neo 4y agoI guess it was that, which triggered this (I saw your link posted yesterday). I'm curious, how accurate/ useful is this 2015 guide today, Vs the newer (?) one you linked (which is also very cool too!). Having been watching various media related YouTube videos lately, in wondering whether to jump on the AV1 bandwagon for encoding all of my family videos. Currently I'm using H264/MP4 in 4K, my kids are only 1 and 3yo and I already have a couple of terabytes of video, not to mention all of the photos.
- remram 4y agoand the comments from when it was submitted yesterday: https://news.ycombinator.com/item?id=33383023 https://news.ycombinator.com/item?id=33383023
- snvzz 4y ago>At its very *basic* level, dealing with video and audio streams is very easy: Then proceeds to use a pseudocode that looks like BASIC. Tasteful.
- deleted 4y ago[deleted]
- newswasboring 4y agoAwesome but if you want to inject some fun into your day, somewhat related https://youtu.be/9kaIXkImCAM https://youtu.be/9kaIXkImCAM
- kaladin-jasnah 4y agoThis tutorial is very outdated, eg. `AVPicture`, which is used throughout, is completely deprecated and removed from the library, so you will simply encounter linker errors trying to follow this tutorial and will have to replace every `avpicture` call made in the tutorial. Also, `avcodec_decode_video2` is deprecated and you have to use `avcodec_send_packet` and `avcodec_receive_frame`. The FFmpeg libraries are possibly the worst thing I have ever worked with in my life. I have never been more afraid to use a library than this. FFmpeg libraries randomly break themselves, so if you find an answer from a few years ago, chances are it's useless. Want to free an AVPacket? `av_free_packet` is deprecated,. You can use `av_packet_unref` (but there's _also_ a function named `av_packet_free` that doesn't do quite the same thing). Most questions on Stack Overflow or related platforms have no replies, the library is not well-documented (requiring you to always read the massive source code and the API reference). In addition, some things are outright undocumented and missing from the API reference or documentation and require reading often-unfinished conversations on the mailing lists with no solution. The FFmpeg libraries have very little error handling, which means if you're a bad C developer like me you are required to recompile FFmpeg with debugging information unstripped so you can trace segfaults in gdb. https://github.com/leandromoreira/ffmpeg-libav-tutorial/ https://github.com/leandromoreira/ffmpeg-libav-tutorial/ is a better and more up-to-date tutorial than this one.
- mort96 4y agoFor the last point: Most distros have some way to get debug symbols. On Ubuntu for example, you add some repos and install -dbgsym packages (documented in https://wiki.ubuntu.com/Debug%20Symbol%20Packages https://wiki.ubuntu.com/Debug%20Symbol%20Packages).
- swyx 4y agoah thanks.. was trying to learn ffmpeg last night and the old tutorial was the best i found.. appreciate any and all links and resources
- weaksauce 4y agoas the old saying goes... the best way to get a correct answer on the internet is not to ask a question but to post an incorrect answer on the internet. it's fine you opened up the discussion for everyone to see this much more well written resource.
- AlbertCory 4y agoFFmpeg is definitely in one of the lowest circles of Hell. I did figure out the very simple switches to convert WAV to FLAC. Mercifully I don't need it for anything else (yet).
- mort96 4y agoIsn't that just `ffmpeg -i myfile.wav convertedfile.flac`? That's how all other video/audio file format conversion options work at least.
- AlbertCory 4y agoIndeed. Once you ignore all the other bazillion things you can do, you attain bliss.
- zolland 4y agoThat simple use case is literally the first piece of code on the home page of the ffmpeg website haha you don't really have to ignore anything
- AlbertCory 4y agoThat must be what happened, then :) Of course, you still have this morbid curiosity: "Is that it? What am I not seeing?" Then you shudder and close the page.
- alex_sf 4y agoIt can be complex, but given what it's capable of doing and how well it does it, I'd put it in purgatory at worst.
- calo_star 4y agoSo it isn't just me then! There was this one time, I downloaded a piece of porn in h.265 .mkv and I wanted to change its container to mp4 using ffmpeg(so that I could view it on iPad), and I actually, actually got pissed. In the end I just re-encoded the whole thing using Handbrake. The documentation does not explain its syntax.