#!/mod/bin/jimsh

package require cgi
source /mod/webif/lib/setup

httpheader

set file [cgi_get file]
set log ""
catch {set log [exec /mod/bin/ffprobe -hide_banner -v level $file]}
set log [lsearch -all -regexp -inline [split $log "\n"] "^\\\[info\\\]"]
if {[regsub -all -line -- "^\\\[info\\\]" [join $log "\n"] "" log]} {
	puts $log
} else {
	puts None
}
