leandromoreira / ffmpeg-libav-tutorial

FFmpeg libav tutorial - learn how media works from basic to transmuxing, transcoding and more. Translations: πŸ‡ΊπŸ‡Έ πŸ‡¨πŸ‡³ πŸ‡°πŸ‡· πŸ‡ͺπŸ‡Έ πŸ‡»πŸ‡³ πŸ‡§πŸ‡·
https://github.com/leandromoreira/ffmpeg-libav-tutorial
BSD 3-Clause "New" or "Revised" License
9.94k stars 956 forks source link

tutorial1: av_read_frame from a concrete stream #70

Closed zhiburt closed 4 years ago

zhiburt commented 4 years ago

As I see there's no notions that it's necessary to distinguish a video stream somehow to read a packet from a right stream.

https://github.com/leandromoreira/ffmpeg-libav-tutorial/blob/e8befe6b5f8a1fbe03c37d79cd312a068ba93a45/0_hello_world.c#L174-L181

Without determine that I was getting such a error.

[h264 @ 0x56240387ff80] Invalid NAL unit size (554341485 > 384).
[h264 @ 0x56240387ff80] Error splitting the input into NAL units.

I am not sure if adding mention it in the script swamps it with specific complications so I just want to pointed this out :)

And Yep I see this :smile:

We'll skip some details, but don't worry: the source code is available at github.

I guess I just didn't work out a good approach here and I am relaying only on the README.md but I might have to consider examples as a part of tutorial :smile:

leandromoreira commented 4 years ago

Yeah, part of hiding the complexity is to try to help to understand :( however it seems that it didn't work for you but you really need to read from a specific stream, I'm sorry. Do you think would help if that point was explicit? I also tend to believe that part of the learning is trying/failing and succeeding πŸ‘

zhiburt commented 4 years ago

part of hiding the complexity is to try to help to understand

πŸ‘

Agreed I suppose I should just consider examples as a part of the material but not as a cheat following it πŸ˜„

PS: Mainly I opened an issue to verify that such content is what you expect it to be like πŸ˜„

I also tend to believe that part of the learning is trying/failing and succeeding

πŸ’―