[FFmpeg-trac] #337(FFmpeg:new): FFmpeg's isaTTY check makes programatically parsing stderr impossible

FFmpeg trac at avcodec.org
Sat Jul 9 01:11:41 CEST 2011


#337: FFmpeg's isaTTY check makes programatically parsing stderr impossible
-------------------------+-------------------------------------------------
  Reporter:  tommedema   |      Owner:  michael
      Type:  defect      |     Status:  new
  Priority:  normal      |  Component:  FFmpeg
   Version:  git-master  |   Keywords:  console tty loglevel programming
Blocked By:              |  interaction debug progress
Reproduced:  1           |   Blocking:
                         |   Analyzed:  0
-------------------------+-------------------------------------------------
 '''What you were trying to accomplish (e.g., "I am trying to transcode
 from this format to that format...")'''
 I am programatically spawning FFmpeg, trying to parse "progress" info from
 stderr using the following regular expression:

     /size=[\b]*([0-9]+)kB/

 An example entry:

     52kB time=00:00:11.43 bitrate=  37.4kbits/s

 These entries are displayed just fine when I run ffmpeg in the console
 (TTY).

 '''The problem you encountered (e.g., "ffmpeg crashed" or "The output
 video was all green")'''

 When I spawn a ffmpeg process programatically, ffmpeg refuces to listen to
 the -loglevel command because it performs a is-a-tty check and seems to
 not provide as much debug information when it is not a TTY (which is the
 case when spawning programatically and piping stderr data to certain
 streams).

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/337>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list