my biggest gripe with mythtv is that the transcoded files are NUV and can't be played on the standalone. nuvexport solves it but leaves the "update DB" out, so either I have huge untranscoded shows under "watch recordings" or I have huge set of nuvexported files which I need the mythvideo to play (and mythvideo is buggy as hell) in mythtv. All this aggravation just because mythtv transcode wants NUV and doesn't give the choice of standard xvid AVI which every standalone divx player can play.pteppic wrote:1. not a problem, its on the list after a few other tweaks.
Is x264 hungry then? It's the same speed as everything else here (within reason)
2. maybe someday, but I'm not too keen to screw up any databases yet (especially mine), but still possible. I'm thinking of caching data in there anyhow, if I can, to speed up the startup time for reading file info, but it would be in it's own table, so a lot safer as long as I don't run drop or anything stupid.
3. can you list some more standard places pls ~/.mythtv/mysql.txt is the only one I know of, sorry
As for PyQT, well you have qt for myth so it's a good start, it provides it's own threading support (which I think I need for multiple windows later) and the mysql libraries. But mainly because it's so quick and simple to use with eric3
It's changed a bit over the last 2 days, it's rev 50 now, and it actually uses the pass logs on the final pass now too(Doh)
I'm gonna put the version and rev in the topic title form time to time, so it's easier to track.
Code: Select all
my @mysql = ('/usr/local/share/mythtv/mysql.txt',
'/usr/share/mythtv/mysql.txt',
'/etc/mythtv/mysql.txt',
'/usr/local/etc/mythtv/mysql.txt',
$ENV{'MYTHCONFDIR'} ? "$ENV{'MYTHCONFDIR'}/mysql.txt" : '',
"$ENV{'HOME'}/.mythtv/mysql.txt",
'mysql.txt'
);
Code: Select all
mysql> select basename from recorded;
+------------------------------------------------------+
| basename |
+------------------------------------------------------+
| America's_Funniest_Home_Videos_2007-01-07_2-00PM.mpg |
+------------------------------------------------------+
1 row in set (0.00 sec)
mysql>And that works for avi's does it? I mean, the internal player will play avi files?devsk wrote:Code: Select all
mysql> select basename from recorded; +------------------------------------------------------+ | basename | +------------------------------------------------------+ | America's_Funniest_Home_Videos_2007-01-07_2-00PM.mpg | +------------------------------------------------------+ 1 row in set (0.00 sec) mysql>
devsk wrote:Now, only thing left is the database update.
Code: Select all
echo "update recorded set basename="${infile%.*}.avi" where basename="${infile}" limit 1;"|mysql -h blah -pblah -u blah mythconvergeAfter I replaced the original mpg file with the nuvexported xvid AVI and updated the database's basename, it seems to play it fine but because its mapping Up/Down, Left/Right arrows internally, its currently confused with the seeking. its probably because I didn't do the recordedmarkup thing you mentioned.pteppic wrote:And that works for avi's does it? I mean, the internal player will play avi files?
great! that's one down, one to go! Thanks.pteppic wrote:Any how, xvid is done.
x264 is really awesome! Its quality/size ratio is the highest so far but unless I truly have a centralized media PC (or they come out with standalones which decode x264), its restricted to PC only viewing.pteppic wrote: It's odd, xvid via ffmpeg is fast, xvid via mencoder seems slower, but x264 mencoder is faster than either by a long way, especially on pass 1, the files are tiny too (90 minutes at qpal in about 500 meg, and thats with 2ch ac3 384k audio dumped straight from dvd)
x264 is slow on the p4 machine (it's a busy box, pun unintended), but like I say, it flies on amd64
ffmpeg has improved a lot. its not only faster than transcode, it also produced better quality result comparatively. see this post I made to mythtv-users list:pteppic wrote:It's odd, xvid via ffmpeg is fast, xvid via mencoder seems slower, but x264 mencoder is faster than either by a long way
Good, I'm gonna play around with this a bit, and see what can be done to make it seek again (maybe mythcommflag --rebuild??), I don't wanna put out a half baked solution for this.devsk wrote:After I replaced the original mpg file with the nuvexported xvid AVI and updated the database's basename, it seems to play it fine but because its mapping Up/Down, Left/Right arrows internally, its currently confused with the seeking. its probably because I didn't do the recordedmarkup thing you mentioned.pteppic wrote:And that works for avi's does it? I mean, the internal player will play avi files?
ffmpeg produced the most compatible avi for standalone playing. with transcode, I couldn't fast fwd at speeds greater than 2x, audio video went out of sync if I did fast fwd even at 2x, previous/next (forward by 5 minutes I guess) on the remote hung the playback completely. So, I gave up on transcode and stuck with ffmpeg.pteppic wrote:I'd like to know what encoder you use with nuvexport for xvid (I'd assume ffmpeg), 'cos I want to see if there are any compatability type things going on (like divx{3,4,5} compatible etc)
Code: Select all
[mpeg4 @ 0x3151acbf70]warning: first frame is no keyframeHmm, may be able to sort that out, perhaps by sticking some keyframes in...devsk wrote:I could seek successfully in the mythtv watch recording but I kept gettingCode: Select all
[mpeg4 @ 0x3151acbf70]warning: first frame is no keyframe
Code: Select all
Fatal Error
The file mysql.txt could not be read properly
"LocalHostName" setting not found
Program will now exitCode: Select all
QSqlQuery::exec: database not open
QSqlQuery::value: not positioned on a valid record
QSqlQuery::exec: database not open
Code: Select all
Traceback (most recent call last):
File "myth2avi.py", line 533, in reject
if self.thread.running():
AttributeError: 'NoneType' object has no attribute 'running'Code: Select all
python myth2avi.py -d3Code: Select all
q=QSqlQuery( 'select data from settings where value="RecordFilePrefix";')Code: Select all
if not db.open():
print "Error opening database"
print db.lastError().driverText()
print db.lastError().databaseText()
sys.exit(1)Code: Select all
Access denied for user 'bmerrill'@'192.168.0.3' (using password: YES)Code: Select all
db.setUserName(self.DBUserName)Code: Select all
Traceback (most recent call last):
File "myth2avi.py", line 785, in ?
f = subGUI()
File "myth2avi.py", line 85, in __init__
self.item = QCheckListItem(self.item_2,None,QCheckListItem.CheckBox)
TypeError: argument 3 of QCheckListItem() has an invalid typeCode: Select all
Traceback (most recent call last):
File "myth2avi.py", line 203, in setupOptions
self.bitrate.setText(None)#self.__tr('0'))
TypeError: argument 1 of QLineEdit.setText() has an invalid typeCode: Select all
Mythtranscode= /usr/bin/mythtranscode -f /tmp/29308 -l -c 1021 -s 20061212185900 -v none
Traceback (most recent call last):
File "myth2avi.py", line 595, in run
self.export(obj)
File "myth2avi.py", line 676, in export
self.kill()
File "myth2avi.py", line 762, in kill
self.base.reap(self.enprocess.pid)
AttributeError: enprocessCode: Select all
Fatal Error
The file mysql.txt could not be read properly
"LocalHostName" setting not found
Program will now exitCode: Select all
q=QSqlQuery( 'select data from settings where value="RecordFilePrefix";')Code: Select all
QSqlQuery::exec: database not open
QSqlQuery::value: not positioned on a valid record
QSqlQuery::exec: database not open
Code: Select all
db.setUserName(self.DBUserName)EDIT:FIXEDdb=QSqlDatabase('QMYSQL3',self.DBName)
db.setPassword(self.DBPassword)
db.setDatabaseName(self.DBName)
db.setHostName(self.DBHostName)
db.setPassword(self.DBPassword) << should be db.setUserName(self.DBUserName)
Code: Select all
Traceback (most recent call last):
File "myth2avi.py", line 533, in reject
if self.thread.running():
AttributeError: 'NoneType' object has no attribute 'running'Code: Select all
Traceback (most recent call last):
File "myth2avi.py", line 785, in ?
f = subGUI()
File "myth2avi.py", line 85, in __init__
self.item = QCheckListItem(self.item_2,None,QCheckListItem.CheckBox)
TypeError: argument 3 of QCheckListItem() has an invalid typeCode: Select all
Traceback (most recent call last):
File "myth2avi.py", line 203, in setupOptions
self.bitrate.setText(None)#self.__tr('0'))
TypeError: argument 1 of QLineEdit.setText() has an invalid typeEDIT:FIXEDSelecting Xvid, I can get somewhere, I click Queue Job and off I go. For a few seconds anyway until I getCode: Select all
Mythtranscode= /usr/bin/mythtranscode -f /tmp/29308 -l -c 1021 -s 20061212185900 -v none Traceback (most recent call last): File "myth2avi.py", line 595, in run self.export(obj) File "myth2avi.py", line 676, in export self.kill() File "myth2avi.py", line 762, in kill self.base.reap(self.enprocess.pid) AttributeError: enprocess
Code: Select all
/usr/bin/mythtranscode -f /tmp/ -l -c 1021 -s 20061212185900Code: Select all
Traceback (most recent call last):
File "myth2avi.py", line 886, in ?
f = subGUI()
File "myth2avi.py", line 62, in __init__
self.programs=self.getPrograms()
File "myth2avi.py", line 277, in getPrograms
self.getBaseDir()
File "myth2avi.py", line 264, in getBaseDir
q=QSqlQuery( 'select data from settings where value="RecordFilePrefix" limit 1;' %self.LocalHostName, db )
TypeError: not all arguments converted during string formatting
Code: Select all
--- myth2avi.py 2007-01-30 01:21:51.000000000 -0700
+++ myth2avi.py.edit 2007-01-30 01:22:57.000000000 -0700
@@ -253,18 +253,22 @@
def getBaseDir(self):#get storage dir from mythconverg
db=QSqlDatabase('QMYSQL3',self.DBName)
+ db.setUserName(self.DBUserName)
db.setPassword(self.DBPassword)
db.setDatabaseName(self.DBName)
db.setHostName(self.DBHostName)
- db.setPassword(self.DBPassword)
- db.open()
+ if not db.open():
+ print "Error opening database"
+ print db.lastError().driverText()
+ print db.lastError().databaseText()
+ sys.exit(1)
if self.LocalHostName:
q=QSqlQuery( 'select data from settings where hostname="%s" and value="RecordFilePrefix";' %self.LocalHostName, db )
else:
- q=QSqlQuery( 'select data from settings where value="RecordFilePrefix" limit 1;' %self.LocalHostName, db )
+ q=QSqlQuery( 'select data from settings where value="RecordFilePrefix" limit 1;' , db)
q.next()
self.basename=q.value(0).toString().ascii()
- db.close()
+ db.close()
#enddef
def getDate(self,prog):#for multiple episodes with no titles ok
@@ -299,7 +303,8 @@
self.index+=1
db.close()
for q in range(len(data)):
- filename='%s%s'%(self.basename,data[q].basename)
+ filename='%s/%s'%(self.basename,data[q].basename)
+ print filename
if not os.access(filename,os.R_OK):
data.pop(q)
if len(data)<1:
@@ -704,7 +709,7 @@
chanid=str(item.chanid)
starttime=str(item.starttime).replace('T','').replace('-','').replace(':','')
dt=float(item.length)
- mcstring='%s -c %s -s %s -v none'%(mcstring,chanid,starttime)
+ mcstring='%s -c %s -s %s -m -v none'%(mcstring,chanid,starttime)
passes=item.Epasses
#do passes
for pas in range(1,passes+1):
Code: Select all
/usr/bin/mythtranscode -f /tmp -c 1041 -s 20070130010400 -v important
2007-01-30 01:36:17.564 Using runtime prefix = /usr
2007-01-30 01:36:17.578 New DB connection, total: 1
2007-01-30 01:36:17.583 Enabled verbose msgs: important
2007-01-30 01:36:17.584 New DB connection, total: 2
2007-01-30 01:36:17.596 Using protocol version 31
0: start_time: 1773.839 duration: 11.680
1: start_time: 1773.811 duration: 11.667
stream: start_time: 19709.007 duration: 130.093 bitrate=14411 kb/s
2007-01-30 01:36:17.730 mythtranscode: 0% Completed @ -47.619 fps.
Code: Select all
echo 'select data from settings where value="RecordFilePrefix"'|mysql -umythtv -pmythtv -h<myth-DB-Host> mythconvergCode: Select all
+ filename='%s/%s'%(self.basename,data[q].basename)That is as far as it will get unless you open another terminal and run the mencoder line too, then they should then both work together./usr/bin/mythtranscode -f /tmp -c 1041 -s 20070130010400 -v important
2007-01-30 01:36:17.564 Using runtime prefix = /usr
2007-01-30 01:36:17.578 New DB connection, total: 1
2007-01-30 01:36:17.583 Enabled verbose msgs: important
2007-01-30 01:36:17.584 New DB connection, total: 2
2007-01-30 01:36:17.596 Using protocol version 31
0: start_time: 1773.839 duration: 11.680
1: start_time: 1773.811 duration: 11.667
stream: start_time: 19709.007 duration: 130.093 bitrate=14411 kb/s
2007-01-30 01:36:17.730 mythtranscode: 0% Completed @ -47.619 fps.
OK, I have two mythbackends.pteppic wrote: If you do have more than one box using mythbackend on your system, can you post the output ofplease...Code: Select all
echo 'select data from settings where value="RecordFilePrefix"'|mysql -umythtv -pmythtv -h<myth-DB-Host> mythconverg
Code: Select all
$ echo 'select data from settings where value="RecordFilePrefix"'|mysql -umythtv -pmythtv -h192.168.0.2 mythconverg
data
/myth/hdtv
/myth/record
Ah, I see. Something was going wrong and the progress bar would just jump to 100% and no error would be printed and no encoded file written so I was running it on the command line trying to understand what was going on. So I suppose that wasn't it. Probably something dumb I was doing trying to hack around in the code. But either way with the latest version it seems to be working fine and I finally got my first x264 encoded file out! I'm now trying some of the other encoding options like the NTSC dvd support and so forth. Will post back if I spot anything. Thanks for your help.pteppic wrote:That is as far as it will get unless you open another terminal and run the mencoder line too, then they should then both work together.
That is what I was afraid of, sorry to be a pain, but can you please doimmudium wrote:OK, I have two mythbackends.Code: Select all
$ echo 'select data from settings where value="RecordFilePrefix"'|mysql -umythtv -pmythtv -h192.168.0.2 mythconverg data /myth/hdtv /myth/record
Code: Select all
echo 'select * from settings where value="RecordFilePrefix"'|mysql -umythtv -pmythtv -h192.168.0.2 mythconvergI know the PAL profile works because I tested it, but don't have the hardware to test NTSC so would be grateful if you could.immudium wrote: I'm now trying some of the other encoding options like the NTSC dvd support and so forth.
No problem. Glad to help.pteppic wrote: That is what I was afraid of, sorry to be a pain, but can you please doI need to try and get which value is for which machine without using DBLocalHostName from mysql.txt, Thanks.Code: Select all
echo 'select * from settings where value="RecordFilePrefix"'|mysql -umythtv -pmythtv -h192.168.0.2 mythconverg
Code: Select all
$ echo 'select * from settings where value="RecordFilePrefix"'|mysql -umythtv -pmythtv -h192.168.0.2 mythconvergkk
value data hostname
RecordFilePrefix /myth/hdtv pegasus
RecordFilePrefix /myth/record stargateI did a quick test with the NTSC DVD profile and the video came out kind of funky looking with the colors all messed up and shifting around. I'll do some more testing and see if I can figure out what's wrong. Everything else looks good for me though.pteppic wrote:I know the PAL profile works because I tested it, but don't have the hardware to test NTSC so would be grateful if you could.immudium wrote: I'm now trying some of the other encoding options like the NTSC dvd support and so forth.