Calling the program "date" on every line of output is likely to be too
slow. You need a wrapper in a language which has its own
gettimeofday(). I'm sure such wrappers already exist (I have even
written my own in Perl actually). Check this:
http://stackoverflow.com/q/21564/3974309
Thanks for your help! Yes, I believe is not the best to call date every
time, and in my case it doesn't work to because it get call only the
first time. I found now a solution with gawk:
ffmpeg [command] | tee >( awk '{ if ( $0 ~ /^\[mp/ || $0 ~ /^Error/ )
print "[" strftime("%F %T") "] " $0; else if ($0 !~ /^frame=/ ) print;
fflush() }' >> ffreport.log )
It works, but a native solution in ffmpeg would be nice to.
Regards
Jonathan
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".