NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) v
« Previous 1 … 8 9 10 11 12 … 125 Next »
File Renaming Utility: AddEpisode

 
  • 0 Vote(s) - 0 Average
File Renaming Utility: AddEpisode
HeeZy01
Offline

Junior Member

Posts: 6
Threads: 1
Joined: Apr 2007
#121
2007-04-29, 08:14 PM
turkey Wrote:well, it turns out that you found a bug.:o I fixed it and uploaded the new version to the wiki. Before i realized it was a bug, i added in the ability to adjust the day forward or backward in the optional ini file. Try it out, and see if it fixes your problem.
works great so far!!! thanks!!
dshoup
Offline

Member

Posts: 247
Threads: 39
Joined: Jan 2006
#122
2007-04-30, 12:06 PM
dshoup Wrote:Thanks turkey and HtV. I have added the "start /wait" to commands in postprocessing.bat and it appears to be working fine. For others that may encounter this, here is what my postprocessing.bat now looks:

start /wait comskip -n %1
start /wait comskippad %1
addepisode %1 "{show}-({yearshort}-{month}-{day})-{episode}-{unique id short}"

As for a long-term fix, I don't know if it would be possible to make addepisode.exe first look to see if comskip.exe is running and if so, delay starting? I ran across a utility that does this (http://www.ericphelps.com/scripting/samp...ndex.html), but it would be neat to incorporate it into addepisode.exe. Alternatively, you might just update the wiki and suggest everyone use the start /wait commands. Anyhow, thanks for the help and the great utility!

Ok...I lied. My first show worked fine, but other shows are still having the problem. My research on the start /wait command indicates it does not always work. I'm going to try using comskip in parallelprocess.bat and see how that goes. It will take me a couple of days as I now realize I need to record several shows to be sure it is really working before jumping to conclusions (note original message, even with no delay mechanism in postprocess.bat, things did work about 10% of the time). I'll report back once I have some new results.
turkey
Offline

Member

Posts: 206
Threads: 17
Joined: Sep 2005
#123
2007-04-30, 10:08 PM
dshoup Wrote:As for a long-term fix, I don't know if it would be possible to make addepisode.exe first look to see if comskip.exe is running and if so, delay starting?

Yes, I thought about this, but what happens if you have back to back recordings, and comskip is running on a different file...

I have another option for you: Since you already run comskip after the recording is finished, you could run addepisode on the file before you run comskip, etc. Addepisode will send the new filename back to the batch file for you to use in other utilities. So, postprocessing.bat would be:

addepisode %1 "{show}-({yearshort}-{month}-{day})-{episode}-{unique id short}">temp.txt
for /f "tokens=*" %%i in (temp.txt) do set new=%%i
start /wait comskip -n %new%
start /wait comskippad %new%

Sorry I didn't think about this earlier.
turkey
Offline

Member

Posts: 206
Threads: 17
Joined: Sep 2005
#124
2007-04-30, 10:52 PM
pointlisse Wrote:Hi,
Just started using this as well. Can you incorporate the %new% variable as you would for %~dpn1, as in %~dpnnew?

Try using this command to get the new filename. It will get the whole path and filename up until the '.' before mpg:

FOR /F "tokens=1 delims=." %%i in (temp.txt) do set new=%%i

Let me know if this works or not, so i can work out a better solution.
pointlisse
Offline

Member

Posts: 74
Threads: 12
Joined: Apr 2007
#125
2007-05-01, 12:00 AM
turkey,

No luck. It dies on the addepisode command. Any other sugggestions? I'll stick with what I have for now, as it is currently working.

addepisode %1 "{show}{[ - ]}{episode}">newfilename.txt
for /f "tokens=*" %%i in (newfilename.txt) do set new=%%i

"C:\Program Files\devnz\gbpvr\Third Party\FFmpeg\ffmpeg.exe" -y -i "%new%" -f avi -ab 128 -ac 2 -acodec mp3 -vcodec mpeg4 -b 710k -s 320x240 -vtag DIVX "%new%_"

ren "%new%_" *.avi
move "%~dp1"*.avi "C:\Videos\Transcoded\"
turkey
Offline

Member

Posts: 206
Threads: 17
Joined: Sep 2005
#126
2007-05-01, 12:56 AM
pointlisse Wrote:No luck. It dies on the addepisode command. Any other sugggestions?


huh. that command i gave you shouldn't have anything to do with addepsiode, so it shouldn't die there. try this:

addepisode %1 "{show}{[ - ]}{episode}">newfilename.txt
for /f "tokens=*" %%i in (newfilename.txt) do set new=%%i

for /f "tokens=1 delims=." %%i in (newfilename.txt) do set noext=%%i

then you can use %new% for the full path and filename with .mpg, and use %noext% for the full path and name without an extension.

Maybe i'm just confused, but i'm pretty sure that will work for what you want to do.
pointlisse
Offline

Member

Posts: 74
Threads: 12
Joined: Apr 2007
#127
2007-05-01, 01:35 AM
turkey Wrote:huh. that command i gave you shouldn't have anything to do with addepsiode

I think you're right. I tried invoking the postprocessing.bat file manually, but the newfilename.txt file was empty (I discovered after my post) and presented an i/o error.

So I will try your first suggestion again, but while I have your attention, does this look correct (based on your first suggestion)?

"C:\Program Files\devnz\gbpvr\Third Party\FFmpeg\ffmpeg.exe" -y -i "%new%mpg" -f avi -ab 128 -ac 2 -acodec mp3 -vcodec mpeg4 -b 710k -s 320x240 -vtag DIVX "%new%avi"

I want to make sure with the placement of the '.'.

Thanks (again!)
Andrew
turkey
Offline

Member

Posts: 206
Threads: 17
Joined: Sep 2005
#128
2007-05-01, 01:44 AM
pointlisse Wrote:"%new%mpg"

you need to add in a period i think:

"%new%.mpg"
dshoup
Offline

Member

Posts: 247
Threads: 39
Joined: Jan 2006
#129
2007-05-06, 12:53 PM
turkey Wrote:Yes, I thought about this, but what happens if you have back to back recordings, and comskip is running on a different file...

I have another option for you: Since you already run comskip after the recording is finished, you could run addepisode on the file before you run comskip, etc. Addepisode will send the new filename back to the batch file for you to use in other utilities. So, postprocessing.bat would be:

addepisode %1 "{show}-({yearshort}-{month}-{day})-{episode}-{unique id short}">temp.txt
for /f "tokens=*" %%i in (temp.txt) do set new=%%i
start /wait comskip -n %new%
start /wait comskippad %new%

Sorry I didn't think about this earlier.

Ok...I have tried many things, so let me post an update. I have tried using the start /wait command, installing and using the sleep # command, and running comskip from parallelprocessing.bat. All 3 give the same end result--the show disappears from the ready list after addepisode runs. I even tried comskip in parallelprocessing.bat and then inserting sleep 2000 at the beginning of postprocessing.bat (about 30 minutes--long enough for comskip to run and finish even if it had not been started before postprocessing.bat). Therefore, I'm suspicious that the problem is not as simple as addepisode starting before comskip has finished.

I also tried your suggestion of running addepisode before comskip, but when I do this comskip fails (show does appear in the ready list as it does if I just run addepisode by itself). I notice the renamerecordings program’s wiki indicates it should always be run after comskip if both programs are being used

One new symptom I have noticed is that the comskip files appear not to be getting renamed properly by addepisode. Often, the log file is the one that ends up being renamed *.txt (the file GBPVR looks to for comical info). The original *.txt still exists with the old file name. I don’t know if that helps indicate what could be going wrong or not, but though it may be worth mentioning.

Any other ideas on what I could try?
turkey
Offline

Member

Posts: 206
Threads: 17
Joined: Sep 2005
#130
2007-05-09, 02:07 AM
sorry about the long delay in a response.

What files does comskip create after it runs?
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (19): « Previous 1 … 11 12 13 14 15 … 19 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  vidImport utility support carpeVideo 73 54,997 2012-05-27, 06:27 AM
Last Post: jksmurf
  xmltv doesn't import all the channel information in xmltv file vokuit00 2 2,942 2010-06-07, 04:35 AM
Last Post: vokuit00
  transcode from file.ts to file.mpeg in parallelproocessing alevideotestservice 4 3,025 2009-12-30, 07:27 PM
Last Post: alevideotestservice
  Showanalyzer Doesn't Run While Show is Recording a .TS File ww4397 1 2,614 2009-12-02, 11:14 AM
Last Post: ww4397
  Newbie needs help with renaming external plugins and making some plugins to work Chris79 2 2,499 2009-06-14, 05:36 AM
Last Post: Chris79
  Comskip: Interpreting the aspects file zehd 0 1,654 2008-11-29, 07:41 AM
Last Post: zehd
  EPG Utility: YApi2XML (discontinued) -Oz- 503 141,029 2008-11-28, 08:55 PM
Last Post: zehd
  Extended program information utility? SLR_65 10 5,602 2008-10-29, 02:33 AM
Last Post: UncleJohnsBand
  SkipTool creates a bogus file if the name contains & mkenyon2 40 15,671 2008-10-23, 06:59 PM
Last Post: pastro
  yapi2cml reporting corrupted listing file? teookie 1 1,768 2008-09-25, 10:50 PM
Last Post: zehd

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode