OSDN Git Service

fix logging and latest ffmpeg aac encoding problem.
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Mon, 24 Jan 2011 22:01:13 +0000 (22:01 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Mon, 24 Jan 2011 22:01:13 +0000 (22:01 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@812 4e526526-5e11-4fc0-8910-f8fd03428081

rec10/trunk/src/recdblist.py
rec10/trunk/src/tv2audio.py
rec10/trunk/src/zip.py

index f536acb..a31abe5 100644 (file)
@@ -141,7 +141,9 @@ def addCommandSelfLog(tspath,command):
     else:\r
         f=open(logpath,'w')\r
     tc=command+u"\n\n"\r
-    f.write(tc.encode('utf-8','ignore'))\r
+    tc=unicode(tc)\r
+    f.write(tc.encode("utf-8"))\r
+    #f.write(tc.encode('utf-8','ignore'))\r
     f.close()\r
 def getLogTitle(tspath):\r
     logo=tspath\r
index 6d50b8b..d0105e9 100644 (file)
@@ -44,7 +44,7 @@ def wav2mp3_lame(pin,pout):
 def ts2single_audio(pts,opts):\r
     paac=pts.replace(".ts",".aac")\r
     ffmpeg=configreader.getConfPath("ffmpeg")\r
-    e0=ffmpeg+" -i \""+pts+"\" -y -vn -f aac -acodec copy \""+paac+"\""\r
+    e0=ffmpeg+" -i \""+pts+"\" -y -vn -acodec copy \""+paac+"\""\r
     p0=subprocess.Popen(e0,shell=True)\r
     os.waitpid(p0.pid, 0)\r
     if p0.poll==None:#実行中\r
index 61d76d1..7dc9ab5 100644 (file)
@@ -13,7 +13,7 @@ def addFile2FileZip(addfile,basefile):
     if os.path.exists(basefile):
         th=zipfile.ZipFile(basefile,'a',zipfile.ZIP_DEFLATED)
     else:
-        th=zipfile.ZipFile(basefile,'w')
+        th=zipfile.ZipFile(basefile,'w',zipfile.ZIP_DEFLATED)
     if os.path.exists(addfile):
         th.write(addfile,os.path.basename(addfile))
     th.close()