[Libav-user] missing packets on ffmpeg api read from stream

Coral Nave Coral at liveu.tv
Sun Dec 22 17:24:20 EET 2019


Hi,

I trying to read live stream from Wowza using ffmpeg api (av_read_frame)
I get a lot of missing frames or broken ones, using ffmpeg log level debug I found that before missing or broken frame I get mostly zero packets or really small packet

examples:
zero:
:coral ffmpeg log: RTMP_ReadPacket: fd=7 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.700797+00:00 liveu-mmh mediastreamer.bin[1] (23438.195859)(30340.30340):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753558+00:00 liveu-mmh mediastreamer.bin[1] (23438.250325)(30340.30340):INFO:coral ffmpeg log:   0000:  46 00 00 15 00 00 fb 08                            F.......           (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753596+00:00 liveu-mmh mediastreamer.bin[1] (23438.250333)(30340.30340):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753621+00:00 liveu-mmh mediastreamer.bin[1] (23438.250338)(30340.30340):INFO:coral ffmpeg log:   0000:  af 01 21 19 85 00 7c e2  80 3e 71 bf 7c 00 00 00   ..!...|..>q.|...   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753641+00:00 liveu-mmh mediastreamer.bin[1] (23438.250341)(30340.30340):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753659+00:00 liveu-mmh mediastreamer.bin[1] (23438.250352)(30340.30340):INFO:coral ffmpeg log:   0010:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753677+00:00 liveu-mmh mediastreamer.bin[1] (23438.250354)(30340.30340):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753695+00:00 liveu-mmh mediastreamer.bin[1] (23438.250357)(30340.30340):INFO:coral ffmpeg log:   0020:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753714+00:00 liveu-mmh mediastreamer.bin[1] (23438.250359)(30340.30340):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753731+00:00 liveu-mmh mediastreamer.bin[1] (23438.250362)(30340.30340):INFO:coral ffmpeg log:   0030:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753748+00:00 liveu-mmh mediastreamer.bin[1] (23438.250364)(30340.30340):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753765+00:00 liveu-mmh mediastreamer.bin[1] (23438.250378)(30340.30340):INFO:coral ffmpeg log:   0040:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753784+00:00 liveu-mmh mediastreamer.bin[1] (23438.250382)(30340.30340):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753802+00:00 liveu-mmh mediastreamer.bin[1] (23438.250384)(30340.30340):INFO:coral ffmpeg log:   0050:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753819+00:00 liveu-mmh mediastreamer.bin[1] (23438.250387)(30340.30340):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753835+00:00 liveu-mmh mediastreamer.bin[1] (23438.250389)(30340.30340):INFO:coral ffmpeg log:   0060:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753853+00:00 liveu-mmh mediastreamer.bin[1] (23438.250392)(30340.30340):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753872+00:00 liveu-mmh mediastreamer.bin[1] (23438.250394)(30340.30340):INFO:coral ffmpeg log:   0070:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753889+00:00 liveu-mmh mediastreamer.bin[1] (23438.250397)(30340.30340):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753906+00:00 liveu-mmh mediastreamer.bin[1] (23438.250399)(30340.30340):INFO:coral ffmpeg log:   0080:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753923+00:00 liveu-mmh mediastreamer.bin[1] (23438.250401)(30340.30340):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753940+00:00 liveu-mmh mediastreamer.bin[1] (23438.250404)(30340.30340):INFO:coral ffmpeg log:   0090:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753957+00:00 liveu-mmh mediastreamer.bin[1] (23438.250406)(30340.30340):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753973+00:00 liveu-mmh mediastreamer.bin[1] (23438.250409)(30340.30340):INFO:coral ffmpeg log:   00a0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.753992+00:00 liveu-mmh mediastreamer.bin[1] (23438.250411)(30340.30340):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.754009+00:00 liveu-mmh mediastreamer.bin[1] (23438.250414)(30340.30340):INFO:coral ffmpeg log:   00b0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.754027+00:00 liveu-mmh mediastreamer.bin[1] (23438.250416)(30340.30340):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.754045+00:00 liveu-mmh mediastreamer.bin[1] (23438.250419)(30340.30340):INFO:coral ffmpeg log:   00c0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.754067+00:00 liveu-mmh mediastreamer.bin[1] (23438.250421)(30340.30340):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.754086+00:00 liveu-mmh mediastreamer.bin[1] (23438.250424)(30340.30340):INFO:coral ffmpeg log:   00d0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.754103+00:00 liveu-mmh mediastreamer.bin[1] (23438.250426)(30340.30340):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.754121+00:00 liveu-mmh mediastreamer.bin[1] (23438.250428)(30340.30340):INFO:coral ffmpeg log:   00e0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.754139+00:00 liveu-mmh mediastreamer.bin[1] (23438.250431)(30340.30340):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-18T17:08:33.754157+00:00 liveu-mmh mediastreamer.bin[1] (23438.250433)(30340.30340):INFO:coral ffmpeg log:   00f0:  00 00 00 00 00 00 00 00  00 03 07                  ...........        (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)



small:
ffmpeg log: RTMP_ReadPacket: fd=7 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-22T15:16:47.124019+00:00 liveu-mmh mediastreamer.bin[1] (99064.595456)(14891.14891):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-22T15:16:47.124038+00:00 liveu-mmh mediastreamer.bin[1] (99064.595476)(14891.14891):INFO:coral ffmpeg log:   0000:  c7                                                 .                  (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-22T15:16:47.124058+00:00 liveu-mmh mediastreamer.bin[1] (99064.595494)(14891.14891):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-22T15:16:47.124078+00:00 liveu-mmh mediastreamer.bin[1] (99064.595514)(14891.14891):INFO:coral ffmpeg log:   0000:  6b c6 2e ca 70 cd b9 17  cc f4 74 a3 5b 68 3a 2c   k...p.....t.[h:,   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-22T15:16:47.124097+00:00 liveu-mmh mediastreamer.bin[1] (99064.595533)(14891.14891):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-22T15:16:47.124117+00:00 liveu-mmh mediastreamer.bin[1] (99064.595552)(14891.14891):INFO:coral ffmpeg log:   0010:  8d 2a fa 2e 83 78 3b 1e  82 7d 08 e2 59 50 cd bc   .*...x;..}..YP..   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-22T15:16:47.124136+00:00 liveu-mmh mediastreamer.bin[1] (99064.595572)(14891.14891):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-22T15:16:47.124156+00:00 liveu-mmh mediastreamer.bin[1] (99064.595591)(14891.14891):INFO:coral ffmpeg log:   0020:  30 bf 43 8c 72 90 9b 0f  80 fb 8f df 50 26 2e af   0.C.r.......P&..   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-22T15:16:47.124176+00:00 liveu-mmh mediastreamer.bin[1] (99064.595610)(14891.14891):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-22T15:16:47.124195+00:00 liveu-mmh mediastreamer.bin[1] (99064.595630)(14891.14891):INFO:coral ffmpeg log:   0030:  68 81 c8 7a 1f d6 69 b0  2e a3 92 d5 11 8d 08 ee   h..z..i.........   (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-22T15:16:47.124214+00:00 liveu-mmh mediastreamer.bin[1] (99064.595649)(14891.14891):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-22T15:16:47.124234+00:00 liveu-mmh mediastreamer.bin[1] (99064.595669)(14891.14891):INFO:coral ffmpeg log:   0040:  31 60 20 ee 88 2c 83 9c  ad 7f 8a 80               1` ..,......       (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-22T15:16:47.124253+00:00 liveu-mmh mediastreamer.bin[1] (99064.595687)(14891.14891):INFO:coral ffmpeg log: #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-22T15:16:47.124273+00:00 liveu-mmh mediastreamer.bin[1] (99064.595714)(14891.14891):INFO:coral ffmpeg log: type:9, size:8268, last:-1, dts:34622 pos:9329169#012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-22T15:16:47.124292+00:00 liveu-mmh mediastreamer.bin[1] (99064.595728)(14891.14891):INFO:coral ffmpeg log: 0 27 0 #012 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)
2019-12-22T15:16:47.124311+00:00 liveu-mmh mediastreamer.bin[1] (99064.595837)(14891.14891):INFO:coral ffmpeg log: RTMP_ReadPacket: fd=7 (../../cpp/Multimedia/FFMPEG/Context/InputFormat.h:38)



I also try to capture the stream using ffmpeg command-line (ffmpeg -loglevel verbose -i <my Wowza live stream url> -codec copy /tmp/cap_from_wowza.mp4), on that case I don't get any error or broken packet, the captured stream is perfect.

any Idea what the difference? and how can I fix it?

Thanks,
Coral
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20191222/934ec90a/attachment.html>


More information about the Libav-user mailing list