Opened 5 years ago

Last modified 5 years ago

#5396 open defect

ffmpeg don`t close program if -t or -to used with -map 0

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


-map 0 (save all streams) option used with -t or -to causes that program don`t quit himself after reached time given in -t param.
If i don`t using -map 0, everithing is ok - ffmpeg quit.

Change -t for use on input (before -t) doesn`t change anything.

How to reproduce:

% /usr/bin/ffmpeg -i udp://@ -map 0 -codec copy -to 60 -f mpegts /home/xyz.ts

ffmpeg version 3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8.2 (GCC)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --docdir=/usr/doc/ffmpeg-3.0.1/html --mandir=/usr/man --disable-debug --enable-shared --disable-static --enable-pthreads --enable-libtheora --enable-libvorbis --enable-gpl --enable-version3 --enable-libx264 --enable-postproc --enable-swscale --disable-x11grab --enable-avfilter --enable-gnutls --enable-libcdio --enable-libssh --arch=x86_64 --enable-libmp3lame --enable-libx264
  libavutil      55. 17.103 / 55. 17.103
  libavcodec     57. 24.102 / 57. 24.102
  libavformat    57. 25.100 / 57. 25.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 31.100 /  6. 31.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100

Attachments (1)

test.log (234.6 KB) - added by szmeny 5 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 5 years ago by cehoyos

  • Keywords time map quit removed
  • Priority changed from important to normal

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

Changed 5 years ago by szmeny

comment:2 Changed 5 years ago by szmeny

Above i`ve attached log for below command:

ffmpeg -v 9 -loglevel 99 -i udp://@ -map 0 -codec copy -to 15 -f mpegts /root/test.ts >> /root/test.txt 2>&1

After update ffmpeg to latest from GIT, program sometimes stop recording and quit, but as most cases he still leave launched program (and analyze something - as indicated by attached logs) after stop recording with time duration given in -t/-to option.

'-t' option gice same results such as '-to'

Version 0, edited 5 years ago by szmeny (next)

comment:3 Changed 5 years ago by cehoyos

  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

The issue is reproducible if the (network) input transport stream contains subtitles, but only if the subtitle stream does not actually contain any frames. Not a regression afaict.
Also reproducible (without -t) on eof: In this case ffmpeg also waits forever.

I used to test the working (and the eof) case.

comment:4 Changed 5 years ago by szmeny

Any chance for fast Patch?

Thanks in advance!

comment:5 Changed 5 years ago by szmeny

Maybe aby update in that case?

Note: See TracTickets for help on using tickets.