SIGCONT causes fast-forwardffect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]<

 



Am 07.12.2008, 02:54 Uhr,chrieb Pete Nesbitt <pete at linux1.ca>:

> Hi,
> I have bash based cgi script set which uses mplayer in a while loop
>hat runs as a bg process. It passes values from a form based web
> page (viaOST). I use SIGSTOP & SIGCONT for pause and resume functions.
>
> When I click 'resume'nd the mplayer loop is un-paused, it seems to
> wanto fast forward to where it should be in time. So if you pause it
> for one minute,hen resume, it sounds like it is on fast forward for a
>econd or so, until it is where it would have been in the song had the
> process not been frozen. Thenverything plays normally.
>
> Here ishe relevant part of the code:
> pressing pauseuns:
>  kill -s SIGSTOP `/sbin/pidof mplayer` &> /dev/null
>
> pressingesume runs:
>  kill -s SIGCONT `/sbin/pidof mplayer` &> /dev/null
>
> (I haveried removing the stdout/err redirs as well)
>
> Here ishe mplayer loop. Note the bg call after 'done' putting the
>ntire loop in the background via a previous iteration of the
>cript (via a cgi call to 'play').
>
>  whileead TRACK
>   do
>     #nipped some 'now playing' status tracking etc
>
>    ${MPLAYER} -quiet ${TRACK} < /dev/null &> /dev/null
>
>     #nipped some 'now playing' status tracking etc
>   et TRACK_NUM=TRACK_NUM+1
>   done < ${PLAY_LIST} &> /dev/null &
>
> The player needso be in the background, so I don't think there is a
> wayo pass a keystroke to a process running in the bg of a different
>hell.
>
> I caneproduce it at the cli with this, which just replicates the cgi
>OST: (then run SIGSTOP etc from a diff shell (same user))
>
> QueryString="song=%2Fdata%2Fmedia%2Fmusic%2Falbums%2FGenesis%2FNursery_Cryme-72_1.flac%3C%2Ftd"
>xport QueryString
> ./cm_playing-cgi.sh
>
> However, notsing the cgi, it is fine, just SIGSTOP mplayer, then
> SIGCONT (diffhell) it works as expected. (note the line wraps!)
>
> mplayer /data/media/music/albums/Genesis/Nursery_Cryme-72_1.flac
> < /dev/null &> /dev/null &
>
>
> As wild guess I would say that mplayer is not aware it is paused
>t the process level (related to being in a bg'd while-loop??), so
> when it isesumed it tries to catch up to where the system clock or
>ome timer says it should be. I'm thinking I need to tell it not to
>ync to the real time, but just carry on.
>
> Doesnyone have any ideas what causes this and how I can prevent it?

Hiete,

haveou tried slave mode to tell mplayer nicely to pause playing instead  
of pullinghe emergency brake and releasing it again?

Greets,
Kiste

Frommidk75 at gmail.com  Sun Dec  7 09:54:30 2008
From:midk75 at gmail.com (Krzysztof Duchnowski)
Date: Sun, 07 Dec 2008 09:54:30 +0100
Subject: mencodero constant bitrate?
In-Reply-To: <493B1DFD.7040603@xxxxxxxxxxxxxxxxx>
References: <493B1DFD.7040603@xxxxxxxxxxxxxxxxx>
Message-ID: <493B8F46.8040800@xxxxxxxxx>

Carl Karsten pisze:

> qtinfo foo
>ate 29.970030 [30000:1001] not constant.
> 
> I needhis constant.
> 
> mencoder foo -o bar \
>  -ovc x264 -x264encopts qp=0 -ofps 30000/1001
> 
> qtinfo bar
>ate 29.970030 [30000:1001] not constant.
> 
>ried bunch of other things too.  time and space is not a problem, but even raw
> didn'teem to work.
> 
> # no good -ate 29.970030 [30000:1001] not constant
> # -ofps 30000/1001 nd all these:
> # -ovcaw
> # -ovc x264 -x264encopts qp=0
> # -ovc x264 -x264encopts qp=0:bitrate=3000
> # -ovcavc -lavcopts vcodec=ffvhuff
> # -ovcavc -lavcopts vcodec=ffv1
> # -ovcavc -lavcopts vcodec=huffyuv:format=422p
> 
> How do I get constant bitrate?


Im confused.
Doou try to achieve constant bitrate as title says or constant 
framerates your text says?

-- 
Krzysztof 'DK75' Duchnowski
GetFirefox - http://www.mozilla.com/firefox/
Konfiguracja UTF-8 dla czytnik?w - http://evil.pl/pip/utf/


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux