Opened 4 years ago

Closed 4 years ago

#1006 closed defect (worksforme)

FFmpeg hang read udp stream mpegts

Reported by: tronglt Owned by:
Priority: important Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Im using ffmpeg command
ffmpeg -f mpegts -i "udp://@233.19.204.43:5501" -vcodec copy -acodec copy -f mpegts -y a.ts but ffmpeg hang at 04 minutes 20-30s.

ffmpeg version N-37987-gc9ac082 Copyright (c) 2000-2012 the FFmpeg developers
  built on Feb 19 2012 11:40:00 with gcc 4.6.1
  configuration: --prefix=/usr/local/ffmpeg --enable-libx264 --enable-libxvid --enable-librtmp --enable-libmp3lame --enable-libfaac --enable-static --disable-shared --enable-libopenjpeg --enable-libvorbis --enable-libtheora --enable-gpl --enable-nonfree
  libavutil      51. 39.100 / 51. 39.100
  libavcodec     54.  3.100 / 54.  3.100
  libavformat    54.  1.100 / 54.  1.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 62.101 /  2. 62.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100
[mpegts @ 0x955db00] Unable to seek back to the start
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] non-existing PPS referenced
[h264 @ 0x957fb40] non-existing PPS 0 referenced
[h264 @ 0x957fb40] decode_slice_header error
[h264 @ 0x957fb40] no frame!
[h264 @ 0x957fb40] mmco: unref short failure
    Last message repeated 3 times
[h264 @ 0x957fb40] Increasing reorder buffer to 1
[h264 @ 0x957fb40] Increasing reorder buffer to 2
[h264 @ 0x957fb40] mmco: unref short failure
    Last message repeated 1 times
[mpegts @ 0x955db00] max_analyze_duration 5000000 reached at 5016000
[mpegts @ 0x955db00] Estimating duration from bitrate, this may be inaccurate
Input #0, mpegts, from 'udp://@233.19.204.43:5501':
  Duration: N/A, start: 75721.177256, bitrate: 192 kb/s
  Program 1 
    Stream #0:0[0x101]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 720x576 [SAR 12:11 DAR 15:11], 54.32 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x102]: Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16, 192 kb/s
[mpegts @ 0x95d2e40] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'a.ts':
  Metadata:
    encoder         : Lavf54.1.100
    Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 720x576 [SAR 12:11 DAR 15:11], q=2-31, 54.32 fps, 90k tbn, 25 tbc
    Stream #0:1: Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=13375 fps= 51 q=-1.0 size=   92271kB time=00:04:27.76 bitrate=2822.9kbits/s    

gdb:

(gdb) bt full
#0  0x7775f424 in __kernel_vsyscall ()
No symbol table info available.
#1  0x7706da5c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i386-linux-gnu/libpthread.so.0
No symbol table info available.
#2  0x0819c09c in udp_read (h=0x955e000, 
    buf=0x956e260 "G\001\001\026C\f\215\340\214\364\264Pqi$}Q\341\033\373\273\264\021\263\200\221\273SI\357Ú\372btM\323/\216\233E\374\236.\r!\276\335B\352UJ\355\353\343\325\303\347r\266%\004\276%\367R]\256\301(\250\275@6\267pb\362yJ\255ڥ\"W.<\340\377\222M0gf\rv(\247", size=1472)
    at libavformat/udp.c:600
        s = 0x955e060
        ret = <optimized out>
        avail = <optimized out>
#3  0x08104913 in retry_transfer_wrapper (transfer_func=0x819c030 <udp_read>, size_min=1, size=1472, 
    buf=0x956e260 "G\001\001\026C\f\215\340\214\364\264Pqi$}Q\341\033\373\273\264\021\263\200\221\273SI\357Ú\372btM\323/\216\233E\374\236.\r!\276\335B\352UJ\355\353\343\325\303\347r\266%\004\276%\367R]\256\301(\250\275@6\267pb\362yJ\255ڥ\"W.<\340\377\222M0gf\rv(\247", h=0x955e000)
    at libavformat/avio.c:261
        ret = <optimized out>
        len = <optimized out>
        fast_retries = <optimized out>
#4  ffurl_read (h=0x955e000, 
    buf=0x956e260 "G\001\001\026C\f\215\340\214\364\264Pqi$}Q\341\033\373\273\264\021\263\200\221\273SI\357Ú\372btM\323/\216\233E\374\236.\r!\276\335B\352UJ\355\353\343\325\303\347r\266%\004\276%\367R]\256\301(\250\275@6\267pb\362yJ\255ڥ\"W.<\340\377\222M0gf\rv(\247", size=1472)
    at libavformat/avio.c:287
No locals.
#5  0x081051ca in fill_buffer (s=0x956e860) at libavformat/aviobuf.c:401
        dst = <optimized out>
        len = <optimized out>
        max_buffer_size = <optimized out>
#6  0x08106693 in avio_read (s=0x956e860, 
    buf=0x7f8efd50 "G\037\377\020\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377", size=188) at libavformat/aviobuf.c:479
        len = <optimized out>
---Type <return> to continue, or q <return> to quit---
        size1 = 188
#7  0x0815504c in read_packet (s=0x955db00, buf=<optimized out>, raw_packet_size=188) at libavformat/mpegts.c:1792
        pb = 0x956e860
        skip = <optimized out>
        len = <optimized out>
#8  0x08156155 in handle_packets (ts=0x956e8e0, nb_packets=0) at libavformat/mpegts.c:1848
        s = 0x955db00
        packet = "G\037\377\020\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
        packet_num = 47
        ret = 0
#9  0x081561ea in mpegts_read_packet (s=0x955db00, pkt=0x7f8eff0c) at libavformat/mpegts.c:2068
        ts = 0x956e8e0
        ret = <optimized out>
        i = <optimized out>
#10 0x081a2c73 in av_read_packet (s=0x955db00, pkt=0x7f8eff0c) at libavformat/utils.c:660
        pktl = <optimized out>
        ret = <optimized out>
        i = <optimized out>
        st = <optimized out>
#11 0x081a3c14 in read_frame_internal (s=0x955db00, pkt=0x7f8f026c) at libavformat/utils.c:1134
        cur_pkt = {pts = -9223372036854775808, dts = -9223372036854775808, data = 0x7f8f15e8 "", size = -320471121, stream_index = 0, flags = 0, 
          side_data = 0x0, side_data_elems = 0, duration = 0, destruct = 0, priv = 0x0, pos = -1, convergence_duration = 0}
        st = <optimized out>
        len = <optimized out>
        ret = <optimized out>
        i = <optimized out>
        __PRETTY_FUNCTION__ = "read_frame_internal"
#12 0x0808c59b in transcode (nb_input_files=1, input_files=0x95c7678, nb_output_files=1, output_files=0x9578a08) at ffmpeg.c:2983
        ist_index = <optimized out>
        pkt = {pts = -9223372036854775808, dts = -9223372036854775808, data = 0x0, size = 0, stream_index = 0, flags = 0, side_data = 0x0, 
---Type <return> to continue, or q <return> to quit---
          side_data_elems = 0, duration = 0, destruct = 0, priv = 0x277dc9a, pos = -1, convergence_duration = 0}
        cur_time = <optimized out>
        file_index = 0
        ipts_min = 156621568
        opts_min = 267.96000000000004
        timer_start = 1329626802292139
        key = <optimized out>
        ret = <optimized out>
        is = 0x955db00
        os = <optimized out>
        ost = <optimized out>
        ist = <optimized out>
        no_packet = 0x95e13a0 ""
        i = <optimized out>
        no_packet_count = 0
#13 main (argc=15, argv=<optimized out>) at ffmpeg.c:5146
        o = {start_time = 0, format = 0x0, codec_names = 0x0, nb_codec_names = 0, audio_channels = 0x0, nb_audio_channels = 0, 
          audio_sample_rate = 0x0, nb_audio_sample_rate = 0, rematrix_volume = 0x0, nb_rematrix_volume = 0, frame_rates = 0x0, nb_frame_rates = 0, 
          frame_sizes = 0x0, nb_frame_sizes = 0, frame_pix_fmts = 0x0, nb_frame_pix_fmts = 0, input_ts_offset = 0, rate_emu = 0, ts_scale = 0x0, 
          nb_ts_scale = 0, dump_attachment = 0x0, nb_dump_attachment = 0, stream_maps = 0x0, nb_stream_maps = 0, audio_channel_maps = 0x0, 
          nb_audio_channel_maps = 0, meta_data_maps = 0x0, nb_meta_data_maps = 0, metadata_global_manual = 0, metadata_streams_manual = 0, 
          metadata_chapters_manual = 0, attachments = 0x0, nb_attachments = 0, chapters_input_file = 2147483647, 
          recording_time = 9223372036854775807, limit_filesize = 18446744073709551615, mux_preload = 0, mux_max_delay = 0.699999988, 
          video_disable = 0, audio_disable = 0, subtitle_disable = 0, data_disable = 0, streamid_map = 0x0, nb_streamid_map = 0, metadata = 0x0, 
          nb_metadata = 0, max_frames = 0x0, nb_max_frames = 0, bitstream_filters = 0x0, nb_bitstream_filters = 0, codec_tags = 0x0, 
          nb_codec_tags = 0, sample_fmts = 0x0, nb_sample_fmts = 0, qscale = 0x0, nb_qscale = 0, forced_key_frames = 0x0, 
          nb_forced_key_frames = 0, force_fps = 0x0, nb_force_fps = 0, frame_aspect_ratios = 0x0, nb_frame_aspect_ratios = 0, rc_overrides = 0x0, 
          nb_rc_overrides = 0, intra_matrices = 0x0, nb_intra_matrices = 0, inter_matrices = 0x0, nb_inter_matrices = 0, top_field_first = 0x0, 
          nb_top_field_first = 0, metadata_map = 0x0, nb_metadata_map = 0, presets = 0x0, nb_presets = 0, copy_initial_nonkeyframes = 0x0, 
          nb_copy_initial_nonkeyframes = 0, filters = 0x0, nb_filters = 0}

Change History (1)

comment:1 Changed 4 years ago by michael

  • Resolution set to worksforme
  • Status changed from new to closed

I cant reproduce this, also there have been several changes and fixes to the udp code so this probably has been fixed.
if the problem still happens then please reopen the ticket and provide enough information so we can reproduce the issue

Note: See TracTickets for help on using tickets.