Hi I'm using API to process an flv input video that has H264 video codec and AAC, audio codec and the output flv video also has H264 video codec and AAC, audio codec.
Basically the flow is I start of just demuxing an flv video/audio file and then muxing directly back out to an flv output file (i.e. no decoding/encoding), this part of the generated output works fine after I replace the extra-data created by ffmpeg flv_write_header(), with the extra data in the original file. A short period of time elapses and I decide that I need to start to decode the video and audio packets and then re-encode each packet to achieve more compression. The problem is that when I switch to decoding/encoding packets the audio plays but the video doesn't. VLC player plays the video and audio without issue until the point where we started the decode/encode packets phase and then starts to churn out the following messages; "AVC: nal size 807428977", and "no frame!", (note the size value in the message change each time). The audio continues to the end without any problems. When I try and push this file I have created through ffmpeg, I get the following output I get the following errors with VLC whnin ffmpeg if I try and decode [h264 @ 0x149df770] top block unavailable for requested intra mode at 3 0/s [h264 @ 0x149df770] error while decoding MB 3 0, bytestream (252) [h264 @ 0x149df770] AVC: nal size 807428977 [h264 @ 0x149df770] concealing 920 DC, 920 AC, 920 MV errors [h264 @ 0x149df770] AVC: nal size -1708817729 [h264 @ 0x149df770] no frame! Error while decoding stream #0.0 [h264 @ 0x149df770] AVC: nal size -1706475345 [h264 @ 0x149df770] no frame! Error while decoding stream #0.0 [h264 @ 0x149df770] AVC: nal size -1704196739 [h264 @ 0x149df770] no frame! I suspect that VLC might use a similar ffmpeg based decoder. When generating this output after calling flv_write_header when setting up streams, I normally replace the ffmpeg generated extra-data, with the extra-data in the original input file, this means the input plays up until we switch in to the decode/encode phase. No error messages are generated by ffmpeg, when I switch to decoding/encoding packages as I only do this on a key frame. So theres a problem with the different Nal details being sent when I start decoding/encoding, which causes problems with the decoder on the player. Ideally I would like to send new decoder config information to the player so that it can adapt this content correctly but Im not sure if this is possible and how this could be achieved. This thread indicates this might not be possible. So I suppose I have a few questions I hope you might be able to help with. 1. Is there a way round this issue to allow the client to properly decode the content once I switch to decode and re-encoding the video and audio packets? Audio continues to play fine, video doesnt. Can I update decoder configuration in the extra-data mid flow. 2. Is this more a muxer issue or is there a way we can tell libx264 to generate the extra-data for the docoder with every packet? 3. Would it be worth asking this question on the libx264 forum? Please note; with H263 video content this logic works very well, it appears more an issue with H264. I am using ffmpeg 0.6. I also ensure that x264 parameter "repeat-headers" is set always. Im also using the Xuggler JAVa API as well. Any help would be much appreciated. I will continue to look on x264 and ffmpeg forums for any hints. Thanks Declan _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
