Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: ffmpeg console progress bar

by jwkrahn (Monsignor)
on Feb 20, 2013 at 02:28 UTC ( #1019686=note: print w/replies, xml ) Need Help??

in reply to ffmpeg console progress bar

my $frametotal,$fwide,$fhigh;

You need to enclose the list of variables in parentheses or my will only work on $frametotal.

my ( $frametotal, $fwide, $fhigh );


That is usually written as:

push @vcmd, "-vf", "scale=min(1280\\,iw):-1";

if($a eq "progress") { my $pcent=$prog{"frame"}/$frametotal*100; my $hcent=int($pcent/2); my $bar="[".("#" x $hcent).(" " x (50-$hcent))." ] "; $bar .=sprintf("%.2f",$pcent)."% fps=".$prog{"fps"}; print "\r$bar"; }

I would probably write that as:

next if $x ne 'progress'; my $pcent = $prog{ frame } / $frametotal * 100; printf '%s[%-50s ] %.2f%% fps=%s', "\r", '#' x int( $pcent / 2 ), +$pcent, $prog{ fps };

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1019686]
[Corion]: marto: It somewhat makes sense that the reduced popup window doesn't get new URLs, but it makes less sense that no new browser window opens :)
[marto]: Corion, yeah, why no new browser window opens is currently beyond my understanding
[marto]: thanks
[Corion]: marto: Maybe it opens offscreen? I wouldn't know an easy way to confirm that, except maybe closing the chromeless window and then looking whether iexplore.exe is still running

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2018-03-21 11:51 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (267 votes). Check out past polls.