Play from avs files

For help and support with PS3 Media Server in general
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

Play from avs files

Postby HalfDead » Sat Sep 25, 2010 8:33 pm

Hi Guys,
I have a bunch of TV shows I have recorded and these play fine via the server, however I was getting sick of hearing the same intro over and over again so I made a bunch of avs files which just trimmed out the intro.

Code: Select all
AviSource("X:\TV Shows\XYZ\Season 01\01.avi")
EnsureVBRMP3Sync()
Trim(1000,0)

These play fine on the computer.
Does PS3 Media Server support avs files? (I can't browse to them on the XMB)
I know there are settings for avisynth in the transcoders, but they're more global and the intro isn't always the same length. I also don't want to re-encode the original files as I'd like to keep them with the intro in (just not every time I play them on the PS3) and I don't really like the idea of having two different versions taking up HDD space.
So really being able to play avs files would be fantastic.
Thanks,
HD

Edit: I've already tried vfapi and makeAVIs to wrap them, and although these play on the computer the PS3 complains they are corrupt
HalfDead
 
Posts: 7
Joined: Sat Sep 25, 2010 8:19 pm

Re: Play from avs files

Postby chocolateboy » Sat Sep 25, 2010 11:10 pm

This can be configured via the MEncoder "expert settings" (Transcoding Settings -> MEncoder -> Expert Settings : Codecs specific parameters -> Custom parameters) on a per-filename/folder/drive basis (though you'd need to force PMS to use MEncoder (e.g. via the #--TRANSCODE--# folder) to use this feature on files that don't require MEncoder).

The following settings skip files whose names contain "Skip-10" (e.g. "House - 01x01 - Skip-10.avi" or "C:\TV\Skip-10\House\House - 01x01.avi") by 10 seconds and files whose names contain "Skip-30" by 30 seconds:

Code: Select all
filename.contains("Skip-10") :: -ss 10
filename.contains("Skip-30") :: -ss 30
Last edited by chocolateboy on Sun Sep 26, 2010 8:41 am, edited 1 time in total.
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: Play from avs files

Postby HalfDead » Sun Sep 26, 2010 5:24 am

Thanks, this will take care of some of the shows. However there are some (such as house) where an important even happens before the intro and this method would remove that too. Any other ideas?
HalfDead
 
Posts: 7
Joined: Sat Sep 25, 2010 8:19 pm

Re: Play from avs files

Postby chocolateboy » Sun Sep 26, 2010 5:29 am

You just move/link/rename the ones you want the appropriate skip length added to, and leave the rest alone.

There's no method that can automatically figure out what you want-to-skip/don't-want-to-skip other than specifying it yourself.
Last edited by chocolateboy on Sun Sep 26, 2010 7:36 am, edited 1 time in total.
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: Play from avs files

Postby HalfDead » Sun Sep 26, 2010 7:23 am

Yes, but I was hoping to be able to skip sections rather than just the first XX frames/seconds. For example this script
Code: Select all
AviSource("X:\TV Shows\ABC\Season 01\01.avi")
EnsureVBRMP3Sync()
Trim(0,100)+Trim(1000,0)
will play frames 0 to 100, then skip 101 to 999, then play the rest of the show. This enables me to see the beginning of the story, skip the intro and then watch the rest. I already have the frames/times that I want to skip
HalfDead
 
Posts: 7
Joined: Sat Sep 25, 2010 8:19 pm

Re: Play from avs files

Postby chocolateboy » Sun Sep 26, 2010 7:36 am

http://www.mplayerhq.hu/DOCS/HTML/en/edl.html

e.g.:

Code: Select all
filename.contains("/House/") :: -edl House.edl


Depending on your platform, you may need to experiment with the path of the EDL file (relative paths like the one above will be relative to the PMS home directory) and/or the "contains" string.

If you know that your renderer can handle the file without transcoding, you can also experiment with the "-oac copy" and "-ovc copy" options to reduce the overhead, though they might be incompatible with the "-edl" option.

It works fine for me on Linux with an oldish (April 2009) MEncoder. You'll probably have to wrangle backslashes on Windows. And don't forget to follow the instructions above to force PMS to use MEncoder where necessary (you can see if it is/isn't being used by checking the debug.log).

I might use this myself, by the way, so thanks for bringing it up :D
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: Play from avs files

Postby HalfDead » Tue Sep 28, 2010 3:43 am

This seems to be working as I would like. Is there any way to get it to look for a edl file of the same name in the same folder for EVERY file played?
HalfDead
 
Posts: 7
Joined: Sat Sep 25, 2010 8:19 pm

Re: Play from avs files

Postby chocolateboy » Tue Sep 28, 2010 3:57 am

HalfDead wrote:This seems to be working as I would like.


Could you post an example of what you've got working (i.e. the "expert settings", as above) so that other Windows users don't have to wrestle with backslashes?
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: Play from avs files

Postby HalfDead » Tue Sep 28, 2010 5:26 am

It's a bit tedious, but I have currently made an entry similar to the following for each file I have made an EDL for.
Code: Select all
filename.contains("X:" + File.separator + "TV Shows" + File.separator + "ABC" + File.separator + "Season 01" + File.separator + "01 - Pilot.avi") :: -edl "X:/TV Shows/ABC/Season 01/01 - Pilot.edl"
As you can see, I have replaced each backslash with the java File.separator (case is important) in the first half of the string and replaced the backslashes with forward slashes in the second half. This means it should also work on *nix, BSD etc or any other OS, but since they use forward slashes I wouldn't bother. I have made these lists by getting a file system listing which would give me
Code: Select all
X:\TV Shows\ABC\Season 01\01 - Pilot.avi
Running it through a replace regex which goes
Match
Code: Select all
(.*)(avi)

Replace
Code: Select all
filename.contains("\1\2") :: -edl "\1edl"

Then do a search/replace for
Search
Code: Select all
\

Replace
Code: Select all
" + File.separator + "
in the first half of the string and
Search
Code: Select all
\

Replace
Code: Select all
/
in the second half
HalfDead
 
Posts: 7
Joined: Sat Sep 25, 2010 8:19 pm

Re: Play from avs files

Postby chocolateboy » Tue Sep 28, 2010 2:56 pm

HalfDead wrote:Is there any way to get it to look for a edl file of the same name in the same folder for EVERY file played?


There's no way to pass data from the Java (BeanShell) expression on the left hand side to the MEncoder options on the right i.e. you can't do:

Code: Select all
String whatever = (new File(filename)).whatever(); 1 == 1 :: -edl $whatever.edl


You could try setting an environment variable or writing a temporary file on the left hand side, but by that point you'd be much better off patching PMS. The relevant code is in net/pms/encoders/MEncoderVideo.java. Adding something like the above could probably be done in a couple of lines.
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Next

Return to General Help and Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 7 guests