Results 1 to 10 of 10

Thread: ZProcess: Question about transcoding profiles

  1. #1
    Join Date
    Mar 2005
    Posts
    1,406

    ZProcess: Question about transcoding profiles

    I'm playing around with ZProcess and experimenting with the different profiles. One thing I've found kind of confusing is the way ZProcess injects itself into gbpvr to do the transcoding, but doesn't read the transcoding options out of config.xml.

    If I understand correctly, when you launch a conversion that uses ZProcess, ZProcess looks at the target extension (and maybe source?) to determine which profile to use, is this right? As I play with ZProcess I'm getting to where I like it quite a bit, but I can think of more uses if it didn't have this limitation.

    First of all, why not allow users to create their own profiles and then pass the name of the profile to ZProcess on the command line? The command line arguments of gbpvr's CustomFFmpegConversions are being discarded anyway, so why not remove useless args from the config command lines and replace them with a command line argument ZProcess will use, namely the profile name. This would allow you to support the differing bitrate .wmv profiles that gbpvr comes with, and it would allow new formats to be added easily too. I think it'd be less confusing too.

    For instance, I'm looking to add some conversions for .ts files that'll be supported in the next gbpvr release. I want to add a conversion of HD files to SD .mpg for viewing on my MVPs, and I want to add a conversion option to .AVI for archiving. This 2avi profile I want to use HD resolutions, while my normal SD 2avi profile I want to convert to 512x384. I can't do this now, but if we could passed the profile names on the command line, it'd be simple. The same is true for 2mpg... I'd like one for converting to something the MVP can view, and one for converting to HD mpgs.

    Anyway, it's just a thought. ZProcess is really growing on me, especially how you made it so easy to test the same settings in ffmpeg, vlc and mencoder, and it's real-time checking of the aspect ratios. Very cool.

    Thanks!

  2. #2
    Join Date
    Feb 2006
    Location
    Calgary, Alberta, Canada
    Posts
    5,105
    Quote Originally Posted by wtg View Post
    I'm playing around with ZProcess and experimenting with the different profiles. One thing I've found kind of confusing is the way ZProcess injects itself into gbpvr to do the transcoding, but doesn't read the transcoding options out of config.xml.

    If I understand correctly, when you launch a conversion that uses ZProcess, ZProcess looks at the target extension (and maybe source?) to determine which profile to use, is this right? As I play with ZProcess I'm getting to where I like it quite a bit, but I can think of more uses if it didn't have this limitation.
    GB-PVR calls ZProcess with a command line that is stored in the config.xml. It includes he source file and the destination file. If the dest is an mpg then ZProcess uses '2mpg' profile unless the dest file starts with 'MVP' then it uses trans2mvp.

    If avi then 2avi, etc... if mp4 then ZProcess checks even further is ipod or psp, and makes adjustments...

    The reason it's like this is because of how it was written, and at one time ZProcess needed to fool GB-PVR into being 'ffmpeg.exe'. I also had to make it as backward compatible as possible, but at the time I had no way of parsing out the whole command line to use the parameters. Anyway, Zprocess is what it is now. The only limitation I see using current default profiles, sub includes in config.xml, is the difference between the two wmv profiles. ZProcess will only use one, and I don't see the reason to change that...

    First of all, why not allow users to create their own profiles and then pass the name of the profile to ZProcess on the command line? The command line arguments of gbpvr's CustomFFmpegConversions are being discarded anyway, so why not remove useless args from the config command lines and replace them with a command line argument ZProcess will use, namely the profile name. This would allow you to support the differing bitrate .wmv profiles that gbpvr comes with, and it would allow new formats to be added easily too. I think it'd be less confusing too.
    You are correct. a person could discard all of the extraneous parameters in the config.xml. Again, I'm sticking with the defaults that one would see after they install or reinstall GB-PVR...

    For instance, I'm looking to add some conversions for .ts files that'll be supported in the next gbpvr release.
    I noticed that. I already thought that I would have to write some code for you...

    Let's see, you want...

    HD files to SD .mpg for viewing on my MVPs

    convert to .AVI for archiving

    Looks like you want two different avi profiles....

    The same is true for 2mpg... I'd like one for converting to something the MVP can view, and one for converting to HD mpgs.
    Just wondering what's the difference? What would be the different parameteres between 'one for MVP, one for HD?'

    Anyway, it's just a thought. ZProcess is really growing on me, especially how you made it so easy to test the same settings in ffmpeg, vlc and mencoder, and it's real-time checking of the aspect ratios. Very cool.
    I think I know what you want, but before I confuse you, let's hammer out what you want.... I think some of it exists already...
    Frank Z

    I used to ask 'why?' Now I just reinstall...
    ______________________________________________
    Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager;


  3. #3
    Join Date
    Mar 2005
    Posts
    1,406
    Quote Originally Posted by zehd View Post
    GB-PVR calls ZProcess with a command line that is stored in the config.xml. It includes he source file and the destination file. If the dest is an mpg then ZProcess uses '2mpg' profile unless the dest file starts with 'MVP' then it uses trans2mvp.
    Gotcha

    Quote Originally Posted by zehd View Post
    The reason it's like this is because of how it was written, and at one time ZProcess needed to fool GB-PVR into being 'ffmpeg.exe'. I also had to make it as backward compatible as possible, but at the time I had no way of parsing out the whole command line to use the parameters. Anyway, Zprocess is what it is now. The only limitation I see using current default profiles, sub includes in config.xml, is the difference between the two wmv profiles. ZProcess will only use one, and I don't see the reason to change that...
    I just gave you a reason.

    It's just a suggestion. You could still make it backwards compatible but support a command line profile option. If the new option exists, use it, otherwise ignore them all.

    Quote Originally Posted by zehd View Post
    I noticed that. I already thought that I would have to write some code for you...
    :lol: No, not for me... for everyone!

    Quote Originally Posted by zehd View Post
    Let's see, you want...

    HD files to SD .mpg for viewing on my MVPs

    convert to .AVI for archiving

    Looks like you want two different avi profiles....
    That's just it... I might need two, but maybe me or someone else wants 3. If we could create our own named profiles, we could have as many as we wanted.

    And it also means you wouldn't necessarily have to do anything to enhance ZProcess as mencoder and ffmpeg add support for new formats. What about dvr-ms?

    Quote Originally Posted by zehd View Post
    Just wondering what's the difference? What would be the different parameteres between 'one for MVP, one for HD?'
    The HD one would preserve the full HD resolution while the MVP one would be lower. Its just an example, but not unreasonable I don't think. If my machine won't transcode .ts files realtime (it's marginable right now), then I need an option on the Transcode menu for my kids to convert their fav HD recordings to lower resolution for MVP viewing. And as far as converting to an HD mpg goes, it's because I'm not sure I want my permanent storage of HD recordings to be in .ts or .dvr-ms format. If I convert them to a simply HD .mpg format I can view them with almost any app on about any PC.

    I think I know what you want, but before I confuse you, let's hammer out what you want.... I think some of it exists already...
    Probably... I'm still trying to fully absorb what I can do with ZProcess.

  4. #4
    Join Date
    Feb 2006
    Location
    Calgary, Alberta, Canada
    Posts
    5,105
    Quote Originally Posted by wtg View Post
    That's just it... I might need two, but maybe me or someone else wants 3. If we could create our own named profiles, we could have as many as we wanted.
    I didn't want to get into it until the other issues are taken care of, but you already can force transcode profiles in the command line.

    Yes, creating your own Transcode profiles would make your life easier and solve another guys issue of wanting three different Trans2MVP profiles for three different MVPs.

    I need some time to digest and incorporate this idea...
    Frank Z

    I used to ask 'why?' Now I just reinstall...
    ______________________________________________
    Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager;


  5. #5
    Join Date
    Feb 2006
    Location
    Calgary, Alberta, Canada
    Posts
    5,105
    WTG, here is a prerelease for ZProcess with custom profiles...

    Attachment 9592

    This is how it works. You'll notice an extra button to delete and a combo box at the bottom for Destination File Extension...

    Attachment 9590

    OK. First off, you should select a profile that is similar to the one you want to create. If you want another avi profile, select 2avi, and then over write the text in the profile box. Use something identifyable, and don't use spaces... Maybe 2avi-2 for example...

    Press 'save' you'll notice the profile is now in the list. (if you now press 'delete' you will hmmmm delete the profile)

    Before you're in the clear to change settings, ON ALL CUSTOM Profiles you must select the target file extension... Currently there's only .mpg and .avi. Twist my arm and you'll get more... (it's a gauge to see who's using this program)

    Now to implement this in a command line, or the Custom Transcoding in the config.xml

    Code:
        <Conversion name="ReTime, Comskip" exe="ZProcess\ZProcess.exe" cmd="{SOURCE_FILE} retime comskip auto" targetExtension=".mpg" />
        <Conversion name="2MPG" exe="ZProcess\ZProcess.exe" cmd="{SOURCE_FILE} {DEST_FILE}" targetExtension=".mpg" />
        <Conversion name="Tran2MVP" exe="ZProcess\ZProcess.exe" cmd="{SOURCE_FILE} trans2mvp {DEST_FILE}" targetExtension=".mpg" />
        <Conversion name="XviD" exe="ZProcess\ZProcess.exe" cmd="{SOURCE_FILE} -vtag XVID {DEST_FILE}" targetExtension=".avi" />
        <Conversion name="Custom AVI Transcode" exe="ZProcess\ZProcess.exe" cmd="{SOURCE_FILE} 2avi-2 -vtag XVID {DEST_FILE}" targetExtension=".avi" />
    The first one is an out of context example of calling other features in ZProcess...

    You'll notice that in the '2mpg' custom conversion , There are no parameters. That's cause the default transcode of AVI to MPG is to use the 2mpg transcode profile...

    The Xvid line has a ref to -vtag XVID so that ZProcess can tell between XVID and DIVX

    Let me know how this goes
    Last edited by zehd; 2007-02-25 at 11:02 PM.
    Frank Z

    I used to ask 'why?' Now I just reinstall...
    ______________________________________________
    Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager;


  6. #6
    Join Date
    Mar 2005
    Posts
    1,406
    zehd,

    You are the man! Not only is it nice that you took my suggestions, but I can't believe that you did it so fast. I won't have time to test this tonight because I've got a prior commitment, but it'll definitely get a work-out tomorrow.

    Thanks again... I can't wait to try it out!

    Tim

  7. #7
    Join Date
    Feb 2006
    Location
    Calgary, Alberta, Canada
    Posts
    5,105
    Quote Originally Posted by wtg View Post
    zehd,

    You are the man! Not only is it nice that you took my suggestions, but I can't believe that you did it so fast. I won't have time to test this tonight because I've got a prior commitment, but it'll definitely get a work-out tomorrow.

    Thanks again... I can't wait to try it out!

    Tim

    I'd like to know if it's working well for you
    Frank Z

    I used to ask 'why?' Now I just reinstall...
    ______________________________________________
    Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager;


  8. #8
    Join Date
    Mar 2005
    Posts
    1,406
    I finally got around to do some testing with this and I've run into trouble.

    I created a new profile HD2MVP1, which is simply a copy of Tran2MVP for testing purposes. Following the example you show above for the Trans2MVP profile, I added it as a custom conversion in my config.xml as follows:
    Code:
        <Conversion name="HD2MVP1" exe="ZProcess\ZProcess.exe" cmd="{SOURCE_FILE} HD2MVP1 {DEST_FILE}" targetExtension=".mpg" />
    When I invoke it, it do anything, leaving the following in the log:
    Code:
    3/6/2007 10:40:19 PM : Transcode starts
    3/6/2007 10:40:19 PM : Using profile: HD2MVP1
    3/6/2007 10:40:19 PM : Commandline: 
    3/6/2007 10:40:24 PM : Process spawned. Waiting for process window to close.
    3/6/2007 10:40:25 PM : Transcode finishes moving files
    3/6/2007 10:40:25 PM : Transcode finishes. Time: 00:00:07
    If I leave the profile name out of the command line, as in:
    Code:
        <Conversion name="HD2MVP1" exe="ZProcess\ZProcess.exe" cmd="{SOURCE_FILE} {DEST_FILE}" targetExtension=".mpg" />
    then ZProcess runs my default 2mpg profile, which shows the following in the log:
    Code:
    3/6/2007 10:34:04 PM : Transcode starts
    3/6/2007 10:34:04 PM : Using profile: 2mpg
    3/6/2007 10:34:04 PM : Commandline: "C:\Program Files\mplayer\mencoder.exe" -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf scale=352:240,expand=0:0:0:0,eq2=1.00:1.00:0.00:1.00:1.00:1.00:1.00:1.00 -srate 48000 -af lavcresample=48000,volume=0.0 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=2400:vbitrate=2400:keyint=18:acodec=mp2:abitrate=192:aspect=4/3  -ofps 29.97002997003 -o "\\Cav\drive_f\Video\Recent Recordings\American Idol\American Idol_20070306_20002100.mpg" "\\Cav\drive_f\Video\Recent Recordings\American Idol\American Idol_20070306_20002100.ts"
    3/6/2007 10:34:04 PM : Process spawned. Waiting for process window to close.
    So, am I doing something wrong to use a named profile?

    Also, another question. I thought I understood that ZProcess will automatically scale the video to fit the MVPs dimensions, so my widescreen videos will end up letterboxed on the MVP. That's not happening. Is this because I'm using a .ts file to transcode?

    Thanks for your help and the nice work you've put into ZProcess.

  9. #9
    Join Date
    Mar 2005
    Posts
    1,406
    I just realized the same problem occurs for me when I run a manual test transcode from within ZProcess using my HD2MVP1 profile. For some reason the process doesn't spawn, and the status line which normally says it's spawning the process just says Commandline:

  10. #10
    Join Date
    Feb 2006
    Location
    Calgary, Alberta, Canada
    Posts
    5,105
    Quote Originally Posted by wtg View Post
    I finally got around to do some testing with this and I've run into trouble.

    I created a new profile HD2MVP1, which is simply a copy of Tran2MVP for testing purposes. Following the example you show above for the Trans2MVP profile, I added it as a custom conversion in my config.xml as follows:
    Code:
        <Conversion name="HD2MVP1" exe="ZProcess\ZProcess.exe" cmd="{SOURCE_FILE} HD2MVP1 {DEST_FILE}" targetExtension=".mpg" />
    When I invoke it, it do anything, leaving the following in the log:
    Code:
    3/6/2007 10:40:19 PM : Transcode starts
    3/6/2007 10:40:19 PM : Using profile: HD2MVP1
    3/6/2007 10:40:19 PM : Commandline: 
    3/6/2007 10:40:24 PM : Process spawned. Waiting for process window to close.
    3/6/2007 10:40:25 PM : Transcode finishes moving files
    3/6/2007 10:40:25 PM : Transcode finishes. Time: 00:00:07
    If I leave the profile name out of the command line, as in:
    Code:
        <Conversion name="HD2MVP1" exe="ZProcess\ZProcess.exe" cmd="{SOURCE_FILE} {DEST_FILE}" targetExtension=".mpg" />
    then ZProcess runs my default 2mpg profile, which shows the following in the log:
    Code:
    3/6/2007 10:34:04 PM : Transcode starts
    3/6/2007 10:34:04 PM : Using profile: 2mpg
    3/6/2007 10:34:04 PM : Commandline: "C:\Program Files\mplayer\mencoder.exe" -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf scale=352:240,expand=0:0:0:0,eq2=1.00:1.00:0.00:1.00:1.00:1.00:1.00:1.00 -srate 48000 -af lavcresample=48000,volume=0.0 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=2400:vbitrate=2400:keyint=18:acodec=mp2:abitrate=192:aspect=4/3  -ofps 29.97002997003 -o "\\Cav\drive_f\Video\Recent Recordings\American Idol\American Idol_20070306_20002100.mpg" "\\Cav\drive_f\Video\Recent Recordings\American Idol\American Idol_20070306_20002100.ts"
    3/6/2007 10:34:04 PM : Process spawned. Waiting for process window to close.
    So, am I doing something wrong to use a named profile?

    Also, another question. I thought I understood that ZProcess will automatically scale the video to fit the MVPs dimensions, so my widescreen videos will end up letterboxed on the MVP. That's not happening. Is this because I'm using a .ts file to transcode?

    Thanks for your help and the nice work you've put into ZProcess.
    There is no point in trying to adjust the command line or the config.xml until you get it transcoding manually

    Assuming that the profile was created and working this line is the correct one...
    Code:
    <Conversion name="HD2MVP1" exe="ZProcess\ZProcess.exe" cmd="{SOURCE_FILE} HD2MVP1 {DEST_FILE}" targetExtension=".mpg" />
    Although, to be clear, the name= value can be anything. The variable which selects the custom profile is between the source_file and dest_file...

    So now that you have the correct line, leave it alone, while you hammer out the values for the HD transcoding profile...

    I'd like to see your logs, and somehow, get a small clip of a .ts file to me...

    Just so you know, that a Wide Screen MPG should become letterbox 4x3 IF mplayer is able to scan the MPG and retrieve the dimensions...

    (Mplayer is the program I use to get the dimensions of MPGs I use - I hope you have it installed with MEncoder, even though for testing you shouldn't use it for the transcoder) The MPlayer method is not fool proof and can cause errors.... so I'll need transcode logs.

    I really think I might need to o some completely different writing to handle what you want to do. If you can get me a 1or 2 minute .ts clip, I might be able to come up with something...
    Frank Z

    I used to ask 'why?' Now I just reinstall...
    ______________________________________________
    Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager;


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •