Append text to ffmpeg/avconv command line output to a text file

431 views Asked by At

I'm using follow command to add a watermark image and also convert a video file, then for monitoring the convert process, I check the output text file.

avconv -i input.mp4 -vf "movie=watermark.png [watermark]; [in][watermark] overlay=10:10 [out]" -acodec copy -y output.swf 1> proccess_status.txt 2>&1

Here is a part of proccess_status.txt:

avconv version 11.9-6:11.9-1~deb8u1, Copyright (c) 2000-2017 the Libav developers
  built on Apr 23 2017 21:47:31 with gcc 4.9.2 (Debian 4.9.2-10)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/srv/site.com/public/htdocs/videos/8_e7d16e42ec66dc66fa.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp41isom

...
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
Press ctrl-c to stop encoding
frame=   46 fps=  0 q=0.0 size=       0kB time=1.58 bitrate=   0.2kbits/s    
frame=   57 fps= 53 q=29.0 size=      27kB time=0.13 bitrate=1633.1kbits/s    
frame=   69 fps= 44 q=29.0 size=      72kB time=0.53 bitrate=1108.8kbits/s    
frame=   82 fps= 39 q=29.0 size=     110kB time=0.97 bitrate= 931.8kbits/s    
...
[libx264 @ 0x15475e0] Weighted P-Frames: Y:10.1% UV:8.0%
[libx264 @ 0x15475e0] ref P L0: 72.3%  9.6% 13.3%  4.7%  0.0%
[libx264 @ 0x15475e0] ref B L0: 83.1% 14.7%  2.1%
[libx264 @ 0x15475e0] ref B L1: 93.3%  6.7%
[libx264 @ 0x15475e0] kb/s:861.12

I want to know how could I add an additional text to the beginning of output text file, or is that possible to append output of ffmpeg command line to an existing file?

0

There are 0 answers