VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 44
Thread
  1. Member
    Join Date
    Apr 2019
    Location
    USA
    Search Comp PM
    I have searched a few sites and haven't found a solution. I hope this question not to come off as a duplicate.
    I have the following files in the same folder:

    FFMPEG.exe (32-bit version)
    Asia17.avi (Video codec hffyuv, audio codec PCM)
    Test.bat
    Test.avs (Avisynth script file)
    ------------------------------------------------

    The text within the Test.bat file is:
    ffmpeg -i "TEST.AVS" -acodec flac -vcodec ffv1 -level 3 -threads 8 -coder 1 -context 1 -g 1 -slices 24 -slicecrc 1 -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m output.mkv

    When I run the Test.bat file, I don't get any error message, but the FFMPEG does not proceed further. Please see the attached pictures.
    I'd like to just get the 28gb uncompressed AVI file to be compressed using lossless codecs. I don't have any specific desire to convert the uncompressed files into ".mkv", ".avi" or ".mp4". I'm pleased with any extension as long as the content is not lost during compression and the file size is smaller.
    I'm looking forwards to receiving helpful tips or any advice from "pioneers".

    Thank you for your time reading. Image
    [Attachment 53424 - Click to enlarge]
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Are you trying to learn FFmpeg/batch processing or are you trying to compress your file?
    If it's to compress the file, use Virtualdub2. Open the source, video/compression set the output codec.
    Audio/full processing/compression set output codec.

    to troubleshoot the batch file, first make sure the command works outside of the batch file
    by copy and pasting it into the command window
    Quote Quote  
  3. Originally Posted by rgia View Post
    When I run the Test.bat file, I don't get any error message, but the FFMPEG does not proceed further. Please see the attached pictures.
    I'd like to just get the 28gb uncompressed AVI file to be compressed using lossless codecs. I don't have any specific desire to convert the uncompressed files into ".mkv", ".avi" or ".mp4". I'm pleased with any extension as long as the content is not lost during compression and the file size is smaller.

    Why are you using avisynth ? Post the .avs script . Verify that the .avs script is valid (preview it in vdub2 or mpchc)

    If you're not doing any additional processing with avisynth, why not compress the file directly ? (skip avisynth entirely)

    If Asia17.avi already uses huffyuv, that's already using lossless compression. ie. it's not uncompressed

    -g 1
    FFV1 will only make the video stream marginally smaller with -g 1 (every frame a keyframe ,no temporal compression) . Temporal compression is generally where a lot of the reduction in filesize comes from for video
    Quote Quote  
  4. 1) check your test.avs with virtualdub2. If it's open fine without issues and show your video then test.avs is ok.
    2) If test.avs is ok you should try to encode video only with your commandline (without audio):
    ffmpeg -i "TEST.AVS" -vcodec ffv1 -level 3 -threads 8 -coder 1 -context 1 -g 1 -slices 24 -slicecrc 1 -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m output.mkv
    Audio can be elaborated later.
    Quote Quote  
  5. Member
    Join Date
    Apr 2019
    Location
    USA
    Search Comp PM
    Originally Posted by davexnet View Post
    Are you trying to learn FFmpeg/batch processing or are you trying to compress your file?
    If it's to compress the file, use Virtualdub2. Open the source, video/compression set the output codec.
    Audio/full processing/compression set output codec.

    to troubleshoot the batch file, first make sure the command works outside of the batch file
    by copy and pasting it into the command window
    I'm trying to learn FFMPEG/batch processing. The syntax does not work when I put it in the command window.
    Quote Quote  
  6. Member
    Join Date
    Apr 2019
    Location
    USA
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by rgia View Post
    When I run the Test.bat file, I don't get any error message, but the FFMPEG does not proceed further. Please see the attached pictures.
    I'd like to just get the 28gb uncompressed AVI file to be compressed using lossless codecs. I don't have any specific desire to convert the uncompressed files into ".mkv", ".avi" or ".mp4". I'm pleased with any extension as long as the content is not lost during compression and the file size is smaller.

    Why are you using avisynth ? Post the .avs script . Verify that the .avs script is valid (preview it in vdub2 or mpchc)

    If you're not doing any additional processing with avisynth, why not compress the file directly ? (skip avisynth entirely)

    If Asia17.avi already uses huffyuv, that's already using lossless compression. ie. it's not uncompressed

    -g 1
    FFV1 will only make the video stream marginally smaller with -g 1 (every frame a keyframe ,no temporal compression) . Temporal compression is generally where a lot of the reduction in filesize comes from for video
    I did some post-processing in the Avisynth such as resizing, cropping, deinterlacing with QTGMC...etc.
    Here is my Avisynth script:

    SetFilterMTMode("QTGMC",2)
    FFmpegSource2("asia17A.avi", atrack=1)
    ConvertToYV12(interlaced=true)
    AssumeTFF()
    QTGMC(Preset="medium",Edithreads=2)
    BilinearResize(720,540)
    Crop(0,0,0,-6)
    Spline16Resize(720,540)
    Prefetch(10)

    Yes, the Hffyuv is a lossless compression. However, I need to apply post-processing filters to make it better. I try to open the script with Virtualdub 1.9.1.1 but it fails.
    Quote Quote  
  7. Originally Posted by rgia View Post
    I try to open the script with Virtualdub 1.9.1.1 but it fails.
    "fails" in what way ?

    Post the error message

    I assume everything is x86 ? avisynth+ , vdub
    Quote Quote  
  8. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by rgia View Post
    Originally Posted by davexnet View Post
    Are you trying to learn FFmpeg/batch processing or are you trying to compress your file?
    If it's to compress the file, use Virtualdub2. Open the source, video/compression set the output codec.
    Audio/full processing/compression set output codec.

    to troubleshoot the batch file, first make sure the command works outside of the batch file
    by copy and pasting it into the command window
    I'm trying to learn FFMPEG/batch processing. The syntax does not work when I put it in the command window.
    It works as-is when I tried it. Make sure your script opens and plays in virtualdub2
    Quote Quote  
  9. Member
    Join Date
    Apr 2019
    Location
    USA
    Search Comp PM
    Image
    [Attachment 53431 - Click to enlarge]
    Originally Posted by poisondeathray View Post
    Originally Posted by rgia View Post
    I try to open the script with Virtualdub 1.9.1.1 but it fails.
    "fails" in what way ?

    Post the error message

    I assume everything is x86 ? avisynth+ , vdub
    I placed everything in the program file (x86) folder. And here is the error message.
    Quote Quote  
  10. Member
    Join Date
    Apr 2019
    Location
    USA
    Search Comp PM
    Originally Posted by davexnet View Post
    Originally Posted by rgia View Post
    Originally Posted by davexnet View Post
    Are you trying to learn FFmpeg/batch processing or are you trying to compress your file?
    If it's to compress the file, use Virtualdub2. Open the source, video/compression set the output codec.
    Audio/full processing/compression set output codec.

    to troubleshoot the batch file, first make sure the command works outside of the batch file
    by copy and pasting it into the command window
    I'm trying to learn FFMPEG/batch processing. The syntax does not work when I put it in the command window.
    It works as-is when I tried it. Make sure your script opens and plays in virtualdub2
    Virtualdub does not recognize the "test.avs" file I created. I clicked on "run script" in Virtualdub, then I searched for the "test.avs" file, but then I don't see the "test.avs" file anywhere through VirtualDub. I had to, in the dropdown list, click on "All Files (*.*) to be able to see the "test.avs" but then it fails to load the script file. The error message I attached in here too.
    Quote Quote  
  11. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by rgia View Post
    Originally Posted by davexnet View Post
    Originally Posted by rgia View Post
    Originally Posted by davexnet View Post
    Are you trying to learn FFmpeg/batch processing or are you trying to compress your file?
    If it's to compress the file, use Virtualdub2. Open the source, video/compression set the output codec.
    Audio/full processing/compression set output codec.

    to troubleshoot the batch file, first make sure the command works outside of the batch file
    by copy and pasting it into the command window
    I'm trying to learn FFMPEG/batch processing. The syntax does not work when I put it in the command window.
    It works as-is when I tried it. Make sure your script opens and plays in virtualdub2
    Virtualdub does not recognize the "test.avs" file I created. I clicked on "run script" in Virtualdub, then I searched for the "test.avs" file, but then I don't see the "test.avs" file anywhere through VirtualDub. I had to, in the dropdown list, click on "All Files (*.*) to be able to see the "test.avs" but then it fails to load the script file. The error message I attached in here too.
    Open Virtualdub and drag the script icon into the window, or file/open video (not "run script")
    Quote Quote  
  12. Member
    Join Date
    Apr 2019
    Location
    USA
    Search Comp PM
    Image
    [Attachment 53432 - Click to enlarge]
    Originally Posted by davexnet View Post
    Originally Posted by rgia View Post
    Originally Posted by davexnet View Post
    Originally Posted by rgia View Post
    Originally Posted by davexnet View Post
    Are you trying to learn FFmpeg/batch processing or are you trying to compress your file?
    If it's to compress the file, use Virtualdub2. Open the source, video/compression set the output codec.
    Audio/full processing/compression set output codec.

    to troubleshoot the batch file, first make sure the command works outside of the batch file
    by copy and pasting it into the command window
    I'm trying to learn FFMPEG/batch processing. The syntax does not work when I put it in the command window.
    It works as-is when I tried it. Make sure your script opens and plays in virtualdub2
    Virtualdub does not recognize the "test.avs" file I created. I clicked on "run script" in Virtualdub, then I searched for the "test.avs" file, but then I don't see the "test.avs" file anywhere through VirtualDub. I had to, in the dropdown list, click on "All Files (*.*) to be able to see the "test.avs" but then it fails to load the script file. The error message I attached in here too.
    Open Virtualdub and drag the script icon into the window, or file/open video (not "run script")
    I have verified that FFMPEG has been successfully installed in the system. I don't know why I got this error message.
    Quote Quote  
  13. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Post the full script
    Quote Quote  
  14. Member
    Join Date
    Apr 2019
    Location
    USA
    Search Comp PM
    Originally Posted by davexnet View Post
    Post the full script

    SetFilterMTMode("QTGMC",2)
    FFmpegSource2("asia17A.avi", atrack=1)
    ConvertToYV12(interlaced=true)
    AssumeTFF()
    QTGMC(Preset="medium",Edithreads=2)
    BilinearResize(720,540)
    Crop(0,0,0,-6)
    Spline16Resize(720,540)
    Prefetch(10)
    Quote Quote  
  15. You need the ffms2.dll plugin for FFmpegSource2 for avisynth

    It's not the same thing as FFmpeg.exe

    Old versions required ffms2.avsi to define the FFmpegSource2 wrapper function, but I think it's bundled with the .dll now
    Quote Quote  
  16. Member
    Join Date
    Apr 2019
    Location
    USA
    Search Comp PM
    Image
    [Attachment 53433 - Click to enlarge]
    Originally Posted by poisondeathray View Post
    You need the ffms2.dll plugin for FFmpegSource2 for avisynth

    It's not the same thing as FFmpeg.exe

    Old versions required ffms2.avsi to define the FFmpegSource2 wrapper function, but I think it's bundled with the .dll now
    Here is the picture showing components inside my Avisynth+ folder. I have the ffms2.dll you just mentioned.
    Quote Quote  
  17. Member
    Join Date
    Apr 2019
    Location
    USA
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by rgia View Post
    I try to open the script with Virtualdub 1.9.1.1 but it fails.
    "fails" in what way ?

    Post the error message

    I assume everything is x86 ? avisynth+ , vdub
    Silly question, do I need to move all the Vdub's components into the Avisynth+ folder??
    Quote Quote  
  18. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by rgia View Post
    Originally Posted by poisondeathray View Post
    Originally Posted by rgia View Post
    I try to open the script with Virtualdub 1.9.1.1 but it fails.
    "fails" in what way ?

    Post the error message

    I assume everything is x86 ? avisynth+ , vdub
    Silly question, do I need to move all the Vdub's components into the Avisynth+ folder??
    No just put ffms2.dll in the avisynth plugins folder
    Quote Quote  
  19. Member
    Join Date
    Apr 2019
    Location
    USA
    Search Comp PM
    Thank you, guys!! I literally had to uninstall everything (AVIsynth, Virtualdub) and reinstalled them to make it work. I finally got it to work.
    May I ask if you guys have ever compressed uncompressed 10-bit MOV files to lossless AVI HUFFYUV using FFMPEG batch files?
    Quote Quote  
  20. Originally Posted by rgia View Post
    May I ask if you guys have ever compressed uncompressed 10-bit MOV files to lossless AVI HUFFYUV using FFMPEG batch files?
    Why huffyuv ? most huffyuv versions do not support 10bit . eg. ffmpeg -c:v huffyuv does not

    ffvhuff , ffv1 support 10bit . As does x264,x265 lossless
    Quote Quote  
  21. Member
    Join Date
    Apr 2019
    Location
    USA
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by rgia View Post
    May I ask if you guys have ever compressed uncompressed 10-bit MOV files to lossless AVI HUFFYUV using FFMPEG batch files?
    Why huffyuv ? most huffyuv versions do not support 10bit . eg. ffmpeg -c:v huffyuv does not

    ffvhuff , ffv1 support 10bit . As does x264,x265 lossless
    I did not know that. Thank you for telling me. Right now I have uncompressed 10-bit MOV files that are huge in size. If I want to compress them using lossless codecs with the FFMPEG command line, can you take a look at this command line and correct it if it's written wrong? I'd appreciate your help.

    for %%a in ("*.mov") do ffmpeg -i "%%a" -vcodec ffv1 -c:v libx264 -preset slow -crf 0 -c:a flac -b:a 256k "output.mkv"
    Quote Quote  
  22. Originally Posted by rgia View Post

    for %%a in ("*.mov") do ffmpeg -i "%%a" -vcodec ffv1 -c:v libx264 -preset slow -crf 0 -c:a flac -b:a 256k "output.mkv"
    You have 2 codecs specified (ffv1 and libx264), and for flac audio you do not need to specify a bitrate

    You need to change the output name, otherwise the batch will overwrite "output.mkv" each time

    For ffmpeg libx264 you need to specify the pixel format used for the encoding, what kind of MOV is it ? 10bit RGB, 10bit422 YUV ?

    Otherwise you can use ffv1 instead, and it will automatically pick the source pixel format

    Code:
    for %%a in ("*.mov") do ffmpeg -i "%%a" -pix_fmt xxxxx -c:v libx264 -preset slow -crf 0 -c:a flac "%%~na.mkv"
    Code:
    for %%a in ("*.mov") do ffmpeg -i "%%a"-c:v ffv1 -c:a flac "%%~na.mkv"
    Quote Quote  
  23. Member
    Join Date
    Apr 2019
    Location
    USA
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by rgia View Post

    for %%a in ("*.mov") do ffmpeg -i "%%a" -vcodec ffv1 -c:v libx264 -preset slow -crf 0 -c:a flac -b:a 256k "output.mkv"
    You have 2 codecs specified (ffv1 and libx264), and for flac audio you do not need to specify a bitrate

    You need to change the output name, otherwise the batch will overwrite "output.mkv" each time

    For ffmpeg libx264 you need to specify the pixel format used for the encoding, what kind of MOV is it ? 10bit RGB, 10bit422 YUV ?

    Otherwise you can use ffv1 instead, and it will automatically pick the source pixel format

    Code:
    for %%a in ("*.mov") do ffmpeg -i "%%a" -pix_fmt xxxxx -c:v libx264 -preset slow -crf 0 -c:a flac "%%~na.mkv"
    Code:
    for %%a in ("*.mov") do ffmpeg -i "%%a"-c:v ffv1 -c:a flac "%%~na.mkv"
    I appreciate your correction and clarification. My captured MOV files are 10-bit Component 422 YCbCr. I believe they are 422 YUV.
    Quote Quote  
  24. Originally Posted by rgia View Post
    My captured MOV files are 10-bit Component 422 YCbCr. I believe they are 422 YUV.
    Then you would use -pix_fmt yuv422p10le

    You can confirm with ffmpeg -i input.mov for one of the input files and read the console. It should say "v210" and yuv422p10le

    (old versions of ffmpeg would default to 8bit 4:2:0 encoding for libx264 if you did not include -pix_fmt; but it looks like you do not need to include -pix_fmt yuv422p10le for newer versions; but it doesn't hurt to include it )
    Quote Quote  
  25. Member
    Join Date
    Apr 2019
    Location
    USA
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by rgia View Post
    My captured MOV files are 10-bit Component 422 YCbCr. I believe they are 422 YUV.
    Then you would use -pix_fmt yuv422p10le

    You can confirm with ffmpeg -i input.mov for one of the input files and read the console. It should say "v210" and yuv422p10le

    (old versions of ffmpeg would default to 8bit 4:2:0 encoding for libx264 if you did not include -pix_fmt; but it looks like you do not need to include -pix_fmt yuv422p10le for newer versions; but it doesn't hurt to include it )
    Thank you so much. I successfully converted one MOV files into MKV files. By the way, I'm also trying to convert these 10-bit 422YUV files into MPEG-2 DVDs. Could you suggest a command line for such a task? All my captured MOV files have a resolution of 720x486. I'm trying to convert them to DVDs with specifications as followed:
    9800kb/s for video bitrates.
    AC-3 PCM
    About the 8/10 bit, I'm not sure if a DVD can take 10-bit 422 as most DVDs that I inspected are 8-bit YUV 420 Planar. I'm looking forwards to being taught/guided on this, because this may be my final format that I am going to stick to. I appreciate your time a lot.
    Quote Quote  
  26. Originally Posted by rgia View Post
    Thank you so much. I successfully converted one MOV files into MKV files. By the way, I'm also trying to convert these 10-bit 422YUV files into MPEG-2 DVDs. Could you suggest a command line for such a task? All my captured MOV files have a resolution of 720x486. I'm trying to convert them to DVDs with specifications as followed:
    9800kb/s for video bitrates.
    AC-3 PCM
    About the 8/10 bit, I'm not sure if a DVD can take 10-bit 422 as most DVDs that I inspected are 8-bit YUV 420 Planar. I'm looking forwards to being taught/guided on this, because this may be my final format that I am going to stick to. I appreciate your time a lot.
    MPEG2 for DVD is 8bit 4:2:0 only

    NTSC DVD cannot take 486 height, you'd have to crop or resize to 720x480



    Are these interlaced contents ? Such as home video ? Or something else like a film/movie or TV series ?

    If it was progressive content , such as film, ffmpeg 's mpeg2 encoder cannot add soft pulldown

    And FFmpeg's mpeg2 encoder is not very good , I'd avoid this scenario for DVD
    Quote Quote  
  27. Originally Posted by rgia View Post
    9800kb/s for video bitrates.
    AC-3 PCM
    That probably won't work. 9800 max? Or average? Or are you planning on a Constant BitRate? Unless the videos are short (less than an hour, maybe), CBR's not a good idea. AC-3 PCM? You'd better have a look at What Is DVD.

    Total bitrate including video, audio and subs can be max 10.08 Mbit/s (10080 Kbit/s)
    Quote Quote  
  28. Member
    Join Date
    Apr 2019
    Location
    USA
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by rgia View Post
    Thank you so much. I successfully converted one MOV files into MKV files. By the way, I'm also trying to convert these 10-bit 422YUV files into MPEG-2 DVDs. Could you suggest a command line for such a task? All my captured MOV files have a resolution of 720x486. I'm trying to convert them to DVDs with specifications as followed:
    9800kb/s for video bitrates.
    AC-3 PCM
    About the 8/10 bit, I'm not sure if a DVD can take 10-bit 422 as most DVDs that I inspected are 8-bit YUV 420 Planar. I'm looking forwards to being taught/guided on this, because this may be my final format that I am going to stick to. I appreciate your time a lot.
    MPEG2 for DVD is 8bit 4:2:0 only

    NTSC DVD cannot take 486 height, you'd have to crop or resize to 720x480



    Are these interlaced contents ? Such as home video ? Or something else like a film/movie or TV series ?

    If it was progressive content , such as film, ffmpeg 's mpeg2 encoder cannot add soft pulldown

    And FFmpeg's mpeg2 encoder is not very good , I'd avoid this scenario for DVD
    My tapes are retail tapes. They are movies/Television series. I don't have homemade videos.
    The reason I'm asking for this is that i purchased professionally produced DVDs (retail DVDs) and I compared their picture quality with my raw uncompressed MOV files. I notice my uncompressed MOv files quality = their retail DVDs. Then I assume they muat have w way to convert these files to dvds. I also notice their video bitrates are super high: 9500/9800 kbs. Even the best DVD RECORDER LIKE JVC and TOSHIBA XS34...can't obtain this high bitrate. I can upload a portion of their retail DVD so you can see their quality vs my uncompressed Mov files. Other tha Ffmpeg, would you recommend any other programs that could create high quality DVDs? Please advise me. Thank you.
    Quote Quote  
  29. Member
    Join Date
    Apr 2019
    Location
    USA
    Search Comp PM
    Originally Posted by manono View Post
    Originally Posted by rgia View Post
    9800kb/s for video bitrates.
    AC-3 PCM
    That probably won't work. 9800 max? Or average? Or are you planning on a Constant BitRate? Unless the videos are short (less than an hour, maybe), CBR's not a good idea. AC-3 PCM? You'd better have a look at What Is DVD.

    Total bitrate including video, audio and subs can be max 10.08 Mbit/s (10080 Kbit/s)
    AC-3 is the compliant audio format for DVDs If I'm correct. I meant AC-3 not the AC3 PCM, my bad. Please see the attached picture. For DVDs. VBR is recommended, I believe. Not constant bitrate.
    Image
    [Attachment 53620 - Click to enlarge]
    Quote Quote  



Similar Threads