VideoHelp Forum




+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 57 of 57
  1. Originally Posted by poisondeathray View Post

    If you could get the .avs import into premiere working (it should work), you wouldn't have to waste any time encoding or HDD space with the new "master" , and the quality would be better. You would only have to make small proxies

    Just wondering what you mean by this? The avs import does seem to work -- are you saying I should just create proxies of the MP4 file and not create another Master? But what would happen when I swap the avs proxy out and replace the original MP4 back in? Or are you saying to replace the proxy AVS with a Master AVS?
    Quote Quote  
  2. Also - for the AVIsynth script, if I add lots of section like below:

    FFMpegSource2("F:\Video Editing\SANY0660.MP4", atrack=-1)
    ConvertFPS(100)
    SeparateFields()
    SelectEvery(8,0,5)
    Weave()

    FFMpegSource2("F:\Video Editing\SANY0649.MP4", atrack=-1)
    ConvertFPS(100)
    SeparateFields()
    SelectEvery(8,0,5)
    Weave()


    FFMpegSource2("F:\Video Editing\SANY0671.MP4", atrack=-1)
    ConvertFPS(100)
    SeparateFields()
    SelectEvery(8,0,5)
    Weave()

    with a different file in each section, and load this AVS into HCenc - will it encode separate files or one big file?
    Quote Quote  
  3. Originally Posted by sterankin View Post
    Originally Posted by poisondeathray View Post

    If you could get the .avs import into premiere working (it should work), you wouldn't have to waste any time encoding or HDD space with the new "master" , and the quality would be better. You would only have to make small proxies
    Just wondering what you mean by this? The avs import does seem to work -- are you saying I should just create proxies of the MP4 file and not create another Master? But what would happen when I swap the avs proxy out and replace the original MP4 back in? Or are you saying to replace the proxy AVS with a Master AVS?
    AviSynth is a frame server. When an application opens an AVS script it thinks it's opening a video file. AviSynth "serves" uncompressed and filtered frames to the application just as if those frames came directly from a video file. If the editing application can import AVS scripts then there is no need to use another application to open the script and save the video to an intermediate file.
    Quote Quote  
  4. Originally Posted by sterankin View Post
    Also - for the AVIsynth script, if I add lots of section like below:

    FFMpegSource2("F:\Video Editing\SANY0660.MP4", atrack=-1)
    ConvertFPS(100)
    SeparateFields()
    SelectEvery(8,0,5)
    Weave()

    FFMpegSource2("F:\Video Editing\SANY0649.MP4", atrack=-1)
    ConvertFPS(100)
    SeparateFields()
    SelectEvery(8,0,5)
    Weave()


    FFMpegSource2("F:\Video Editing\SANY0671.MP4", atrack=-1)
    ConvertFPS(100)
    SeparateFields()
    SelectEvery(8,0,5)
    Weave()

    with a different file in each section, and load this AVS into HCenc - will it encode separate files or one big file?
    To append several source videos them:

    FFMpegSource2("F:\Video Editing\SANY0660.MP4", atrack=-1)\
    +FFMpegSource2("F:\Video Editing\SANY0649.MP4", atrack=-1)\
    +FFMpegSource2("F:\Video Editing\SANY0671.MP4", atrack=-1)

    ConvertFPS(100)
    SeparateFields()
    SelectEvery(8,0,5)
    Weave()
    If you put them all on one line leave out the \ between them:

    FFMpegSource2("SANY0660.MP4") + FFMpegSource2("SANY0649.MP4")...

    And if the AVS file is in the same folder as the video files you don't need to include the full path (as in the above example).

    Another thing you should note: the default video is named "last". When you don't specify a name "last" is used.

    So when you write:

    FFMpegSource2("F:\Video Editing\SANY0660.MP4", atrack=-1)
    ConvertFPS(100)
    SeparateFields()
    SelectEvery(8,0,5)
    Weave()
    What's implied is:
    last = FFMpegSource2("F:\Video Editing\SANY0660.MP4", atrack=-1)
    last = ConvertFPS(last, 100)
    last = SeparateFields(last)
    last = SelectEvery(last, 8,0,5)
    last = Weave(last)
    You don't need to know that to process a single video but sometimes you want to process several videos but handle each differently. In that case you need to explicitly name each videos then join them at the end:
    v1 = FFMpegSource2("F:\Video Editing\SANY0660.MP4", atrack=-1)
    v1 = Tweak(v1, hue=25)
    v2 = FFMpegSource2("F:\Video Editing\SANY0661.MP4", atrack=-1)
    v2 = Tweak(v2, hue=-15)
    return(v1+v2)
    Or, since "last" is implied when you don't explicitly name a video stream:
    FFMpegSource2("F:\Video Editing\SANY0660.MP4", atrack=-1)
    Tweak(hue=25)
    v2 = FFMpegSource2("F:\Video Editing\SANY0661.MP4", atrack=-1)
    v2 = Tweak(v2, hue=-15)
    return(last+v2)
    Last edited by jagabo; 3rd Aug 2010 at 07:27.
    Quote Quote  
  5. Many Thanks again - I will try creating high quality mpeg2 files with HCenc (note that I was hoping to find a way to create one script to load into HCenc with all the files in, but it would still create separate mpeg2 files for each at the end - I dont want to join them)

    I would use the avs files in premiere but for some reason they dont export correctly in AME, and I would be wrooied that I would spend a lot of time editing only for the final export at the end to be wrong. So maybe safer to edit based on files that I know are ok..
    Quote Quote  
  6. When using HcEnc I recommend using Constant Quantization mode (constant quality, pick the quality you want, let the bitrate fall where it may). Do not enable the VBV/Max Bitrate option. You may also need to specify one of the HL profiles.

    I just did this with the 1920x1080i50 AVS script (quantizer 1, higher quality than you need, probably) and got an average bit rate of ~175,000 kbps, with peaks around 250,000 kbps.
    Last edited by jagabo; 3rd Aug 2010 at 08:24.
    Quote Quote  
  7. Does HCgui not output any audio? As the resulting M2V file has none??

    Also when I play the m2v file in WMP, it says the clip is 2 mins 45 s long when it is only 44 seconds? (The original was 44 seconds)
    Last edited by sterankin; 3rd Aug 2010 at 12:28.
    Quote Quote  
  8. no, hcenc only encodes video

    not all players support playing raw elementary streams properly . Most only support playing back multiplexed (.mpg) ie. mpeg2-ps or transport streams
    Quote Quote  
  9. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by sterankin View Post
    I was hoping to find a way to create one script to load into HCenc with all the files in, but it would still create separate mpeg2 files for each at the end
    I make separate AVS files then a batch file like this:

    Code:
    REM: bitrate
    set rate=2000
    
    REM: aspect ratio
    set ar=4:3
    
    REM: output folder
    set mpgd=s:\mpg\
    
    for %%A in (
    0_vid.avs
    1_vid.avs
    2_vid.avs
    3_vid.avs
      ) do (
    P:\HCenc\HCenc_024 -i %%~fA -o %mpgd%%%~nA.m2v -b %rate% -aspectratio %ar% -pulldown -profile best -matrix qlb -frames all -noini -2pass -maxbitrate 8000 -log %%~dpAhenc.log -avsreload
    
    call avsaften %%~fA
    move %%~dpnA.ac3 %mpgd%
    )
    change parameters to taste.
    The last two lines call another batch to convert the audio to AC3. You can omit or change that if you do it another way.

    Originally Posted by sterankin View Post
    Does HCgui not output any audio? As the resulting M2V file has none??

    Also when I play the m2v file in WMP, it says the clip is 2 mins 45 s long when it is only 44 seconds? (The original was 44 seconds)
    The M2v files produced are only video, and many players don't read them properly and report the wrong length.
    You need to make AC3 audio for DVDs using an audio encoder.
    Quote Quote  
  10. Thanks for that, here is my bat file - how do you run it and will this work ok?

    REM: bitrate
    set rate=100000
    REM: aspect ratio
    set ar=16:9
    REM: output folder
    set mpgd=F:\Video Editing\TM300\Wedding\Camcorder - Copy\
    for %%A in (
    SANY0650.avs
    SANY0653.avs
    SANY0654.avs
    SANY0657.avs
    SANY0658.avs
    SANY0662.avs
    SANY0663.avs
    SANY0665.avs
    SANY0674.avs
    SANY0677.avs
    SANY0679.avs
    SANY0680.avs
    SANY0704.avs
    SANY0754.avs
    ) do (
    C:\Users\ME\Desktop\Video Stuff\HC023\HCenc_024 -i %%~fA -o %mpgd%%%~nA.m2v -b %rate% -aspectratio %ar% -pulldown -profile best -matrix qlb -frames all -noini -2pass -maxbitrate 100000 -log %%~dpAhenc.log -avsreload
    call avsaften %%~fA
    move %%~dpnA.ac3 %mpgd%
    )
    Quote Quote  
  11. save the notepad text file (or whatever text editor you used), rename the extension from .txt to .bat and double click it
    Quote Quote  
  12. Done, it just bring up a command window with the following (then quickly disapprears):
    Note my folder for HCenc is: F:\HC023\HCenc_023




    F:\Video Editing\TM300\Wedding\Camcorder - Copy>REM: bitrate
    F:\Video Editing\TM300\Wedding\Camcorder - Copy>set rate=100000
    F:\Video Editing\TM300\Wedding\Camcorder - Copy>REM: aspect ratio
    F:\Video Editing\TM300\Wedding\Camcorder - Copy>set ar=16:9
    F:\Video Editing\TM300\Wedding\Camcorder - Copy>REM: output folder
    F:\Video Editing\TM300\Wedding\Camcorder - Copy>set mpgd=F:\Video Editing\
    TM300\Wedding\Camcorder - Copy\




    this is the bat file now:

    REM: bitrate
    set rate=100000
    REM: aspect ratio
    set ar=16:9
    REM: output folder
    set mpgd=F:\Video Editing\TM300\Wedding\Camcorder - Copy\
    for %%A in (
    SANY0650.avs
    SANY0653.avs
    SANY0654.avs
    SANY0657.avs
    SANY0658.avs
    SANY0662.avs
    SANY0663.avs
    SANY0665.avs
    SANY0674.avs
    SANY0677.avs
    SANY0679.avs
    SANY0680.avs
    SANY0704.avs
    SANY0754.avs
    )
    do
    (
    F:\HC023\HCenc_023-i %%~fA -o %mpgd%%%~nA.m2v -b %rate% -aspectratio %ar% -pulldown -profile best -matrix qlb -frames all -noini -2pass -maxbitrate 100000 -log %%~dpAhenc.log -avsreload
    )
    Perhaps its not finding the avs files for some reason? I have the bat file in the same folder as the AVS files
    Last edited by sterankin; 3rd Aug 2010 at 13:55.
    Quote Quote  
  13. It looks like you are missing a space after the HCenc directory

    F:\HC023\HCenc_023-i

    should be

    F:\HC023\HCenc_023 -i

    You might want to modify it to 1pass quantizer, you currently have it set to 2pass (no problem with that, just takes longer, and for your purposes you don't need a set filesize or bitrate) . I don't use HCenc in batch mode, so maybe PM AlanHK on how to do that if you decide to go that route
    Quote Quote  
  14. Arggh still didnt work after removing the space. How does it kow where to locate the AVS files?
    Quote Quote  
  15. It looks where you have "set mpgd=F:\Video Editing\TM300\Wedding\Camcorder - Copy\"

    EDIT: I looked at it more closely, mpgd refers to the output folder .
    Last edited by poisondeathray; 3rd Aug 2010 at 18:35.
    Quote Quote  
  16. If you can't figure it out, another option is to use ffmpeg to do batch conversion. This works for sure, I've tested it .

    The benefit with using ffmpeg , is audio is included in the transport stream container (so saves you a step of encoding or multiplexing later). I used AC3 384kb/s in this example . If you didn't want audio, replace with "-acodec ac3" with "-an"

    In this example, it's encoded to mpeg2 as well with q=1 (you should get ~100Mb/s give or take). If you want smaller files use a higher quantizer = lower quality. The flags +ilme+ildct are important to include, because in your case, you are encoding interlaced material.

    The problem with ffmpeg, is it's MPEG2 encoder isn't as good as HCEnc's . But you could argue when you are using around 100Mb/s and over, it's going to be very difficult to tell the difference

    The batch file is the same idea (rename to .bat) , with the .bat file and ffmpeg.exe in the same directory as the .avs files


    for %%a in ("*.avs") do ffmpeg -i %%a -vcodec mpeg2video -qscale 1 -qmin 1 -flags +ilme+ildct -top 1 -acodec ac3 -ab 384k -f mpegts %%~na.m2ts
    (I think Jagabo's script changes field order to BFF , if you use similar to what Alex_Ander suggested, it will be TFF)

    I even checked in premiere, and the files import correctly, no need to interpret the file (they are read as top field first) - but you should double check for yourself, because your version didn't import the native mp4 files correctly in the first place.
    Last edited by poisondeathray; 3rd Aug 2010 at 15:18.
    Quote Quote  
  17. Originally Posted by poisondeathray View Post
    (I think Jagabo's script changes field order to BFF , if you use similar to what Alex_Ander suggested, it will be TFF)
    You're right. The script that I was testing with produced TFF but when I cut/pasted from my script to the broweser I left out the AssumeTFF() line. They should have read:

    (open 59.94p source)
    AssumeTFF()
    ChangeFPS(100) #or ConvertFPS(100)
    SeparateFields()
    SelectEvery(8,0,5)
    Weave()
    As originally posted they would deliver BFF (because that's the default in AviSynth). Both will work. You just have to keep track of the field order during your processing.
    Last edited by jagabo; 3rd Aug 2010 at 15:58.
    Quote Quote  
  18. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by sterankin View Post
    for %%A in (
    SANY0650.avs
    ...
    SANY0754.avs
    )
    do
    (
    F:\HC023\HCenc_023-i %%~fA -o %mpgd%%%~nA.m2v -b %rate% -aspectratio %ar% -pulldown -profile best -matrix qlb -frames all -noini -2pass -maxbitrate 100000 -log %%~dpAhenc.log -avsreload
    )
    Perhaps its not finding the avs files for some reason? I have the bat file in the same folder as the AVS files
    Have you tried putting the 'do' on the same line as the parentheses?
    Code:
    ...
    ) do (
    ...
    Quote Quote  
  19. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by sterankin View Post
    Thanks for that, here is my bat file - how do you run it and will this work ok?

    Code:
    REM: bitrate
    set rate=100000
    I think that's impossibly high. Probably it acts the same as the maximum, which I think is 8000.
    I see you changed that in the calling line too.

    Change that back to 8000.


    Code:
    REM: output folder
    set mpgd=F:\Video Editing\TM300\Wedding\Camcorder - Copy\
    Spaces in file and folder names can cause problems. Only the part up to the first space will be read.

    I just never use them so my scripts may not work if you do.
    Try using quotes to wrap it:
    set mpgd="F:\Video Editing\TM300\Wedding\Camcorder - Copy\"
    or use a folder with no spaces or other punctuation in any parts of the name.



    C:\Users\ME\Desktop\Video Stuff\HC023\HCenc_024 -i %%~fA -o %mpgd%%%~nA.m2v -b %rate% -aspectratio %ar% -pulldown -profile best -matrix qlb -frames all -noini -2pass -maxbitrate 100000 -log %%~dpAhenc.log -avsreload
    call avsaften %%~fA
    move %%~dpnA.ac3 %mpgd%

    )
    the last two lines (in green) won't work unless you have my "Avsaften" script. Just delete those for now.
    I can paste that in later if you're interested.

    Again the folder you have HCENC in has evil spaces, so you have to wrap it in quotes:

    "C:\Users\ME\Desktop\Video Stuff\HC023\HCenc_024" -i %%~fA -o %mpgd%%%~nA.m2v -b %rate% -aspectratio %ar% -pulldown -profile best -matrix qlb -frames all -noini -2pass -maxbitrate 8000 -log %%~dpAhenc.log -avsreload



    If you have the stomach for more coding, here's my avsaften.bat script:

    Code:
    @echo avsaften avsfile.avs
    @echo audio from avs files and convert to AC3
    @echo uses wavi and aften
    
    @if %1X==X goto ALL
    :LOOP
    for %%I in (%1) do (
    wavi %%I - | p:\aften\aften.exe -b 128 -s 1 -w 45 -dnorm 27 - %%~nI.ac3
    )
    
    SHIFT
    @if %1X==X goto END
    @goto LOOP
    
    :ALL
    for %%I in (*.avs) do (
    wavi %%I - | p:\aften\aften.exe -b 128 -s 1 -w 45 -dnorm 27 - %%~nI.ac3
    )
    :END
    This requires the utilities wavi and the command line aften.
    Wavi is at http://sourceforge.net/projects/wavi-avi2wav/
    It takes the audio from an AVS file to a WAVE file, or in this case, streams it into Aften to convert to AC3.
    The bitrate is set with "-b 128", you can increase that if you like.

    The different loops first take either the AVS filenames on the command line; or if none defaults to converting every AVS file in the folder you call it from.
    Quote Quote  
  20. Originally Posted by AlanHK View Post
    Code:
    REM: bitrate
    set rate=100000
    I think that's impossibly high. Probably it acts the same as the maximum, which I think is 8000.
    I see you changed that in the calling line too.

    Change that back to 8000.
    He's making 1080p60 => 1080i50 MPEG2 for a high quality "master" , not SD DVD material . 8000kb/s would be very low.
    Quote Quote  
  21. Thanks fols - I never got it working and just loaded each file separatley and converted individually.

    I spent all day yesterday editing my Proxy files. I then swapped the HD files back in to the project. I did this by opening the PPro CS4 prproj file in notepad and changed the file extensions.

    e.g. clip1.mpg was changed to clip1.MTS
    camera2.mpg was changed to cmaera2.m2v

    I saved and then opened the project again. It seemed to have worked ok, with the new HD files in place and all the edits were in place.
    I tried to export to a blu ray file but Adobe media encoder was giving me an error:

    Encoding Failed
    -----------------------------------------------------------------------------
    Could not read from the source. Please check if it has moved or been deleted.

    AME seems to be putting the project in the temp folder and using that. I tried a few workaround on Adobes website (adding a Premiere.exe shortcut to dynamiclink folder, and even reinstalling the program) - but still receiving this error when trying to encode.

    I am at a total loss now.

    I might try using dynamic link to open the project in Encore, could I create either a DVD or Blu ray folders that way? I would like to play back on the PS3 so I could move any resulting files/folders to a flash drive.

    Anyways just thought I would update in case anyone has any ideas.
    Quote Quote  
  22. Did you delete your temp files ? before swapping, and/or before encoding

    Did you try other methods of proxy editing : e.g. copy & pasting your edits into a new sequence timeline, then using replace footage command to relink offline master. Search online there should be dozens of tutorials
    Quote Quote  
  23. Thanks with trial and error I got it all working - but the export was still failing.

    I had a look at my timeline in PPro - and guess what? All the .M2V files I had previously created using Avsynth and HCEnc were all red. I mean in the preview window they were red video when you scrubbed through them. (Note they play ok in WMP and when I swapped them into premiere they inititally looked ok, only became an issue when I tried to export via media encoder)

    What could have caused this? Why does premiere not seem to like these video files - is the data rate too high (rem we used near 100MBps), I am really at a loss here folks. Could I reencode the files some other way so it is more compliant? Even with some quality loss.

    I still have the original MP4 files from the sanyo which are 59.940 fps - but rem ppro saw these as 14.99 fps. I did try changing this manually for each file to 59.94 in premiere (Interpret footage) but it didnt like it as the clips on the timeline then became greyed out.

    Any more help, I'm desperate...
    Last edited by sterankin; 6th Aug 2010 at 18:13.
    Quote Quote  
  24. Do you mean when you swap the master back in? It's supposed to be red render bar, because it doesn't conform to any sequence specifications. If you used low quality and same settings as a sequence preset (e.g. hdv 1080i50 anamorphic 16:9) , then you wouldn't get red render bar, but it would be a lot less quality . It doesn't matter, because presumably you've already done your edits, and are just swapping the high quality version in. You're not using the master to edit. People get all paranoid, but if you understand what the red bar means, it's no big deal.

    I have some HD2000 clips and they are interpreted as 59.94 correctly in premiere pro, not sure why yours is acting all buggy with everything it seems.

    If you wanted to encode some way to make it compliant (I don't suggest this, you will take a quality hit) , you have to match one of the sequence settings. e.g. if your other camera was avchd 1080i50 , you could encode that in AME using the same preset as the sequence you were going to use

    But is absolutely no benefit to encoding your "master" to a compliant preset if you are doing proxy editing. Everything is re-rendered (not smart rendered) anyway in premiere pro (except dv-avi , which you aren't using) . So the only thing you are doing is losing extra quality.
    Last edited by poisondeathray; 6th Aug 2010 at 18:27.
    Quote Quote  
  25. Its not a red bar, the actual footage is RED! Instead of me and my wife at the altar the footage is all red! This is in the preview window, and only for the m2v files -the MTS are fine.
    Quote Quote  
  26. So I tried it, both methods, HCEnc and FFMPEG , and they both work. I tried a dozen combinations, with audio/ without audio , in .m2ts container, native .m2v elementary - they all work for me .... I don't know what to say . It's not even red render bar (although it should be) , I used the AVCHD 1080i25 (1080i50) preset . Works perfectly fine here in PP CS4. I don't know what else to suggest
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!