Opened 10 years ago

Last modified 9 years ago

#3405 reopened defect

Bizare behaviour with RTP mpegts sources

Reported by: sharbatgula Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: RTP mpegts
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
Hi,
I'm transcoding a bunch of SD sources from SPTS mpegts transported on different multicast addresses with RTP on port 5530. (VBR h264 video, mp2 audio)
When I transcode the first source from mcast IP1:5530 the output is sort of OK (occasional green patches and false reporting of unsupported source features)
Once I run a second ffmpeg instance to transcode source IP2:5530 the second instance is not ingesting IP2 content but IP1 and both instances start to interfere and they don't even come to a state to start transcoding.
It's bizare that even two ffplay instances tuned to different sources play back the same content!
I tried playing back with vlc and there is no such problem.

% ffmpeg -y -f mpegts -i rtp://@239.2.2.22:5530 -threads 0 -acodec libfdk_aac -ab 64k -ar 44100 -vcodec libx264 -vprofile baseline -vlevel 1.3 -x264opts fps=25:keyint=100:bitrate=200 -s 320x240 -f mpegts udp://224.10.2.3:5004?pkt_size=1316

I uploaded a sample of my mpegts on: ftp://upload.ffmpeg.org/MPlayer/incoming/ts__sample.ts

ffmpeg version 2.1.git
built on Jan 30 2014 12:22:30 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Attachments (1)

ffmpeg_terminal_output.txt (15.9 KB ) - added by sharbatgula 10 years ago.
terminal output

Download all attachments as: .zip

Change History (10)

by sharbatgula, 10 years ago

Attachment: ffmpeg_terminal_output.txt added

terminal output

comment:1 by sharbatgula, 10 years ago

Summary: Bizare behaviour with RTP mpegts sources,Bizare behaviour with RTP mpegts sources

comment:2 by Carl Eugen Hoyos, 10 years ago

Keywords: source mix-up removed

Please provide the command line that allows to reproduce the problem together with the complete, uncut console output.

in reply to:  2 comment:3 by sharbatgula, 10 years ago

Replying to cehoyos:

Please provide the command line that allows to reproduce the problem together with the complete, uncut console output.

Hi cehoyos,

You can find that in the document that I attached to the case. I'm pasting its content below.
Please note that sometimes it is enough to just ffplay rtp://@multicast_ip:port and get

ffmpeg -y -f mpegts -i rtp://@239.2.2.22:5530 -threads 0 -acodec libfdk_aac -ab 64k -ar 44100 -vcodec libx264 -vprofile baseline -vlevel 1.3 -x264opts fps=25:keyint=100:bitrate=200 -s 320x240 -f mpegts udp://224.10.2.3:5004?pkt_size=1316

[h264 @ 0x29eb420] non-existing PPS referenced
[h264 @ 0x29eb420] non-existing PPS 0 referenced
[h264 @ 0x29eb420] decode_slice_header error
[h264 @ 0x29eb420] no frame!
[h264 @ 0x29eb420] non-existing PPS referenced
[h264 @ 0x29eb420] non-existing PPS 0 referenced
[h264 @ 0x29eb420] decode_slice_header error
[h264 @ 0x29eb420] no frame!
[h264 @ 0x29eb420] non-existing PPS referenced
[h264 @ 0x29eb420] non-existing PPS 0 referenced
[h264 @ 0x29eb420] decode_slice_header error
[h264 @ 0x29eb420] no frame!
[h264 @ 0x29eb420] mmco: unref short failure

Last message repeated 1 times

[h264 @ 0x29eb420] number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one
Input #0, mpegts, from 'rtp://@239.2.2.22:5530':

Duration: N/A, start: 70660.816500, bitrate: 128 kb/s
Program 1

Stream #0:0[0x15f5]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg), 720x576 [SAR 12:11 DAR 15:11], 50 tbr, 90k tbn, 50 tbc
Stream #0:1[0x15f6](mac): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 128 kb/s

[libx264 @ 0x2a71aa0] using SAR=45/44
[libx264 @ 0x2a71aa0] MB rate (15000) > level limit (11880)
[libx264 @ 0x2a71aa0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x2a71aa0] profile Constrained Baseline, level 1.3
Output #0, mpegts, to 'udp://224.10.2.3:5004?pkt_size=1316':

Metadata:

encoder : Lavf55.26.100
Stream #0:0: Video: h264 (libx264), yuv420p, 320x240 [SAR 45:44 DAR 15:11], q=-1--1, 200 kb/s, 90k tbn, 50 tbc
Stream #0:1(mac): Audio: aac (libfdk_aac), 44100 Hz, stereo, s16, 64 kb/s

Stream mapping:

Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (mp2 -> libfdk_aac)

Press [q] to stop, ? for help
[h264 @ 0x3423ca0] Reference 3 >= 2
[h264 @ 0x3423ca0] error while decoding MB 20 8, bytestream (5861)
[h264 @ 0x3468e20] Reference 5 >= 2
[h264 @ 0x3468e20] error while decoding MB 19 19, bytestream (628)
[h264 @ 0x34d7840] Reference 3 >= 2
[h264 @ 0x34d7840] error while decoding MB 2 10, bytestream (1337)
[h264 @ 0x3546280] Reference 2 >= 2
[h264 @ 0x3546280] error while decoding MB 15 15, bytestream (1614)
[h264 @ 0x35b4cc0] Reference 4 >= 2
[h264 @ 0x35b4cc0] error while decoding MB 29 12, bytestream (1128)
[h264 @ 0x3623700] Reference 2 >= 2
[h264 @ 0x3623700] error while decoding MB 20 5, bytestream (1439)
[h264 @ 0x3692140] reference picture missing during reorder
[h264 @ 0x3692140] Missing reference picture, default is 65292
[h264 @ 0x3692140] left block unavailable for requested intra mode at 0 8
[h264 @ 0x3692140] error while decoding MB 0 8, bytestream (9817)
[h264 @ 0x3700b80] reference picture missing during reorder
[h264 @ 0x3700b80] Missing reference picture, default is 65293
[h264 @ 0x3700b80] Reference 2 >= 2
[h264 @ 0x3700b80] error while decoding MB 2 17, bytestream (1477)
[mp2 @ 0x29ebe80] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
[mp2 @ 0x29ebe80] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x35b4cc0] cabac decode of qscale diff failed at 27 26
[h264 @ 0x35b4cc0] error while decoding MB 27 26, bytestream (568)
[h264 @ 0x3692140] Reference 2 >= 2
[h264 @ 0x3692140] error while decoding MB 36 28, bytestream (631)
[h264 @ 0x3700b80] error while decoding MB 8 29, bytestream (-7)
[mpegts @ 0x29c6c40] PES packet size mismatch
[mp2 @ 0x29ebe80] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x38bb480] Found reference and non-reference fields in the same frame, which is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[h264 @ 0x38bb480] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the ffmpeg-devel mailing list.
[h264 @ 0x38bb480] decode_slice_header error
[h264 @ 0x3929ec0] reference picture missing during reorder
[h264 @ 0x3929ec0] Missing reference picture, default is 2147483647
[h264 @ 0x3a07340] mmco: unref short failure
[h264 @ 0x3546280] reference picture missing during reorder
[h264 @ 0x3546280] Missing reference picture, default is 65364
[h264 @ 0x35b4cc0] mmco: unref short failure
[h264 @ 0x3929ec0] mmco: unref short failureme=00:00:01.26 bitrate= 0.0kbits/s
[mpegts @ 0x29c6c40] PES packet size mismatch
[h264 @ 0x3a75d80] Reference 4 >= 2
[h264 @ 0x3a75d80] error while decoding MB 21 26, bytestream (369)
[mp2 @ 0x29ebe80] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x3546280] Reference 2 >= 2
[h264 @ 0x3546280] error while decoding MB 26 24, bytestream (477)
[h264 @ 0x3468e20] Reference 2 >= 2 43kB time=00:00:02.35 bitrate= 148.5kbits/s dup=147 drop=0
[h264 @ 0x3468e20] error while decoding MB 37 4, bytestream (11097)
[h264 @ 0x3546280] Reference 2 >= 2 278kB time=00:00:05.47 bitrate= 416.5kbits/s dup=223 drop=0
[h264 @ 0x3546280] error while decoding MB 13 28, bytestream (1236)
[h264 @ 0x3468e20] Reference 5 >= 2
[h264 @ 0x3468e20] error while decoding MB 36 8, bytestream (5968)
[h264 @ 0x3692140] Reference 3 >= 2 313kB time=00:00:06.49 bitrate= 395.2kbits/s dup=249 drop=0
[h264 @ 0x3692140] error while decoding MB 32 7, bytestream (1820)
[h264 @ 0x3700b80] Reference 2 >= 2 334kB time=00:00:07.02 bitrate= 389.8kbits/s dup=258 drop=0
[h264 @ 0x3700b80] error while decoding MB 22 20, bytestream (1166)
[h264 @ 0x3a75d80] Reference 2 >= 2 401kB time=00:00:08.58 bitrate= 382.6kbits/s dup=293 drop=0
[h264 @ 0x3a75d80] error while decoding MB 20 20, bytestream (187)
[h264 @ 0x3692140] Reference 4 >= 2 478kB time=00:00:09.55 bitrate= 409.5kbits/s dup=333 drop=0
[h264 @ 0x3692140] error while decoding MB 42 11, bytestream (3874)
[h264 @ 0x376f5c0] Reference 3 >= 2
[h264 @ 0x376f5c0] error while decoding MB 38 7, bytestream (6281)
[h264 @ 0x3623700] Reference 2 >= 2 484kB time=00:00:10.13 bitrate= 390.8kbits/s dup=340 drop=0
[h264 @ 0x3623700] error while decoding MB 39 26, bytestream (3468)
[h264 @ 0x35b4cc0] Reference 4 >= 2 487kB time=00:00:10.62 bitrate= 375.5kbits/s dup=348 drop=0
[h264 @ 0x35b4cc0] error while decoding MB 28 17, bytestream (1795)
[h264 @ 0x376f5c0] reference picture missing during reorder bitrate= 369.3kbits/s dup=364 drop=0
[h264 @ 0x376f5c0] Missing reference picture, default is 65884
[h264 @ 0x37de000] reference picture missing during reorder
[h264 @ 0x37de000] Missing reference picture, default is 65885
[h264 @ 0x3929ec0] cabac decode of qscale diff failed at 9 24
[h264 @ 0x3929ec0] error while decoding MB 9 24, bytestream (304)
[h264 @ 0x38bb480] error while decoding MB 44 19, bytestream (-15)e= 372.2kbits/s dup=417 drop=0
[h264 @ 0x3468e20] Reference 3 >= 2 582kB time=00:00:13.13 bitrate= 363.1kbits/s dup=426 drop=0
[h264 @ 0x3468e20] error while decoding MB 20 15, bytestream (4875)
[h264 @ 0x34d7840] Reference 2 >= 2
[h264 @ 0x34d7840] error while decoding MB 31 8, bytestream (841)
[h264 @ 0x3546280] Reference 2 >= 2
[h264 @ 0x3546280] error while decoding MB 32 5, bytestream (1615)
[h264 @ 0x3692140] Reference 2 >= 2
[h264 @ 0x3692140] error while decoding MB 8 6, bytestream (4871)
[h264 @ 0x3700b80] mmco: unref short failure

Last message repeated 1 times

[h264 @ 0x3700b80] number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one
[mpegts @ 0x29c6c40] PES packet size mismatch
[mp2 @ 0x29ebe80] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x3929ec0] Reference 2 >= 2
[h264 @ 0x3929ec0] error while decoding MB 33 17, bytestream (1707)
[h264 @ 0x3998900] Reference 2 >= 2
[h264 @ 0x3998900] error while decoding MB 15 24, bytestream (1586)
[h264 @ 0x3a07340] Reference 4 >= 2
[h264 @ 0x3a07340] error while decoding MB 2 14, bytestream (2219)
[mpegts @ 0x29c6c40] PES packet size mismatch
[mp2 @ 0x29ebe80] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x3a75d80] Reference 3 >= 2
[h264 @ 0x3a75d80] error while decoding MB 5 7, bytestream (2512)
[h264 @ 0x3423ca0] error while decoding MB 36 28, bytestream (-27)
[h264 @ 0x34d7840] Reference 3 >= 2
[h264 @ 0x34d7840] error while decoding MB 10 18, bytestream (342)
[h264 @ 0x35b4cc0] reference picture missing during reorder
[h264 @ 0x35b4cc0] Missing reference picture, default is 65996
[h264 @ 0x35b4cc0] Reference 3 >= 2
[h264 @ 0x35b4cc0] error while decoding MB 5 6, bytestream (5889)
[h264 @ 0x3623700] reference picture missing during reorder bitrate= 363.2kbits/s dup=439 drop=0
[h264 @ 0x3623700] Missing reference picture, default is 65997
[mpegts @ 0x29c6c40] PES packet size mismatch
[mp2 @ 0x29ebe80] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
[mp2 @ 0x29ebe80] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x38bb480] Found reference and non-reference fields in the same frame, which is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[h264 @ 0x38bb480] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the ffmpeg-devel mailing list.
[h264 @ 0x38bb480] decode_slice_header error
[h264 @ 0x3929ec0] reference picture missing during reorder
[h264 @ 0x3929ec0] Missing reference picture, default is 66085
[h264 @ 0x3546280] reference picture missing during reorder
[h264 @ 0x3546280] Missing reference picture, default is 66092
[h264 @ 0x3692140] Reference 2 >= 2
[h264 @ 0x3692140] error while decoding MB 38 15, bytestream (2771)
[h264 @ 0x3929ec0] mmco: unref short failureime=00:00:15.71 bitrate= 338.4kbits/s dup=494 drop=0
[h264 @ 0x3546280] left block unavailable for requested intra mode at 0 16kbits/s dup=521 drop=0
[h264 @ 0x3546280] error while decoding MB 0 16, bytestream (4465)
[h264 @ 0x3700b80] Reference 2 >= 2 690kB time=00:00:17.27 bitrate= 327.3kbits/s dup=533 drop=0
[h264 @ 0x3700b80] error while decoding MB 17 12, bytestream (2893)
[h264 @ 0x3546280] error while decoding MB 10 30, bytestream (-34)e= 324.9kbits/s dup=562 drop=0
[mpegts @ 0x29c6c40] PES packet size mismatchme=00:00:18.78 bitrate= 323.2kbits/s dup=575 drop=0
[mp2 @ 0x29ebe80] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x3546280] Reference 2 >= 2 803kB time=00:00:20.36 bitrate= 323.2kbits/s dup=617 drop=0
[h264 @ 0x3546280] error while decoding MB 36 24, bytestream (443)
[h264 @ 0x3546280] error while decoding MB 18 28, bytestream (-8)te= 322.2kbits/s dup=628 drop=0
[h264 @ 0x3a07340] Reference 11 >= 2 835kB time=00:00:21.43 bitrate= 319.2kbits/s dup=638 drop=0
[h264 @ 0x3a07340] error while decoding MB 35 21, bytestream (580)
[h264 @ 0x3423ca0] Reference 5 >= 2 878kB time=00:00:22.66 bitrate= 317.3kbits/s dup=675 drop=0
[h264 @ 0x3423ca0] error while decoding MB 40 13, bytestream (1917)
[h264 @ 0x35b4cc0] error while decoding MB 19 28, bytestream (-12)e= 319.2kbits/s dup=762 drop=0
[h264 @ 0x35b4cc0] Reference 4 >= 2 1090kB time=00:00:27.78 bitrate= 321.3kbits/s dup=804 drop=0
[h264 @ 0x35b4cc0] error while decoding MB 21 16, bytestream (997)
[h264 @ 0x3a75d80] Reference 2 >= 2 1108kB time=00:00:29.14 bitrate= 311.6kbits/s dup=824 drop=0
[h264 @ 0x3a75d80] error while decoding MB 41 15, bytestream (4439)
[h264 @ 0x3a07340] Reference 6 >= 2 1111kB time=00:00:29.69 bitrate= 306.6kbits/s dup=831 drop=0
[h264 @ 0x3a07340] error while decoding MB 22 8, bytestream (6338)
[mpegts @ 0x29c6c40] PES packet size mismatch
[mp2 @ 0x29ebe80] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x384ca40] error while decoding MB 38 26, bytestream (-9)te= 308.7kbits/s dup=855 drop=0
[h264 @ 0x38bb480] Reference 2 >= 2 1269kB time=00:00:31.18 bitrate= 333.4kbits/s dup=872 drop=0
[h264 @ 0x38bb480] error while decoding MB 11 21, bytestream (2945)
[h264 @ 0x3929ec0] Reference 2 >= 2 1409kB time=00:00:32.23 bitrate= 358.1kbits/s dup=899 drop=0
[h264 @ 0x3929ec0] error while decoding MB 1 24, bytestream (659)
[h264 @ 0x37de000] Found reference and non-reference fields in the same frame, which is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[h264 @ 0x37de000] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the ffmpeg-devel mailing list.
[h264 @ 0x37de000] decode_slice_header error
[h264 @ 0x384ca40] reference picture missing during reorder
[h264 @ 0x384ca40] Missing reference picture, default is 66949
[h264 @ 0x3468e20] reference picture missing during reorder
[h264 @ 0x3468e20] Missing reference picture, default is 66956
[h264 @ 0x37de000] left block unavailable for requested intra mode at 0 28kbits/s dup=929 drop=0
[h264 @ 0x37de000] error while decoding MB 0 28, bytestream (3857)
[h264 @ 0x384ca40] mmco: unref short failure
[h264 @ 0x384ca40] Reference 3 >= 2
[h264 @ 0x384ca40] error while decoding MB 24 7, bytestream (6260)
[h264 @ 0x38bb480] Reference 3 >= 2
[h264 @ 0x38bb480] error while decoding MB 38 16, bytestream (1520)
[h264 @ 0x37de000] left block unavailable for requested intra4x4 mode -1 at 0 28s dup=945 drop=0
[h264 @ 0x37de000] error while decoding MB 0 28, bytestream (1330)
[mpegts @ 0x29c6c40] PES packet size mismatch
[mp2 @ 0x29ebe80] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 0x3468e20] left block unavailable for requested intra4x4 mode -1 at 0 26s dup=964 drop=0
[h264 @ 0x3468e20] error while decoding MB 0 26, bytestream (4267)
[h264 @ 0x3700b80] error while decoding MB 33 30, bytestream (-10)e= 356.6kbits/s dup=971 drop=0
[h264 @ 0x384ca40] Reference 2 >= 2
[h264 @ 0x384ca40] error while decoding MB 4 15, bytestream (3351)
[h264 @ 0x3692140] Reference 3 >= 2
[h264 @ 0x3692140] error while decoding MB 34 27, bytestream (1275)
[h264 @ 0x34d7840] cabac decode of qscale diff failed at 3 17itrate= 354.4kbits/s dup=980 drop=0
[h264 @ 0x34d7840] error while decoding MB 3 17, bytestream (3715)
[h264 @ 0x3468e20] error while decoding MB 38 30, bytestream (-25)e= 359.6kbits/s dup=995 drop=0
[h264 @ 0x37de000] cabac decode of qscale diff failed at 20 28trate= 374.0kbits/s dup=1029 drop=0
[h264 @ 0x37de000] error while decoding MB 20 28, bytestream (4227)
[h264 @ 0x3468e20] Reference 3 >= 2
[h264 @ 0x3468e20] error while decoding MB 36 4, bytestream (8594)
[h264 @ 0x3998900] cabac decode of qscale diff failed at 29 20trate= 378.3kbits/s dup=1044 drop=0
[h264 @ 0x3998900] error while decoding MB 29 20, bytestream (625)
frame= 1950 fps= 52 q=-1.0 Lsize= 1806kB time=00:00:39.00 bitrate= 379.3kbits/s dup=1048 drop=0
video:1114kB audio:293kB subtitle:0 global headers:0kB muxing overhead 28.330540%
[libx264 @ 0x2a71aa0] frame I:32 Avg QP:24.47 size: 5445
[libx264 @ 0x2a71aa0] frame P:1918 Avg QP:23.38 size: 504
[libx264 @ 0x2a71aa0] mb I I16..4: 48.5% 0.0% 51.5%
[libx264 @ 0x2a71aa0] mb P I16..4: 1.6% 0.0% 2.2% P16..4: 9.0% 2.6% 1.1% 0.0% 0.0% skip:83.6%
[libx264 @ 0x2a71aa0] final ratefactor: 25.58
[libx264 @ 0x2a71aa0] coded y,uvDC,uvAC intra: 47.5% 59.3% 30.5% inter: 3.8% 4.2% 0.9%
[libx264 @ 0x2a71aa0] i16 v,h,dc,p: 28% 34% 11% 27%
[libx264 @ 0x2a71aa0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 27% 18% 5% 5% 6% 5% 4% 5%
[libx264 @ 0x2a71aa0] i8c dc,h,v,p: 56% 22% 14% 8%
[libx264 @ 0x2a71aa0] ref P L0: 82.2% 4.9% 12.8%
[libx264 @ 0x2a71aa0] kb/s:234.01
Received signal 2: terminating.

comment:4 by Carl Eugen Hoyos, 10 years ago

Resolution: needs_more_info
Status: newclosed

Please reopen this ticket if you can provide complete, uncut console output of a failing command.

If the problem is reproducible without external libraries (libx264 and libfdk_aac), please don't use them as external libraries make reproducing the issue more difficult.
Is network output needed to reproduce the problem? If not, please use file output.

comment:5 by sharbatgula, 10 years ago

Resolution: needs_more_info
Status: closedreopened

Hi again,

It took me a while to re-examine everything and in the meantime the ticket was closed. I'm reopening it. Although at the moment I cannot reproduce the mixing-up problem and I can't restart the server as it is in production, I nailed the problem to the handling of mpegts over RTP, which I can always reproduce now, with no involvement of external libraries and no transcoding at all, so it is purely source problem.

If I do the following:

ffplay rtp://@224.11.2.12:5530 or
ffmpeg -i rtp://@224.11.2.12:5530 -vcodec copy -acodec copy -f mpegts some_file.ts

the output is garbage and the output console is the following:
ffmpeg version 2.1.git Copyright (c) 2000-2014 the FFmpeg developers

built on Jan 30 2014 12:22:30 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --prefix=/home/vas/ffmpeg_build --extra-cflags=-I/home/vas/ffmpeg_build/include --extra-ldflags=-L/home/vas/ffmpeg_build/lib --bindir=/home/vas/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab --enable-libfreetype --enable-filter=drawtext
libavutil 52. 63.100 / 52. 63.100
libavcodec 55. 49.100 / 55. 49.100
libavformat 55. 26.100 / 55. 26.100
libavdevice 55. 5.102 / 55. 5.102
libavfilter 4. 1.101 / 4. 1.101
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100

RTP: dropping old packet received too late

Last message repeated 1 times

RTP: missed 941 packets
RTP: missed 2788 packets
RTP: dropping old packet received too late

Last message repeated 1 times

RTP: missed 3383 packets
RTP: missed 3139 packets
RTP: dropping old packet received too late

Last message repeated 1 times

RTP: missed 983 packets
RTP: dropping old packet received too late

Last message repeated 1 times

RTP: missed 3891 packets
RTP: missed 3451 packets
RTP: missed 2800 packets
RTP: dropping old packet received too late

Last message repeated 3 times

RTP: missed 1844 packets
RTP: dropping old packet received too late

Last message repeated 2 times

RTP: missed 4736 packets
RTP: PT=21: bad cseq f1d7 expected=df57
RTP: dropping old packet received too late
RTP: missed 4737 packets
RTP: dropping old packet received too late

Last message repeated 1 times

RTP: missed 1543 packets
RTP: dropping old packet received too late

Last message repeated 5 times

RTP: missed 436 packets
RTP: dropping old packet received too late

Last message repeated 3 times

RTP: missed -62145 packets
RTP: PT=21: bad cseq 06d9 expected=f99a
RTP: dropping old packet received too late

Last message repeated 8 times

RTP: missed -62145 packets
RTP: dropping old packet received too late

Last message repeated 2 times

RTP: missed 14067 packets
...
RTP: PT=21: bad cseq 0d00 expected=ffc1
RTP: dropping old packet received too late

Last message repeated 7 times

RTP: missed -62145 packets
[rtp @ 0x3aff900] decoding for stream 0 failed
[rtp @ 0x3aff900] decoding for stream 3 failed
[rtp @ 0x3aff900] decoding for stream 4 failed
[rtp @ 0x3aff900] decoding for stream 6 failed
[rtp @ 0x3aff900] decoding for stream 7 failed
[rtp @ 0x3aff900] decoding for stream 9 failed
[rtp @ 0x3aff900] decoding for stream 10 failed
[rtp @ 0x3aff900] decoding for stream 11 failed
[rtp @ 0x3aff900] decoding for stream 12 failed
[rtp @ 0x3aff900] decoding for stream 14 failed
[rtp @ 0x3aff900] decoding for stream 16 failed
[rtp @ 0x3aff900] decoding for stream 17 failed
[rtp @ 0x3aff900] decoding for stream 23 failed
[rtp @ 0x3aff900] decoding for stream 25 failed
[rtp @ 0x3aff900] decoding for stream 31 failed
[rtp @ 0x3aff900] Could not find codec parameters for stream 3 (Audio: mp1, 0 channels, s16p
): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[rtp @ 0x3aff900] Could not find codec parameters for stream 7 (Video: h264 ([27][0][0][0] /

0x001B)): unspecified size

Consider increasing the value for the 'analyzeduration' and 'probesize' options
[rtp @ 0x3aff900] Could not find codec parameters for stream 9 (Audio: mp3, 0 channels, s16p
): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[rtp @ 0x3aff900] Could not find codec parameters for stream 11 (Audio: aac, 54 channels (FL
+FR+FC+BL+BR), fltp, 345 kb/s): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[rtp @ 0x3aff900] Could not find codec parameters for stream 16 (Audio: mp1, 0 channels, s16
p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[rtp @ 0x3aff900] Could not find codec parameters for stream 17 (Video: h264 ([27][0][0][0]
/ 0x001B)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, rtp, from 'rtp://@239.2.2.12:5530':

Duration: N/A, start: 77443.201033, bitrate: 2649 kb/s
Program 1
Program 912
Program 1011
Program 1013
Program 612
Program 1313
Program 1314
Program 913
No Program

Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 50.08 tbr, 90k tbn, 50 tbc
Stream #0:1: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:2: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:3: Audio: mp1, 0 channels, s16p
Stream #0:4: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:5(mac): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 128 kb/s
Stream #0:6: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:7: Video: h264 ([27][0][0][0] / 0x001B), 50 tbr, 90k tbn
Stream #0:8(mac): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 128 kb/s
Stream #0:9: Audio: mp3, 0 channels, s16p
Stream #0:10: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:11: Audio: aac, 54 channels (FL+FR+FC+BL+BR), fltp, 345 kb/s
Stream #0:12: Video: h264 (Main), yuv420p(tv, bt470bg), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:13: Audio: mp2, 48000 Hz, stereo, s16p, 128 kb/s
Stream #0:14: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:15: Audio: mp2, 48000 Hz, stereo, s16p, 128 kb/s
Stream #0:16: Audio: mp1, 0 channels, s16p
Stream #0:17: Video: h264 ([27][0][0][0] / 0x001B), 50 tbr, 90k tbn
Stream #0:18(mac): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 128 kb/s
Stream #0:19: Unknown: none

Stream #0:20(mac): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 128 kb/s

Stream #0:21(mac): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, mono, s16p, 128 kb/s
Stream #0:22(mac): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 128 kb/s
Stream #0:23: Audio: mp2, 0 channels, s16p
Stream #0:24: Audio: mp2, 48000 Hz, stereo, s16p, 128 kb/s
Stream #0:25: Audio: mp1, 0 channels, s16p
Stream #0:26(alb): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 128 kb/s
Stream #0:27: Audio: mp2, 48000 Hz, stereo, s16p, 128 kb/s
Stream #0:28(mac): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, mono, s16p, 128 kb/s
Stream #0:29(mac): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 128 kb/s
Stream #0:30(mac): Audio: mp2, 48000 Hz, stereo, s16p, 128 kb/s
Stream #0:31: Video: h264 ([27][0][0][0] / 0x001B), 50 tbr, 90k tbn
Stream #0:32: Audio: mp2, 48000 Hz, stereo, s16p, 128 kb/s
Stream #0:33(mac): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, mono, s16p, 128 kb/s
Stream #0:34(mac): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 128 kb/s
Stream #0:35(mac): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, mono, s16p, 128 kb/s

[mpegts @ 0x3c65d40] sample rate not set
Output #0, mpegts, to 'udp://224.10.2.254:1234':

Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 720x576 [SAR 12:11 DAR 15:11], q=2-31, 25 fps, 90k tbn, 25 tbc
Stream #0:1: Audio: aac, 54 channels (FL+FR+FC+BL+BR), 345 kb/s

Stream mapping:

Stream #0:0 -> #0:0 (copy)
Stream #0:11 -> #0:1 (copy)

Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
(END)

My guess ffmpeg is detecting the source as RTP AV profile straming, not mpegts over RTP.
By specifying the input type more precisely, i.e.

ffmpeg -f mpegts -i rtp://@239.2.2.12:5530 -vcodec copy -acodec copy -f mpegts some_out.ts or
ffplay -f mpegts rtp://@239.2.2.12:5530

the picture and output file is stabilized but very often I have sporadical green patches with the following frequent console errors:
[h264 @ 0x1fc50e0] non-existing PPS referenced
[h264 @ 0x1fc50e0] non-existing PPS 0 referenced
[h264 @ 0x1fc50e0] decode_slice_header error
[h264 @ 0x1fc50e0] no frame!
[h264 @ 0x1fc50e0] mmco: unref short failure

Last message repeated 1 times

[h264 @ 0x1fc50e0] number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one
Input #0, mpegts, from 'rtp://@239.2.2.12:5530':

Duration: N/A, start: 26528.348167, bitrate: 128 kb/s
Program 1011

Stream #0:0[0x15eb]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg), 720x576 [SAR 12:11 DAR 15:11], 50 tbr, 90k tbn, 50 tbc
Stream #0:1[0x15ec](mac): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 128 kb/s

File 'test.ts' already exists. Overwrite ? [y/N] y
Output #0, mpegts, to 'test.ts':

Metadata:

encoder : Lavf55.26.100
Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 720x576 [SAR 12:11 DAR 15:11], q=2-31, 90k tbn, 25 tbc
Stream #0:1(mac): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, 128 kb/s

Stream mapping:

Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)

Press [q] to stop, ? for help
[mpegts @ 0x1fa0900] PES packet size mismatch
[mpegts @ 0x1fa0900] PES packet size mismatchme=00:00:13.39 bitrate=1444.1kbits/s
[mpegts @ 0x1fa0900] PES packet size mismatchme=00:00:14.33 bitrate=1612.9kbits/s
[mpegts @ 0x1fa0900] PES packet size mismatchme=00:00:16.95 bitrate=1891.6kbits/s
[mpegts @ 0x1fa0900] PES packet size mismatchme=00:00:20.41 bitrate=2063.1kbits/s
frame= 752 fps= 50 q=-1.0 size= 5448kB time=00:00:21.25 bitrate=2100.1kbits/s

Now, to nail the problem further, I decided to remove the RTP headers from the source by using eithr multicat or remuxing with VLC

multicat -U @239.2.2.12:5530 224.11.2.12:1234

When I finally invoke ffmpeg with the following:

ffmpeg -i udp://@224.11.2.12:1234 -vcodec copy -acodec copy -f mpegts test.ts

everything is fine.

I believe the problem is with the mpegts over RTP source.
You could reproduce the problem if you use mpegts over RTP as a source.

BR,
Sharbat

comment:6 by Carl Eugen Hoyos, 10 years ago

Version: unspecifiedgit-master

How can I reproduce the problem?
Is there a public IP address that I could use here?

comment:7 by sharbatgula, 10 years ago

How to reproduce?

In my previous post I explained the steps to reproduce it in my environment.

It would be very hard to do a relevant reproduction because it's a multicast streaming from my source. I could try to setup unicast feed if you give me your public address.

I published a raw recording of it on http://212.158.191.90/test.ts but when I tried to feed ffmpeg with that record, there was no problem. That proves that the problem is connected to the handling of RTP/UDP source, probably that particular source (Ericsson hw encoder). It's a null packet filled-in quasi CBR mpegts over RTP/UDP

Other thing that comes to my mind is to provide tcpdump for packet analysis. I'm open for proposals, probably best thing is to try to deliver to your address.

comment:8 by thovo, 9 years ago

If you use "-f mpegts -i rtp://...", the mpegts demuxer is used and the stream is processed as it would be plain mpegts data.

comment:9 by Oleg K., 9 years ago

This problem is also with me.

If you run one instance of ffmpeg - everything is fine.
If you run a second instance of ffmpeg to record another channel, the channel is recorded, which has already recorded the previous instance of ffmpeg.
If set -f mpegts, written want channel, but the output file is corrupt.

Checked for ffmpeg versions 1.2.11, 2.5.2 and N-68976-gd1c6b7v (from git) on "Scientific Linux 6.5" and ffmpeg 2.4.5 on "Fedora 21".

All of the above exist in ffplay.
In vlc no such effect.

In http://kochkin.tk/ffmpeg/ located ffmpeg reports and recorded videos.

"mplayer-stream.ts" - command mplayer rtp://@238.1.1.8:1234 -dumpstream -dumpfile mplayer-stream.ts

"ffmpeg-one.log" and "ffmpeg-one.ts" - recording in a single copy ffmpeg. All ok.

"ffmpeg-second.log" and "ffmpeg-second.ts" - the second record instances are already running at earlier instance of ffmpeg. Recorded the wrong channel, which is specified in the URL, but one that is already recording another copy.

"ffmpeg-second-mpegts.log" and "ffmpeg-second-mpegts.ts" - recording the second copy with the option -f mpegts. Channel right, the picture is crash.

Sorry my English...

Note: See TracTickets for help on using tickets.