Opened 5 years ago

Last modified 5 years ago

#4775 new defect

FFmpeg RTP network issue in Ubuntu

Reported by: ikolesnikov Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: rtp
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


I want to copy a bunch of SD sources from mpegts transported with RTP on local files. (VBR mpeg2video, mp2 audio). It works fine for one multicast source with the following command:

ffmpeg -i rtp://@IP1:PORT?sources=SourceIP1 -c copy video1.mpg

but when I run a second ffmpeg instance with the following command:

ffmpeg -i rtp://@IP2:PORT?sources=SourceIP2 -c copy video2.mpg

then I start to get errors from both FFmpeg instances ("RTP: dropping old packet received too late") and in both files (video1.mpg and video2.mpg) start recording video from the second source (rtp://@IP2:PORT).

This issue occurs only in Linux (Ubuntu 15.04). I have no problems in Windows and when I try the same actions from files to files. Under Ubuntu even two ffplay instances tuned to different sources play back the same content (from the source which was opened last). I tried playing back with VLC and there is no such problem.

I can resolve this issue when using FFmpeg with the -f option:
ffmpeg -f mpegts -i rtp://@IP1:PORT?sources=SourceIP1 -c copy video1.mpg
ffmpeg -f mpegts -i rtp://@IP2:PORT?sources=SourceIP2 -c copy video2.mpg, but then I'm getting the following errors: "[mpegts @ 0x306e240] PES packet size mismatch" and receive both files (video1.mpg and video2.mpg) with artifacts and freeze effects. This issue appears for both operating systems.

How can I record videos from multiple RTP streams simultaneously under Ubuntu without errors and artifacts?

ffmpeg version 2.7.1 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
configuration: --prefix=/home/ivan/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/ivan/ffmpeg_build/include --extra-ldflags=-L/home/ivan/ffmpeg_build/lib --bindir=/home/ivan/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
libavutil 54. 27.100 / 54. 27.100
libavcodec 56. 41.100 / 56. 41.100
libavformat 56. 36.100 / 56. 36.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.101 / 5. 16.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.100 / 1. 2.100
libpostproc 53. 3.100 / 53. 3.100

Change History (1)

comment:1 Changed 5 years ago by cehoyos

  • Component changed from ffmpeg to undetermined
  • Keywords ffmpeg network ubuntu removed

Please test current FFmpeg git head and please post the command line that allows to reproduce the issue together with the complete, uncut console output to make this a valid ticket.

Note: See TracTickets for help on using tickets.