New submission from aviad rozenhek <[email protected]>:

when reading MPEG-TS over UDP, the stream often does not begin with a 
keyframe. it can therefore take some time until video information such 
as resolution and pixel format is discovered.

I noticed that some times video resolution detection fails completely 
and thus the video cannot be decoded. I have found a way to reproduce it 
every time, by using a very large GOP.

# start ffmpeg encoder
> ffmpeg -i <file> -b 20000k -f mpegts -keyint_min 500 -g 1000 
udp://localhost:1234

# start ffplay to read the same stream
> ffplay -loglevel debug udp://localhost?localport=1234
FFplay version SVN-r26095, Copyright (c) 2003-2010 the FFmpeg developers
  built on Dec 26 2010 04:15:49 with gcc 4.4.2
  configuration: --enable-gpl --enable-version3 --enable-libgsm --
enable-libvorb
is --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-
libopenjpeg
 --enable-libschroedinger --enable-libopencore_amrwb --enable-
libopencore_amrnb
--enable-libvpx --disable-decoder=libvpx --arch=x86 --enable-runtime-
cpudetect -
-enable-libxvid --enable-libx264 --enable-librtmp --extra-libs='-lrtmp -
lpolarss
l -lws2_32 -lwinmm' --target-os=mingw32 --enable-avisynth --enable-
w32threads --
cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-
memalign-hack
 --enable-shared --disable-static
  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 0 /  0.16. 0
  libavcodec    52.100. 0 / 52.100. 0
  libavformat   52.89. 0 / 52.89. 0
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter    1.70. 0 /  1.70. 0
  libswscale     0.12. 0 /  0.12. 0
[NULL @ 0078bd80] Probed with size=2048 and score=100
[mpegts @ 0078bd80] Unable to seek back to the start
[mpegts @ 0078bd80] stream=0 stream_type=2 pid=100 prog_reg_desc=
[mpegts @ 0078bd80] stream=1 stream_type=3 pid=101 prog_reg_desc=
[mp3 @ 0078cd20] Header missing
[mpeg2video @ 0078ed30] mpeg_decode_postinit() failure
    Last message repeated 57 times
[mpegts @ 0078bd80] max_analyze_duration reached
[mpegts @ 0078bd80] Estimating duration from bitrate, this may be 
inaccurate
Input #0, mpegts, from 'udp://localhost?localport=1234':
  Duration: N/A, start: 6.120000, bitrate: 64 kb/s
  Program 1 Service01
    Metadata:
      name            : Service01
      provider_name   : FFmpeg
    Stream #0.0[0x100], 67, 1/90000: Video: mpeg2video, 25 tbr, 90k tbn, 
90k tbc

    Stream #0.1[0x101](eng), 211, 1/90000: Audio: mp2, 48000 Hz, 2 
channels, s16
, 64 kb/s
[ffsink @ 01efa280] auto-inserting filter 'auto-inserted scaler 0' 
between the f
ilter 'src' and the filter 'out'
Impossible to convert between the formats supported by the filter 'src' 
and the
filter 'auto-inserted scaler 0'
[mp2 @ 0078cd20] Header missing
1357.46 A-V:-1294162282.047 s:0.0 aq=  329KB vq= 5747KB sq=    0B f=0/0
    Last message repeated 138 times

notice how resolution and pixel format information is missing and the 
problem of building the video scaling filter.

the same command line but going through a file works, because the file 
does start with a key frame.

----------
messages: 13203
priority: normal
status: new
substatus: new
title: MPEG-TS video not recognized with large GOP
topic: avcodec, avformat, ffmpeg, ffplay
type: bug

________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/issue2486>
________________________________________________

Reply via email to