From: SourceForge.net <no...@so...> - 2007-01-25 21:00:48
|
Bugs item #1642932, was opened at 2007-01-23 22:46 Message generated for change (Comment added) made by duncanwebb You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=446895&aid=1642932&group_id=46652 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: record server >Group: 1.x svn (rel-1) >Status: Pending Resolution: Fixed Priority: 5 Private: No Submitted By: HighKing (highking81) Assigned to: Nobody/Anonymous (nobody) Summary: No frequencies in mencoder command Initial Comment: The mencoder command spawn by Freevo for recording live tv, does not get any frequencies when using a non-standard chanlist. I've made a special chanlist called 'nl-multikabel' in freq.py, and this works well when watching TV, but not when trying to record it. When opening a station from the tv guide for watching tv, I see this in the main-500.log: ChildApp.__init__(), pid=3266, app= /usr/bin/mplayer -vo fbdev -ao alsa -fs -autosync 100 -nolirc -autoq 100 -screenw 800 -screenh 600 -fs -slave -nocache tv:// -tv driver=v4l2:freq= 208.000:device=/dev/video0 :input=0:norm=PAL:width=640:height=480:outfmt=yuy2 , poll=-1 1169584104.61: started tv app The recordserver seems to have it's own log, so I already had this in the recordserver-500.log : 2007/01/19 21:24 CET [*RecordServer*] popen /usr/bin/mencoder tv:// -tv driver=v4l:input=0:norm=pal:channel=25:chanlist=nl-multikabel:width=320:height=240:outfmt=yuy2:device=/dev/video0:adevice=/dev/dsp:audiorate=32000:forceaudio:forcechan=1:buffersize=64 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1200:keyint=30 -oac mp3lame -lameopts br=128:cbr:mode=3 -ffourcc divx -endpos 49 -o /home/michel/Video/Opnames/01-19_21:24_Handmatige_opname.avi As you can see, Freevo gives the option "freq=" to the mplayer command, but the mencoder command gets "channel=25:chanlist=nl-multikabel". Since the nl-multikabel chanlist only exists in Freevo (because I put it in myself), the mencoder program doesn't know what to do with it, and just uses the frequency the tuner was already set to. Note that the mencoder_cmd was not set in local_conf.py when i got this line in the log. ---------------------------------------------------------------------- >Comment By: Duncan Webb (duncanwebb) Date: 2007-01-25 22:00 Message: Logged In: YES user_id=104395 Originator: NO Thanks for the info, wasn't 100% sure about the float bit. ---------------------------------------------------------------------- Comment By: HighKing (highking81) Date: 2007-01-25 21:36 Message: Logged In: YES user_id=1650474 Originator: YES Cool! I've added the frequencyMHz line in generic_record.py, and changed the frequency setting in local_conf.py to frequencyMHz and it works! Did I already tell you, you rock? :D ---------------------------------------------------------------------- Comment By: Duncan Webb (duncanwebb) Date: 2007-01-25 21:03 Message: Logged In: YES user_id=104395 Originator: NO Added this, should work now. cl_options = { 'channel' : rec_prog.tunerid, 'frequency' : frequency, + 'frequencyMHz' : float(frequency) / 1000, 'filename' : rec_prog.filename, 'base_filename' : os.path.basename(rec_prog.filename), 'title' : rec_prog.title, So from python: >>> frequency=504000 >>> cl_options = { 'frequency' : frequency, 'frequencyMHz' : float(frequency) / 1000, } >>> ':freq=%(frequency)s' % cl_options ':freq=504000' >>> ':freq=%(frequencyMHz)s' % cl_options ':freq=504.0' >>> ---------------------------------------------------------------------- Comment By: HighKing (highking81) Date: 2007-01-25 20:11 Message: Logged In: YES user_id=1650474 Originator: YES Still does not work. Problem is, that with this set, Freevo runs the mencoder command with "freq=504000" as frequency, but it should be divided by 1000 first to make MHz's off of the frequency setting. I tried simply cutting and pasting the command from recordserver-500.log to the cli, and putting a dot in the middle of the frequency, and that works. How can I divide this frequency from the local_conf.py? Even though, I still think this should be done automagically, like the mplayer cmd. I think an application can stand or fall by the ease of configuration (just the thing that drove me away from MythTV). ---------------------------------------------------------------------- Comment By: Duncan Webb (duncanwebb) Date: 2007-01-25 19:07 Message: Logged In: YES user_id=104395 Originator: NO Sorry I thought that this was a but but it's not. The problem is with the VCR_CMD: In local_conf.py # VCR_CMD = (CONF.mencoder + ' ' + # 'tv:// ' + # New mplayer requires this. # '-tv driver=%s:input=%d' % (TV_DRIVER, TV_INPUT) + # ':norm=%s' % CONF.tv + # ':channel=%(channel)s' + # Filled in by Freevo # ':chanlist=%s' % CONF.chanlist + # ':width=%d:height=%d' % (TV_REC_SIZE[0], TV_REC_SIZE[1]) + # ':outfmt=%s' % TV_REC_OUTFMT + # ':device=%s' % TV_DEVICE + # VCR_AUDIO + # set above # ' -ovc lavc -lavcopts ' + # Mencoder lavcodec video codec # 'vcodec=mpeg4' + # lavcodec mpeg-4 # ':vbitrate=1200:' + # Change lower/higher, bitrate # 'keyint=30 ' + # Keyframe every 10 secs, change? # '-oac mp3lame -lameopts ' + # Use Lame for MP3 encoding, must be enabled in mencoder! # 'br=128:cbr:mode=3 ' + # MP3 const. bitrate, 128 kbit/s # '-ffourcc divx ' + # Force 'divx' ident, better compat. # '-endpos %(seconds)s ' + # only mencoder uses this so do it here. # '-o %(filename)s') # Filled in by Freevo Freevo will replace the following: 'channel' : rec_prog.tunerid, 'frequency' : frequency, 'filename' : rec_prog.filename, 'base_filename' : os.path.basename(rec_prog.filename), 'title' : rec_prog.title, 'sub-title' : rec_prog.sub_title, 'seconds' : rec_prog.rec_duration Change the channel line to: ':freq=%(frequency)s' + # Filled in by Freevo And remove this one. ':chanlist=%s' % CONF.chanlist + There may be other things that need changing. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=446895&aid=1642932&group_id=46652 |