Opened 8 years ago

Closed 6 years ago

#4893 closed defect (fixed)

FFmpeg stops outputting frames unexpectedly and indefinitely on "bad" h264 over UDP stream

Reported by: superware Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: h264 regression
Cc: jsantiago@fastmail.us Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

FFmpeg stops outputting frames unexpectedly and indefinitely on "bad" h264 over UDP stream, it happens quite rarely on a wireless link. I've managed to reproduce by recording (pcap) and manipulating a stream by discarding every second packet, which causes the video to be played very badly. At 01:38 ffplay stops displaying frames (restarting ffplay plays the stream again). It is as if a specific packet/frame causes ffmpeg to enter a specific state from which it cannot recover.

How to reproduce:

Play the attached pcap file on an active local network adapter with the IP 192.168.19.121.

% ffplay -i udp://192.168.19.121:40002

Video starts at 0:27, issue occurs at 01:38.

Tried on latest git, 2.7 and 2.5.2 (Windows).

Attachments (2)

log.txt (868.1 KB ) - added by superware 8 years ago.
Console output log
ffmpegError.PNG (114.5 KB ) - added by Israel Robotnick 6 years ago.
Error loop on ffmpeg

Download all attachments as: .zip

Change History (37)

comment:1 by superware, 8 years ago

Sample pcap file http://www.datafilehost.com/d/cdf1a1ef (27.16 MB)

comment:2 by Carl Eugen Hoyos, 8 years ago

Keywords: stream stops removed

Is the issue only reproducible with ffplay or also with ffmpeg (the application)?
Please provide command line including complete, uncut console output to make this a valid ticket.

comment:3 by superware, 8 years ago

This issue is also reproducible using ffmpeg and even programmatically using shared DLLs.

The command line is: ffplay.exe udp://192.168.19.121:40002
The console output is very large, the relevant point in time is at "reference count 2 overflow" and onward.

...
[h264 @ 03589500] cabac decode of qscale diff failed at 3 3 f=0/0
[h264 @ 03589500] error while decoding MB 3 3, bytestream 2921
[h264 @ 03589500] Cannot use next picture in error concealment
[h264 @ 03589500] concealing 1498 DC, 1498 AC, 1498 MV errors in P frame
[h264 @ 034bf860] cabac decode of qscale diff failed at 29 3f=0/0
[h264 @ 034bf860] error while decoding MB 29 3, bytestream 15528
[h264 @ 034bf860] Cannot use next picture in error concealment
[h264 @ 034bf860] concealing 1472 DC, 1472 AC, 1472 MV errors in P frame
[h264 @ 0146edc0] SEI type 228 size 1184 truncated at 5440B f=0/0
[h264 @ 03692ba0] SEI type 228 size 1184 truncated at 528
[h264 @ 03692ba0] left block unavailable for requested intra mode at 0 7
[h264 @ 03692ba0] error while decoding MB 0 7, bytestream 2690
[h264 @ 03692ba0] Cannot use next picture in error concealment
[h264 @ 03692ba0] concealing 1325 DC, 1325 AC, 1325 MV errors in P frame
[h264 @ 03589500] Cannot use next picture in error concealment0/0
[h264 @ 03589500] concealing 1283 DC, 1283 AC, 1283 MV errors in P frame
[h264 @ 034bf860] Cannot use next picture in error concealment0/0
[h264 @ 034bf860] concealing 1317 DC, 1317 AC, 1317 MV errors in P frame
[h264 @ 03692ba0] left block unavailable for requested intra mode at 0 3
[h264 @ 03692ba0] error while decoding MB 0 3, bytestream 8523
[h264 @ 03692ba0] Cannot use next picture in error concealment
[h264 @ 03692ba0] concealing 1501 DC, 1501 AC, 1501 MV errors in P frame
[h264 @ 03589500] Cannot use next picture in error concealment0/0
[h264 @ 03589500] concealing 1434 DC, 1434 AC, 1434 MV errors in P frame
[h264 @ 034bf860] error while decoding MB 7 9, bytestream -5f=0/0
[h264 @ 034bf860] Cannot use next picture in error concealment
[h264 @ 034bf860] concealing 1230 DC, 1230 AC, 1230 MV errors in P frame
[h264 @ 03692ba0] top block unavailable for requested intra4x4 mode -1 at 12 0
[h264 @ 03692ba0] error while decoding MB 12 0, bytestream 2268
[h264 @ 03692ba0] Cannot use next picture in error concealment
[h264 @ 03692ba0] concealing 1584 DC, 1584 AC, 1584 MV errors in P frame
[h264 @ 03589500] top block unavailable for requested intra4x4 mode -1 at 35 0
[h264 @ 03589500] error while decoding MB 35 0, bytestream 2980
[h264 @ 03589500] Cannot use next picture in error concealment
[h264 @ 03589500] concealing 1584 DC, 1584 AC, 1584 MV errors in P frame
[h264 @ 034bf860] left block unavailable for requested intra mode at 0 4
[h264 @ 034bf860] error while decoding MB 0 4, bytestream 1748
[h264 @ 034bf860] Cannot use next picture in error concealment
[h264 @ 034bf860] concealing 1457 DC, 1457 AC, 1457 MV errors in P frame
[h264 @ 03692ba0] top block unavailable for requested intra4x4 mode -1 at 40 0
[h264 @ 03692ba0] error while decoding MB 40 0, bytestream 4887
[h264 @ 03692ba0] Cannot use next picture in error concealment
[h264 @ 03692ba0] concealing 1584 DC, 1584 AC, 1584 MV errors in P frame
[h264 @ 03589500] left block unavailable for requested intra mode at 0 3
[h264 @ 03589500] error while decoding MB 0 3, bytestream 8026
[h264 @ 03589500] Cannot use next picture in error concealment
[h264 @ 03589500] concealing 1501 DC, 1501 AC, 1501 MV errors in P frame
[h264 @ 034bf860] Cannot use next picture in error concealment0/0
[h264 @ 034bf860] concealing 1434 DC, 1434 AC, 1434 MV errors in P frame
[h264 @ 03692ba0] cabac decode of qscale diff failed at 36 2f=0/0
[h264 @ 03692ba0] error while decoding MB 36 2, bytestream 1748
[h264 @ 03692ba0] Cannot use next picture in error concealment
[h264 @ 03692ba0] concealing 1509 DC, 1509 AC, 1509 MV errors in P frame
[h264 @ 03589500] top block unavailable for requested intra4x4 mode -1 at 27 0
[h264 @ 03589500] error while decoding MB 27 0, bytestream 19352
[h264 @ 03589500] concealing 1584 DC, 1584 AC, 1584 MV errors in I frame
[h264 @ 034bf860] top block unavailable for requested intra mode at 33 0
[h264 @ 034bf860] error while decoding MB 33 0, bytestream 8177
[h264 @ 034bf860] Cannot use next picture in error concealment
[h264 @ 034bf860] concealing 1584 DC, 1584 AC, 1584 MV errors in P frame
[h264 @ 03692ba0] cabac decode of qscale diff failed at 13 2f=0/0
[h264 @ 03692ba0] error while decoding MB 13 2, bytestream 2512
[h264 @ 03692ba0] Cannot use next picture in error concealment
[h264 @ 03692ba0] concealing 1532 DC, 1532 AC, 1532 MV errors in P frame
[h264 @ 03589500] left block unavailable for requested intra mode at 0 7
[h264 @ 03589500] error while decoding MB 0 7, bytestream 1990
[h264 @ 03589500] Cannot use next picture in error concealment
[h264 @ 03589500] concealing 1325 DC, 1325 AC, 1325 MV errors in P frame
[h264 @ 034bf860] top block unavailable for requested intra4x4 mode -1 at 3 0
[h264 @ 034bf860] error while decoding MB 3 0, bytestream 13632
[h264 @ 034bf860] Cannot use next picture in error concealment
[h264 @ 034bf860] concealing 1584 DC, 1584 AC, 1584 MV errors in P frame
[h264 @ 03692ba0] left block unavailable for requested intra mode at 0 2
[h264 @ 03692ba0] error while decoding MB 0 2, bytestream 3993
[h264 @ 03692ba0] Cannot use next picture in error concealment
[h264 @ 03692ba0] concealing 1545 DC, 1545 AC, 1545 MV errors in P frame
[h264 @ 03589500] error while decoding MB 27 12, bytestream -50/0
[h264 @ 03589500] Cannot use next picture in error concealment
[h264 @ 03589500] concealing 1078 DC, 1078 AC, 1078 MV errors in P frame
[h264 @ 034bf860] Cannot use next picture in error concealment0/0
[h264 @ 034bf860] concealing 1330 DC, 1330 AC, 1330 MV errors in P frame
[h264 @ 03692ba0] Cannot use next picture in error concealment0/0
[h264 @ 03692ba0] concealing 1429 DC, 1429 AC, 1429 MV errors in P frame
[h264 @ 03589500] Cannot use next picture in error concealment0/0
[h264 @ 03589500] concealing 1401 DC, 1401 AC, 1401 MV errors in P frame
[h264 @ 034bf860] cabac decode of qscale diff failed at 16 9f=0/0
[h264 @ 034bf860] error while decoding MB 16 9, bytestream 1634
[h264 @ 034bf860] Cannot use next picture in error concealment
[h264 @ 034bf860] concealing 1221 DC, 1221 AC, 1221 MV errors in P frame
[h264 @ 03692ba0] Cannot use next picture in error concealment0/0
[h264 @ 03692ba0] concealing 1084 DC, 1084 AC, 1084 MV errors in P frame
[h264 @ 03589500] left block unavailable for requested intra mode at 0 5
[h264 @ 03589500] error while decoding MB 0 5, bytestream 1711
[h264 @ 03589500] Cannot use next picture in error concealment
[h264 @ 03589500] concealing 1413 DC, 1413 AC, 1413 MV errors in P frame
[h264 @ 034bf860] top block unavailable for requested intra mode at 16 0
[h264 @ 034bf860] error while decoding MB 16 0, bytestream 2851
[h264 @ 034bf860] Cannot use next picture in error concealment
[h264 @ 034bf860] concealing 1584 DC, 1584 AC, 1584 MV errors in P frame
[h264 @ 03692ba0] cabac decode of qscale diff failed at 16 10=0/0
[h264 @ 03692ba0] error while decoding MB 16 10, bytestream 9866
[h264 @ 03692ba0] Cannot use next picture in error concealment
[h264 @ 03692ba0] concealing 1177 DC, 1177 AC, 1177 MV errors in P frame
[h264 @ 03589500] Cannot use next picture in error concealment0/0
[h264 @ 03589500] concealing 1447 DC, 1447 AC, 1447 MV errors in P frame
[h264 @ 0146edc0] non-existing SPS 1 referenced in buffering period
[h264 @ 034bf860] non-existing SPS 1 referenced in buffering period
[h264 @ 034bf860] cabac decode of qscale diff failed at 12 2
[h264 @ 034bf860] error while decoding MB 12 2, bytestream 2985
[h264 @ 034bf860] Cannot use next picture in error concealment
[h264 @ 034bf860] concealing 1533 DC, 1533 AC, 1533 MV errors in P frame
[h264 @ 03692ba0] cabac decode of qscale diff failed at 35 3f=0/0
[h264 @ 03692ba0] error while decoding MB 35 3, bytestream 3283
[h264 @ 03692ba0] Cannot use next picture in error concealment
[h264 @ 03692ba0] concealing 1466 DC, 1466 AC, 1466 MV errors in P frame
[h264 @ 03589500] Cannot use next picture in error concealment0/0
[h264 @ 03589500] concealing 1473 DC, 1473 AC, 1473 MV errors in P frame
[h264 @ 034bf860] Cannot use next picture in error concealment0/0
[h264 @ 034bf860] concealing 1053 DC, 1053 AC, 1053 MV errors in P frame
[h264 @ 0146edc0] SEI type 209 size 1232 truncated at 4160B f=0/0
[h264 @ 03692ba0] SEI type 209 size 1232 truncated at 404
[h264 @ 03692ba0] Cannot use next picture in error concealment0/0
[h264 @ 03692ba0] concealing 547 DC, 547 AC, 547 MV errors in P frame
[h264 @ 03589500] Cannot use next picture in error concealment0/0
[h264 @ 03589500] concealing 1478 DC, 1478 AC, 1478 MV errors in P frame
[h264 @ 0146edc0] SEI type 155 size 1552 truncated at 5520B f=0/0
[h264 @ 0146edc0] SEI type 4 size 1312 truncated at 504
[h264 @ 034bf860] SEI type 155 size 1552 truncated at 541
[h264 @ 034bf860] SEI type 4 size 1312 truncated at 495
[h264 @ 034bf860] Cannot use next picture in error concealment
[h264 @ 034bf860] concealing 1317 DC, 1317 AC, 1317 MV errors in P frame
[h264 @ 03692ba0] left block unavailable for requested intra mode at 0 5
[h264 @ 03692ba0] error while decoding MB 0 5, bytestream 1406
[h264 @ 03692ba0] Cannot use next picture in error concealment
[h264 @ 03692ba0] concealing 1413 DC, 1413 AC, 1413 MV errors in P frame
[h264 @ 03589500] Cannot use next picture in error concealment0/0
[h264 @ 03589500] concealing 1221 DC, 1221 AC, 1221 MV errors in P frame
[h264 @ 034bf860] left block unavailable for requested intra4x4 mode -1 at 0 8
[h264 @ 034bf860] error while decoding MB 0 8, bytestream 4430
[h264 @ 034bf860] Cannot use next picture in error concealment
[h264 @ 034bf860] concealing 1281 DC, 1281 AC, 1281 MV errors in P frame
[h264 @ 03692ba0] Cannot use next picture in error concealment0/0
[h264 @ 03692ba0] concealing 1305 DC, 1305 AC, 1305 MV errors in P frame
[h264 @ 03589500] Cannot use next picture in error concealment0/0
[h264 @ 03589500] concealing 1273 DC, 1273 AC, 1273 MV errors in P frame
[h264 @ 034bf860] Cannot use next picture in error concealment0/0
[h264 @ 034bf860] concealing 1476 DC, 1476 AC, 1476 MV errors in P frame
[h264 @ 03692ba0] Cannot use next picture in error concealment0/0
[h264 @ 03692ba0] concealing 971 DC, 971 AC, 971 MV errors in P frame
[h264 @ 03589500] left block unavailable for requested intra mode at 0 5
[h264 @ 03589500] error while decoding MB 0 5, bytestream 4458
[h264 @ 03589500] Cannot use next picture in error concealment
[h264 @ 03589500] concealing 1413 DC, 1413 AC, 1413 MV errors in P frame
[h264 @ 034bf860] left block unavailable for requested intra mode at 0 2
[h264 @ 034bf860] error while decoding MB 0 2, bytestream 6629
[h264 @ 034bf860] concealing 1545 DC, 1545 AC, 1545 MV errors in I frame
[h264 @ 03692ba0] Cannot use next picture in error concealment0/0
[h264 @ 03692ba0] concealing 1375 DC, 1375 AC, 1375 MV errors in P frame
[h264 @ 03589500] Cannot use next picture in error concealment0/0
[h264 @ 03589500] concealing 1459 DC, 1459 AC, 1459 MV errors in P frame
[h264 @ 0146edc0] SEI type 47 size 1552 truncated at 128 0B f=0/0
[h264 @ 034bf860] SEI type 47 size 1552 truncated at 117
[h264 @ 034bf860] Cannot use next picture in error concealment
[h264 @ 034bf860] concealing 1365 DC, 1365 AC, 1365 MV errors in P frame
[h264 @ 03692ba0] cabac decode of qscale diff failed at 2 6 f=0/0
[h264 @ 03692ba0] error while decoding MB 2 6, bytestream 1003
[h264 @ 03692ba0] Cannot use next picture in error concealment
[h264 @ 03692ba0] concealing 1367 DC, 1367 AC, 1367 MV errors in P frame
[h264 @ 03589500] cabac decode of qscale diff failed at 37 4f=0/0
[h264 @ 03589500] error while decoding MB 37 4, bytestream 2596
[h264 @ 03589500] Cannot use next picture in error concealment
[h264 @ 03589500] concealing 1420 DC, 1420 AC, 1420 MV errors in P frame
[h264 @ 034bf860] Cannot use next picture in error concealment0/0
[h264 @ 034bf860] concealing 1390 DC, 1390 AC, 1390 MV errors in P frame
[h264 @ 03692ba0] Cannot use next picture in error concealment0/0
[h264 @ 03692ba0] concealing 1235 DC, 1235 AC, 1235 MV errors in P frame
[h264 @ 03589500] Cannot use next picture in error concealment0/0
[h264 @ 03589500] concealing 1391 DC, 1391 AC, 1391 MV errors in P frame
[h264 @ 0146edc0] non-existing SPS 6 referenced in buffering period
[h264 @ 034bf860] non-existing SPS 6 referenced in buffering period
[h264 @ 034bf860] Cannot use next picture in error concealment
[h264 @ 034bf860] concealing 1254 DC, 1254 AC, 1254 MV errors in P frame
[h264 @ 03692ba0] Cannot use next picture in error concealment0/0
[h264 @ 03692ba0] concealing 1449 DC, 1449 AC, 1449 MV errors in P frame
[h264 @ 03589500] Cannot use next picture in error concealment0/0
[h264 @ 03589500] concealing 1442 DC, 1442 AC, 1442 MV errors in P frame
[h264 @ 034bf860] cabac decode of qscale diff failed at 28 3f=0/0
[h264 @ 034bf860] error while decoding MB 28 3, bytestream 1553
[h264 @ 034bf860] Cannot use next picture in error concealment
[h264 @ 034bf860] concealing 1473 DC, 1473 AC, 1473 MV errors in P frame
[h264 @ 03692ba0] Cannot use next picture in error concealment0/0
[h264 @ 03692ba0] concealing 1444 DC, 1444 AC, 1444 MV errors in P frame
[h264 @ 0146edc0] SEI type 51 size 1376 truncated at 10080B f=0/0
[h264 @ 03589500] SEI type 51 size 1376 truncated at 995
[h264 @ 03589500] cabac decode of qscale diff failed at 33 2
[h264 @ 03589500] error while decoding MB 33 2, bytestream 6555
[h264 @ 03589500] Cannot use next picture in error concealment
[h264 @ 03589500] concealing 1512 DC, 1512 AC, 1512 MV errors in P frame
[h264 @ 034bf860] Cannot use next picture in error concealment0/0
[h264 @ 034bf860] concealing 1371 DC, 1371 AC, 1371 MV errors in P frame
[h264 @ 0146edc0] non-existing SPS 1 referenced in buffering period
[h264 @ 03692ba0] non-existing SPS 1 referenced in buffering period
[h264 @ 03692ba0] Cannot use next picture in error concealment
[h264 @ 03692ba0] concealing 1064 DC, 1064 AC, 1064 MV errors in P frame
[h264 @ 03589500] Cannot use next picture in error concealment0/0
[h264 @ 03589500] concealing 1372 DC, 1372 AC, 1372 MV errors in P frame
[h264 @ 0146edc0] non-existing SPS 16 referenced in buffering period
[h264 @ 034bf860] non-existing SPS 16 referenced in buffering period
[h264 @ 034bf860] Cannot use next picture in error concealment
[h264 @ 034bf860] concealing 1496 DC, 1496 AC, 1496 MV errors in P frame
[h264 @ 03692ba0] Cannot use next picture in error concealment0/0
[h264 @ 03692ba0] concealing 1241 DC, 1241 AC, 1241 MV errors in P frame
[h264 @ 0146edc0] SEI type 26 size 1176 truncated at 10320B f=0/0
[h264 @ 03589500] SEI type 26 size 1176 truncated at 1021
[h264 @ 03589500] Cannot use next picture in error concealment
[h264 @ 03589500] concealing 1304 DC, 1304 AC, 1304 MV errors in P frame
[h264 @ 034bf860] cabac decode of qscale diff failed at 0 4 f=0/0
[h264 @ 034bf860] error while decoding MB 0 4, bytestream 8290
[h264 @ 034bf860] Cannot use next picture in error concealment
[h264 @ 034bf860] concealing 1457 DC, 1457 AC, 1457 MV errors in P frame
[h264 @ 03692ba0] Cannot use next picture in error concealment0/0
[h264 @ 03692ba0] concealing 1391 DC, 1391 AC, 1391 MV errors in P frame
[h264 @ 03589500] Cannot use next picture in error concealment0/0
[h264 @ 03589500] concealing 1162 DC, 1162 AC, 1162 MV errors in P frame
[h264 @ 034bf860] error while decoding MB 16 15, bytestream -18/0
[h264 @ 034bf860] Cannot use next picture in error concealment
[h264 @ 034bf860] concealing 957 DC, 957 AC, 957 MV errors in P frame
[h264 @ 0146edc0] SEI type 125 size 3928 truncated at 2336B f=0/0
[h264 @ 0146edc0] reference count 2 overflow
[h264 @ 03692ba0] SEI type 125 size 3928 truncated at 2327
[h264 @ 03692ba0] reference picture missing during reorder
[h264 @ 03692ba0] reference count overflow
[h264 @ 03692ba0] decode_slice_header error
[h264 @ 0146edc0] reference count 3 overflow 0KB sq= 0B f=0/0
[h264 @ 03589500] mmco: unref short failure
[h264 @ 03589500] number of reference frames (0+2) exceeds max (1; probably corr
upt input), discarding one
[h264 @ 03589500] reference picture missing during reorder

Last message repeated 1 times

[h264 @ 03589500] reference count overflow
[h264 @ 03589500] decode_slice_header error
[h264 @ 0146edc0] reference count 3 overflow 0KB sq= 0B f=0/0
[h264 @ 034bf860] mmco: unref short failure
[h264 @ 034bf860] number of reference frames (0+2) exceeds max (1; probably corr
upt input), discarding one
[h264 @ 034bf860] reference picture missing during reorder

Last message repeated 1 times

[h264 @ 034bf860] reference count overflow
[h264 @ 034bf860] decode_slice_header error
[h264 @ 0146edc0] reference count 3 overflow 0KB sq= 0B f=0/0
[h264 @ 03692ba0] mmco: unref short failure
[h264 @ 03692ba0] number of reference frames (0+2) exceeds max (1; probably corr
upt input), discarding one
[h264 @ 03692ba0] reference picture missing during reorder

Last message repeated 1 times

[h264 @ 03692ba0] reference count overflow
[h264 @ 03692ba0] decode_slice_header error
[h264 @ 0146edc0] reference count 3 overflow 0KB sq= 0B f=0/0
[h264 @ 03589500] mmco: unref short failure
[h264 @ 03589500] number of reference frames (0+2) exceeds max (1; probably corr
upt input), discarding one
[h264 @ 03589500] reference picture missing during reorder

Last message repeated 1 times

[h264 @ 03589500] reference count overflow
[h264 @ 03589500] decode_slice_header error
[h264 @ 0146edc0] reference count 3 overflow 0KB sq= 0B f=0/0
[h264 @ 034bf860] mmco: unref short failure
[h264 @ 034bf860] number of reference frames (0+2) exceeds max (1; probably corr
upt input), discarding one
[h264 @ 034bf860] reference picture missing during reorder

Last message repeated 1 times

[h264 @ 034bf860] reference count overflow
[h264 @ 034bf860] decode_slice_header error
[h264 @ 0146edc0] reference count 3 overflow 0KB sq= 0B f=0/0
[h264 @ 03692ba0] mmco: unref short failure
[h264 @ 03692ba0] number of reference frames (0+2) exceeds max (1; probably corr
upt input), discarding one
[h264 @ 03692ba0] reference picture missing during reorder

Last message repeated 1 times

[h264 @ 03692ba0] reference count overflow
[h264 @ 03692ba0] decode_slice_header error
[h264 @ 0146edc0] reference count 3 overflow 0KB sq= 0B f=0/0
[h264 @ 03589500] mmco: unref short failure
[h264 @ 03589500] number of reference frames (0+2) exceeds max (1; probably corr
upt input), discarding one
[h264 @ 03589500] reference picture missing during reorder

Last message repeated 1 times

[h264 @ 03589500] reference count overflow
[h264 @ 03589500] decode_slice_header error
[h264 @ 0146edc0] reference count 3 overflow 0KB sq= 0B f=0/0
[h264 @ 034bf860] mmco: unref short failure
[h264 @ 034bf860] number of reference frames (0+2) exceeds max (1; probably corr
upt input), discarding one
[h264 @ 034bf860] reference picture missing during reorder

Last message repeated 1 times

[h264 @ 034bf860] reference count overflow
[h264 @ 034bf860] decode_slice_header error
...

comment:4 by superware, 8 years ago

Just to be clear, FFmepg doesn't hang or crash, only stops outputting frames.

by superware, 8 years ago

Attachment: log.txt added

Console output log

comment:5 by Carl Eugen Hoyos, 8 years ago

Please test current FFmpeg git head (preferably with a sane configure line like ./configure && make and please explain to me what to do with the pcap file).

comment:6 by superware, 8 years ago

I've already tested git head. To playback the pcap file (which holds the Ethernet packets recorded), I've used PlayCap (also). The stream destination is 192.168.19.121:40002, so your local IP on the network interface should be 192.168.19.121.

comment:7 by superware, 8 years ago

Hi cehoyos, can this issue be changed to "open"? is there anything else that's missing to reproduce?

comment:8 by Carl Eugen Hoyos, 8 years ago

You don't want me to try and reproduce your issue?

comment:9 by superware, 8 years ago

Sure I do, sorry for the misunderstanding. Please tell me if there's anything I can do to help you out.

comment:10 by Carl Eugen Hoyos, 8 years ago

Is one computer enough to test? I ran PlayCap after setting my local ip to 192.168.19.121 and it happily sends data but I don't receive anything with current FFmpeg...

in reply to:  10 comment:11 by superware, 8 years ago

Yes, definitely same machine. What I had to do, since I'm using a wireless link, is to make sure the physical network adapter is connected to a network switch or similar (so it is actually "working"), and configure that IP on the physical network connection/interface.

Another thing, the video will start 27 seconds into the pcap file. You can use Wireshark for example to make sure you see packets with destination 192.168.19.121:40002.

I highly appreciate your efforts to reproduce this issue, very impressive indeed since it's not that trivial.

comment:12 by superware, 8 years ago

Hi cehoyos, can you please enter EFnet #ffmpeg-devel?

Last edited 8 years ago by superware (previous) (diff)

in reply to:  10 comment:13 by matanhavi, 8 years ago

Replying to cehoyos:

Is one computer enough to test? I ran PlayCap after setting my local ip to 192.168.19.121 and it happily sends data but I don't receive anything with current FFmpeg...

Hello,
Have you managed to reproduce the issue?

comment:14 by Carl Eugen Hoyos, 8 years ago

No, I am unable to reproduce:
I set the IP address of eth0 to 192.168.19.121 and verified that I could still reach my local network (192.168.19.0), then started PlayCap 0.1.1 with the pcap file you uploaded (md5sum 19026a0884ad3058a15c59c1c49a89a9). I started playback on eth0 so I could see the counter running and ifconfig shows growing TX. RX never raises and ffmpeg -i udp://192.168.19.121:40002 does not receive any data.

comment:15 by matanhavi, 8 years ago

I have tested it with windows, so I am not sure about using eth0.
I can tell you that in windows I have seen the packets from the Playcap on the network card using wireshark when I plugged LAN cable.
Is is possible to have Chat with you (Skype/IRC)

comment:16 by superware, 8 years ago

Hi cehoyos, I'm now on freenode IRC #ffmpeg-devel (and #ffmpeg), I would greatly appreciate it if you can join.

Last edited 8 years ago by superware (previous) (diff)

in reply to:  16 ; comment:17 by Carl Eugen Hoyos, 8 years ago

Replying to superware:

Hi cehoyos, I'm now on freenode IRC #ffmpeg-devel (and #ffmpeg), I would greatly appreciate it if you can join.

Why?
I mean: If you can explain how I can reproduce your issue, please explain here so that other potentially interested people could also test. If you cannot explain, how would talking on irc help?

in reply to:  17 comment:18 by superware, 8 years ago

Why?
I mean: If you can explain how I can reproduce your issue, please explain here so that other potentially interested people could also test. If you cannot explain, how would talking on irc help?

Well, I am able to reproduce using the pcap file, PlayCap and ffplay (Windows). I'm just trying to be creative and help you reproduce, after that it will be easy to update this ticket with instructions.

Have you tried to physically connect the Ethernet interface to a hub/switch/router? for me it was a requirement. Can you see 192.168.19.121:40002 packets with Wireshark or alike?

Thanks!

Last edited 8 years ago by superware (previous) (diff)

comment:19 by superware, 8 years ago

I think I've managed to save the stream to a short file (using aviocat), please see http://www.datafilehost.com/d/f097cc19. Note: by starting PlayCap just after the "bad" point, ffplay is able to play everything that follows, so it must be something about that point.

Just for the record, this stream/file is in very bad quality (every other UDP packet, alternately) just in order to reproduce this issue which seems to happen even on a brief bad stream of sort.

Thanks!

in reply to:  19 ; comment:20 by Carl Eugen Hoyos, 8 years ago

Replying to superware:

Just for the record, this stream/file is in very bad quality (every other UDP packet, alternately) just in order to reproduce this issue which seems to happen even on a brief bad stream of sort.

Sorry, I do not understand what you are trying to report: The file you provide contains 390 broken frames and all can be transcoded: If you cut 400k (10%) from the end, 361 frames are decoded, if you cut 500k from the beginning, 358 frames are decoded indicating that the whole file can be read. With a file as broken as this one, you cannot expect that you get a decodable stream no matter where you cut it. This could be different if the stream were recognisable but this is not the case.

in reply to:  20 ; comment:21 by superware, 8 years ago

Sorry, I do not understand what you are trying to report: The file you provide contains 390 broken frames and all can be transcoded: If you cut 400k (10%) from the end, 361 frames are decoded, if you cut 500k from the beginning, 358 frames are decoded indicating that the whole file can be read. With a file as broken as this one, you cannot expect that you get a decodable stream no matter where you cut it. This could be different if the stream were recognisable but this is not the case.

Let me explain from the beginning. I have a "black box" generating live h264 over UDP stream, but once in a while, ffmpeg seems to enter a situation where it unexpectedly stops outputting frames, without recovery. The only solution in that point is to restart playback/ffmpeg, and then, the stream is immediately decoded normally. I'm not an expert in this, but it seems the decoder enters a dead-lock-like situation within itself.

By recording the network stream of that UDP/h264 stream, omitting every second packet, this was the only way I could reproduce the described "decoder halt" condition. You can see that in some point, the decoder stops outputting frames (or "garbage" as you might call it), but it doesn't recover. It seems that the same "garbled" stream might briefly appear in the middle of a perfectly good stream and render the decoder/process inoperable.

The folks at #ffmpeg-devel suggested I try to reproduce with a file, since playing a pcap file might be a bit challenging.

Thank you for helping out.

comment:22 by Hendrik, 8 years ago

Ideally we would have a file that contains both a broken segment, followed by a correct segment, so that we actually have a full test case, and can reproduce how the decoder breaks on the broken segment and never decodes the correct segment properly.

in reply to:  21 ; comment:23 by Carl Eugen Hoyos, 8 years ago

Replying to superware:

Let me explain from the beginning. I have a "black box" generating live h264 over UDP stream, but once in a while, ffmpeg seems to enter a situation where it unexpectedly stops outputting frames, without recovery. The only solution in that point is to restart playback/ffmpeg

But wireshark or whatever smart tool you are using must be able to record that exact stream and mplayer -dumpstream or aviocat can produce a transport stream from it if you restream it or do I miss something?

in reply to:  23 comment:24 by superware, 8 years ago

But wireshark or whatever smart tool you are using must be able to record that exact stream and mplayer -dumpstream or aviocat can produce a transport stream from it if you restream it or do I miss something?

It's quite rare, I'll try to reproduce it "live".

comment:25 by Carl Eugen Hoyos, 8 years ago

Does the transport stream you uploaded correspond with the pcap file you originally provided?

in reply to:  25 comment:26 by superware, 8 years ago

Replying to cehoyos:

Does the transport stream you uploaded correspond with the pcap file you originally provided?

Yes, it's part of it. I just used: aviocat udp://192.168.19.121:40002 trac_ticket_4893.ts

comment:27 by superware, 8 years ago

cehoyos and heleppkes - eureka! Please see http://www.datafilehost.com/d/37dada33.

With git head the frames stop at around 00:00:14, yet "ffplay.exe -i ticket_4893_cut.mp4 -ss 00:00:15" works.

comment:28 by Carl Eugen Hoyos, 8 years ago

PLEASE provide the original (mpegts) file (of course you may cut it with dd or split), NOT a file created with FFmpeg!

Last edited 8 years ago by Carl Eugen Hoyos (previous) (diff)

comment:29 by Carl Eugen Hoyos, 8 years ago

Component: undeterminedavcodec
Keywords: regression added; udp removed
Priority: normalimportant
Reproduced by developer: set
Version: unspecifiedgit-master

Looks like a regression since c230af9bccc3cadb373f9007ba14fffb6c2acc75 related to ticket #2062.

comment:30 by superware, 8 years ago

Hi cehoyos, that last file I've linked to reproduces the issue, isn't that enough to get this issue investigated and resolved?

comment:31 by Carl Eugen Hoyos, 8 years ago

No, please provide a file that was not remuxed with FFmpeg.

comment:32 by Jose Santiago, 8 years ago

Cc: jsantiago@fastmail.us added

comment:33 by Carl Eugen Hoyos, 7 years ago

Resolution: fixed
Status: newclosed

by Israel Robotnick, 6 years ago

Attachment: ffmpegError.PNG added

Error loop on ffmpeg

comment:34 by Israel Robotnick, 6 years ago

Resolution: fixed
Status: closedreopened

Hi All,

I'm having the same problem.
I repeat a stream for days simluating a camera on udp to an ffmpeg server that repeats that stream. It works great for hundreds of times, then unexpectedly the server runs into an unending loop of errors.
Seems like it looses a byte and can't recover from it.
The simulated streams keeps going great, it's only the ffmpeg server that breaks.
If I restart the ffmpeg server, it starts fine and you can see the picture.
(I added a log showing the broken server sending errors in an unending loop just as superware mentioned)

I'm using ffmpeg static 3.4.1 version which should be updated with the fixes cenoyos mentioned.
It always happens, but always unexpectedly, on a stream which is perfectly fine just had a long run. (so adding it here won't help anybody)

I wonder maybe the problem is with how I config the ffmpeg on my container?
"ffmpeg -i 150.45.223.97:1700 -f mpeg1video -b:v 1200k -an -r 30 -"

I checked, the resolution, fps and BR are just as the input source sends it, and the bandwidth isn't a problem (it's on a lan network).
Maybe I need to add a minimal buffer? (since I want it to be live content, I can't make a big buffer that will delay the stream, I rather have broken pixels. how can I define a minimal buffer if that's the problem?)
Or might it be something else? maybe a param that tells ffmpeg to skip broken bytes and restart?

Superware, maybe you found a solution for this problem?

Thanks

Error loop on ffmpeg

Last edited 6 years ago by Israel Robotnick (previous) (diff)

in reply to:  34 comment:35 by Carl Eugen Hoyos, 6 years ago

Resolution: fixed
Status: reopenedclosed

Replying to IsraelRobotnick:

I'm having the same problem.

No, please do not reopen ancient tickets, either post on the user mailing list or - but only if you able to provide all necessary information, this ticket should allow you to understand what we need - open a new ticket.

Note: See TracTickets for help on using tickets.