SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #261  
Old 10-03-2004, 02:41 PM
insomniac's Avatar
insomniac insomniac is offline
Sage Icon
 
Join Date: May 2003
Location: Concord, Ca.
Posts: 1,104
err..slight modifications to the last script... Now the output file reflects the showname (less the junk)-date and time recorded. e.g.

APupNamedScoobyDooForLetterorWorse-Sep 23, 2004 11-30-00 AM.avi

Because im all UNC paths, ive never seen the output of the working java pickup/conversion script, but I found that the one thing that I dont like about moving files into the library, etc..is that you lose valuable information; and because I dont have access to studio, i cannot retain this information in said directories.

anyway...this is easily modified for mapped drives, if you care to try it...

:: Begin convertme.bat
REM cleanup
DEL dir.txt
DEL namelist.txt
DEL getxml.txt
DEL everything.txt
DEL info.txt
DEL delimit.txt
DEL final.txt
del dirnames.txt
DEL therest.txt


SET CONVERTMEDIR=C:\Program Files\Frey Technologies\SageTV\compressor\Jobs
SET OUTPUTDIR=\\sage\E\video-library


dir /B "%CONVERTMEDIR%" >> dir.txt
FOR /F "tokens=1,2,3 delims=." %%a IN (dir.txt) DO echo %%a >> namelist.txt


FOR /F %%a IN (namelist.txt) Do find /I "%%a" "%CONVERTMEDIR%\%%a.mpg.xml" >> getxml.txt


REM GET EVERYTHING
FOR /F "eol=- tokens=4,12,14,18 delims=>" %%a IN (getxml.txt) Do echo %%a %%b %%c %%d >> everything.txt
FOR /F "eol=- tokens=1,3,5,7 delims=< " %%a IN (everything.txt) Do echo %%a %%b %%c %%d >> info.txt
FOR /F "tokens=1 delims=: " %%a IN (info.txt) Do echo %%a>> dirnames.txt

REM Make Directories if not made already -these directory names can be variablized and passed (somehow) to the video directory
REM FOR /F "tokens=1 delims= " %%a IN (dirnames.txt) Do mkdir "%OUTPUTDIR%\%%a"
REM Kill invalid characters, etc.
REM FOR /F "tokens=1 delims= " %%a IN (dirnames.txt) Do xchange /i %%a "-" " "

REM TEST
FOR /F "tokens=2,3,4 delims= " %%a IN (info.txt) Do echo %%a %%b %%c>> therest.txt
xchange /i therest.txt ":" "-"
FOR /F "tokens=1,2,3,4,5,6,7 delims=: \" %%a IN (therest.txt) Do echo %%a %%b %%c %%d %%e %%f >> delimit.txt
FOR /F "tokens=1,2,3,4,5,6,7,8,9,10 delims=: -" %%a IN (delimit.txt) Do echo %%a %%b %%c %%d %%e %%f %%g %%h %%i>> final.txt





REM FOR /F "tokens=1,2,3,4,5,6,7,8,9 delims=: " %%a IN (final.txt) Do echo %%a %%b %%c-%%d \\%%e\%%f\%%g-%%h-%%i >> exampleout.txt
REM FOR /F "tokens=1,2,3,4,5,6,7,8,9 delims=: " %%a IN (final.txt) Do echo \\%%e\%%f\%%g-%%h-%%i %OUTPUTDIR%\%%g-%%a %%b-%%c-%%d.avi>> output.txt



REM pass command + variables to ffmpeg
REM FOR /F "tokens=1,2 delims= " %%a IN (output.txt) Do ffmpeg -i "%%a" -hq -deinterlace -y -f avi -vcodec mpeg4 -b 1600 -async 1 -acodec mp3 -ab 192 "%%b"
REM FOR /F "tokens=1,2 delims= " %%a IN (output.txt) Do ffmpeg -i "%%a" -hq -deinterlace -y -f avi -vcodec mpeg4 -b 1600 -async 1 -acodec mp3 -ab 192 local.avi
FOR /F "tokens=1,2,3,4,5,6,7,8,9 delims=: " %%a IN (final.txt) Do ffmpeg -i "\\%%e\%%f\%%g-%%h-%%i" -hq -deinterlace -y -f avi -vcodec mpeg4 -b 1600 -async 1 -acodec mp3 -ab 192 "%OUTPUTDIR%\%%g-%%a %%b-%%c-%%d.avi"




REM cleanup
DEL dir.txt
DEL namelist.txt
DEL getxml.txt
DEL everything.txt
DEL info.txt
DEL delimit.txt
DEL final.txt
del dirnames.txt
DEL therest.txt

:: End convertme.bat

And yes, its still ghetto, but you could easily change the paths for easier cleanup, etc.

hmm..file is too large to attach, so if you are to try it out, ill host it here: Http://mezor.bounceme.net/UNC_conversion.zip

Just extract w/ pathnames and drop it in your sagetv directory. I used the same directory convention as the java script on post #183 for simplification purposes.

Anyway..if anyone tries this, let me know how it works for them. Im curious

EDIT: Not to discredit Bubster for his build of ffmpeg at all, but cupra's build seems to be a little bit more reliable for me. It kept bombing out on me when calling it through batch. At first I thought it was the way I was calling it, but then found that My pc just didnt like this build. The link below is for cupras build. Works great for me! Dont forget to put the .dll in your compressor directory.

http://forums.freytechnologies.com/f...ghlight=ffmpeg

I.
__________________
If you're not cheating, your not trying...

My sage rigs:
Server - Windows 2003, Intel 865 PERLL w/ P4 3.2g 1gb ram, 3-PVR250, 3-PVRUSB's, 1 Skystar2, 1 twinhan 102g, 1 starbox DVB-S Cards. Evo network QAM encoder. 1.2TB storage 6.x server + MTSAGE for DVB
Client 1/Master BR - MediaMVP running a 30" Olevia LCD TV.
Client 2/Front Room - Shuttle ST61G4 XPC 1gig ram, 60gb HD, BTC9019 wireless keyboard/mouse & Harmony 880. 6.x client. GF6600GT driving a Sony WEGA 55" rear projection tv.

Last edited by insomniac; 10-03-2004 at 04:19 PM.
Reply With Quote
  #262  
Old 10-04-2004, 02:19 PM
falchulk falchulk is offline
Sage Icon
 
Join Date: Sep 2003
Posts: 1,150
Cupra's build works great for me. I was using a build that I compiled myself that had issues with Mp3 and xvid. Using Cupra's made a world of diffrence.
Reply With Quote
  #263  
Old 10-06-2004, 11:19 AM
kato's Avatar
kato kato is offline
Sage User
 
Join Date: Oct 2004
Posts: 26
Same problem as Crim

Quote:
Originally Posted by Bubster
You have some windows theme that looks like a Mac from a couple of years ago, so I felt obliged to poke fun at it.

I've attached a replacement ffmpegProcessor.class which give a little more debug output. Can you put it in place of the one you have just now, and then use the following command:

java ffmpegPickup >out.txt

This will stick the output in a file called out.txt. If you post that here, I might have a better idea of the problem.

- Neil.
The problem I'm having is exactly the same as "Crim"

I followed the troubleshooting instructions you gave him, but I noticed he didn't reply to your last message about output from the modified ffmpegprocessor.class file. Well here's mine:

These are the settings grabbed from the properties.xml:
Pick up location:
Pick up file extension:
Video_Rate: 1700 :: false
Audio_Rate: 192 :: false
Library_Path: .\library\ :: false
Exe_Command: ffmpeg -i @INPUT @QUALITY @SIZE -deinterlace -y -f @OUTPUT_FORMAT @VSYNC -vcodec @VCODEC -b @VIDEO_RATE -g 300 -bf 2 -acodec @ACODEC -ab @AUDIO_RATE @ASYNC @OUTPUT :: false
Output_Format: avi :: false
Vidoe Codec: mpeg4 :: false
Audio Codec: mp2 :: false
Create .my file: true
Delete source on success: false :: false
Reply With Quote
  #264  
Old 10-06-2004, 03:46 PM
Bubster's Avatar
Bubster Bubster is offline
Sage Advanced User
 
Join Date: Feb 2004
Location: Glasgow, UK
Posts: 114
Quote:
Originally Posted by yano
I followed the troubleshooting instructions you gave him, but I noticed he didn't reply to your last message about output from the modified ffmpegprocessor.class file. Well here's mine:
Those values look like default values (or some of them do), which suggests to me that maybe the properties.xml file isn't being found by the program, or that there is some kind of syntax error in the xml.

Can you post your properties.xml as an attachment here? (You'll probably have to change the extension to .txt for the forum to accept it.)

- Neil.
Reply With Quote
  #265  
Old 10-07-2004, 02:54 PM
kato's Avatar
kato kato is offline
Sage User
 
Join Date: Oct 2004
Posts: 26
Here it is...

Thanks for all your help.

EDIT:I tried out ffmpeg from the command line and it worked just fine. The only thing I modified so far was in in the Sage UI for the compression settings - I changed the video bitrate to 1000 and the audio bitrate to 192(better settings for use on Playstation 2 Gameshark Media Player)

EDIT #2: Did some more fiddling around and tried a newer java version! It works!! I was using build 1.4.2_04-b05 with no luck, so...I downloaded build 1.4.2_05-b04 and it now seems to work fine

What version of java are you using Bubster?
Attached Files
File Type: txt properties.txt (1.9 KB, 205 views)

Last edited by kato; 10-14-2004 at 06:43 PM.
Reply With Quote
  #266  
Old 10-15-2004, 09:10 AM
kato's Avatar
kato kato is offline
Sage User
 
Join Date: Oct 2004
Posts: 26
Scratch that...I closed Sage and tried to re-open it and I received a Java error! I tried ffmpeg_convert and it still worked! After a bit of troubleshooting, I really figured out what the problem was with ffmpeg_convert and SageTV:

In order to use the Canadian EPG I have to use Zap2It - here's the guide here:
http://www.digicasa.com/prod_sagetv_plugin.htm

You also have to copy some .jar files to your java directory to get it to work properly with SageTV. It was the abscence of these .jar files in the directory of the new version of java I installed that was causing SageTV not to start. So I copied them back to the new java directory and voila SageTV was working again, but ffmpeg_convert was not. So I tried removing the 3 "extra" .jar files one at a time and finally figured out it was xerces.jar which was causing ffmpeg_convert to not work. So what I did was let SageTV use the newer version of java with the correct .jar files and pointed ffmpeg_convert to the older version of java I still had installed(minus the extra .jar files) in the ffmpeg_convert.properties file.

There is probably another way around this, but this was all I could come up with. I also looked at the website for the designer of xerces.jar and there were no newer versions of the file that would work.
http://xml.apache.org/xerces-j/

Maybe v5.0 of the JRE might fix this problem, but I'm sticking with this method for now...
Reply With Quote
  #267  
Old 10-18-2004, 11:55 AM
lbwtaylor lbwtaylor is offline
New Member
 
Join Date: Oct 2004
Posts: 3
Thank you Yano!

I'm a Canadian using Zap2it as well and I was at a loss trying to figure out how to get this working until I tried your method. Simply duplicating my java folder, removing xerces.jar, and pointing ffmpeg to it fixed the problem. Thanks again for sharing your fix!

Lawrence
Reply With Quote
  #268  
Old 11-01-2004, 02:59 PM
abasu2003's Avatar
abasu2003 abasu2003 is offline
Sage Expert
 
Join Date: Jul 2004
Posts: 551
I actually started a separate thread about this but I figured I might as well get to the experts of this thread.

-So, when you use video compression, are you guys giving up the ability to have the recording in teh Sage Recordings menu, thereby giving up the ability to sort your files?

-If that's the case, is there some way to compress the file but then have it read as an mpg so that the wiz.bin thinks nothign has changed?

I'm very impressed with the compression and the quality and it has lots of potential, but it seems like I'd be giving up a lot of functionality if I used it all the time. Are people just using it for archived videos?

Just wondering how people are using this. thanks.
Reply With Quote
  #269  
Old 11-02-2004, 06:18 PM
inertia inertia is offline
Sage User
 
Join Date: Aug 2004
Posts: 5
avi and codecs

could this not be used ? to enable encoding to divx/mp3 or xvid/mp3 ?

http://www.divx-digest.com/software/mpeg2avi.html
Reply With Quote
  #270  
Old 11-06-2004, 10:10 AM
broca broca is offline
New Member
 
Join Date: Nov 2004
Posts: 2
Using this with VirtualDub - Works Great!

First, whoever is responsible for either the stv or the ffmpeg_pickup, YOU ROCK!

I have an Archos gmini 400 and have been looking for a way to automatically reencode TV recordings to DIVX.

This solution works very well. The only problem was that I could not get ffmpeg to create an avi that worked right with the archos. Audio Sync issues. However, I replaced the Exe line of the Properties.XML with this

<Value>VirtualDub /sarchos1.vcf /p@INPUT,@OUTPUT /r /x</Value>
<Enabled>True</Enabled>

and it works great!

The options are /s which loads a configuration file, /p creates a job list, /r runs the job and /x closes VirtualDub

Definitely not rocket science but thought I would share my experience.

Broca
Reply With Quote
  #271  
Old 11-06-2004, 11:57 AM
Crashless's Avatar
Crashless Crashless is offline
Sage Icon
 
Join Date: Oct 2003
Location: Los Angeles, CA
Posts: 1,224
when did vdub get CLI? Is this new? I've been using DubMan, a great scripting program, but this seems like a much better solution.
Reply With Quote
  #272  
Old 11-06-2004, 01:08 PM
broca broca is offline
New Member
 
Join Date: Nov 2004
Posts: 2
Vdub CLI

Not sure when vdub got command line but the above is working for me.

The CLI is very limited from what I have seen. No way to pass arguments such as bitrate for example, since this is all in the .vcf file.

If you can deal with the same encoding parameters for every file though this works great.

I should have mentioned that I am using virtualdub_mpeg2 of course.

Also, if anyone is interested in my Archos ready .vcf let me know.

Broca
Reply With Quote
  #273  
Old 11-08-2004, 04:55 PM
abasu2003's Avatar
abasu2003 abasu2003 is offline
Sage Expert
 
Join Date: Jul 2004
Posts: 551
Is there any reason that ffmpeg_convert.exe wouldn't work if you defined it as a custom command in the dynamic menu system?

I defined the action teh default way (powering off sage, executing command, power sage back on) but it refuses to actually execute the file. I tried just executing "ffmpeg.exe" because its in teh same file, and I see the command prompt for that flash by. But if I change that to "ffmpeg_convert.exe," nothing happens. Any ideas?
Reply With Quote
  #274  
Old 11-14-2004, 04:53 AM
alon24 alon24 is offline
Sage Aficionado
 
Join Date: Jun 2004
Posts: 351
Can you guys post the complete process in the first page of the thread so that, whoever tries to find out what to do with it, is not confused by 14 (nad counting) pages?

other threads are able to do this and I think its very good, and readable!!!
Thanks

Last edited by alon24; 11-14-2004 at 06:17 AM.
Reply With Quote
  #275  
Old 11-14-2004, 06:24 AM
alon24 alon24 is offline
Sage Aficionado
 
Join Date: Jun 2004
Posts: 351
also, I notice you use ISO-8859-1 for the creation of the xml and the .my file, but since I use hebrew, and our fonts are supported in "Cp1255" or "ISO-8859-8" (not in 8859-1), the file cannot be found so this is a problem.

would it be possible for you to use other (not 8859-1) encoding in the "Compress" action in order to create the file (xml) correctly???

is this a question I should refer to cayares(since he is writing the STV I use)?

also, tried compressing a timed recording with no attached hebrew characters, and it did compress to e:\video\compress_shows.
how do I view the newly compressed file? in Cayares STV there is a view archived shows, but nothing shows up ther, even after I do a full refresh.

Thanks, and hope you can fix this
Ilan
Reply With Quote
  #276  
Old 11-18-2004, 12:01 PM
JUC's Avatar
JUC JUC is offline
Sage Icon
 
Join Date: May 2004
Location: Vermont, USA
Posts: 1,399
Is there a way to manually compress files outside of sage? I put a file in my Archive and the compress option is not available there. I tried moving it back to my recordings but couldn't get that to work either (i created a new video import directory and copied the file there but it still wasn't showing up in My recordings).
Thanks
JUC
Reply With Quote
  #277  
Old 11-18-2004, 12:23 PM
Crashless's Avatar
Crashless Crashless is offline
Sage Icon
 
Join Date: Oct 2003
Location: Los Angeles, CA
Posts: 1,224
Virtual Dub is my external compressor of choice. Actually, because of my hack, it's also my internal compressor of choice. Only downside is that it has to parse the mpeg before it'll compress, which takes a while. Other than that it's a very nice program.
Reply With Quote
  #278  
Old 12-06-2004, 08:19 AM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
I downloaded from the links in #183 and the job file is being produced without an end </TV> tag.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #279  
Old 12-06-2004, 01:37 PM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
I haven't tried it, but it looks like Cayars 15 fixed it.

http://forums.freytechnologies.com/f...ead.php?t=7936
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #280  
Old 12-07-2004, 07:09 AM
dooferlad's Avatar
dooferlad dooferlad is offline
Sage Advanced User
 
Join Date: Aug 2004
Posts: 165
Quote:
Originally Posted by broca
The options are /s which loads a configuration file, /p creates a job list, /r runs the job and /x closes VirtualDub

Definitely not rocket science but thought I would share my experience.
Broca
How did you recompress the audio? I thought VirtualDub only did video processing. Wouldn't mind that VCF so I can play.

BTW, which version of VirtualDub are you using? There are so many variants these days!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 05:45 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.