VideoHelp Forum
+ Reply to Thread
Results 1 to 18 of 18
Thread
  1. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    Hey folks, I was given a file that was taken from a Casio camcorder from mid 2000's, I believe it's called MOD format or something like that, See attached. I've already changed the extension to mpg in an attempt to solve the problem I'm writing about, The person shown in the video that just walked in has passed away last month and my friend wants to send it to his family.

    It's basically an anamorphic 16:9 720x480 4:2:0 mpeg-2 interlaced PG stream SD file with AC-3 48KHz 2ch stereo audio, My friend is trying to send it from his computer to an iPhone using CopyTrans and then over the phone to the family but CopyTrans wouldn't accept the format, Facebook only allows 50MB limit and he doesn't want to compress it any further, He doesn't want to use cloud services as well. So I suggested that to decompress it into base AVI and PCM audio, Do the de-interlacing and probably resizing to 1920x1080 or keep the same resolution and flag it for 16:9, then encode it to h.264 which I'm certain iPhone would recognize. Here is what I've done so far before I hit a brick wall.

    - I put it into vdub-2 and output as AVI 4:2:2 720x480 PCM audio
    - I put the resulting file into Avspmod and applied QTGMC fast setting, a resize to 1920x1080, The resulting file is about 4.5GB HuffYUV.
    - I put this file into vdub-2 again and choose full processing mode for both video and audio, I picked x.264 8-bit h.264/mpeg4 AVC codec for video and FFMpeg AAC and another iteration with AC-3 ACM codec.

    The resulting file from this is still contained in AVI wrapper, not sure why. both versions with aac and ac-3 audio still not recognized by iPhone but CopyTrans was able to load it, I changed the extension from AVI to mp4 but changed nothing.

    My main laptop I do the scripting with is down for an upgrade, The only computer running right know is returning an error saying ffmpeg command not recognized or something when I try to use this ffmpeg command on the 4.5GB file:

    Code:
    fmpeg -i FileIn.avi -vf setsar=sar=1/1 -c:v libx264 -crf 18 -x264opts colorprim=bt709:transfer=bt709:colormatrix=bt709:force-cfr -c:a aac -b:a 192k -movflags +faststart FileOut.mp4
    Any thoughts?
    Image Attached Files
    Quote Quote  
  2. Your commandline should start with ffmpeg rather than with fmpeg.
    Quote Quote  
  3. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    My attempt to simplify your flow

    run this code:

    Code:
    ffmpeg.exe -i "Tim & John.avs" -c:v libx264 -crf 17 -preset slow -aspect 16:9 -c:a aac -b:a 128k "Tim & Johna.mp4"
    where Tim & John.avs is the following:

    Code:
    # plugins directory
    plugins_dir="C:\Users\giuse\Documents\VideoSoft\MPEG\AviSynth\extFilters\"
    
    	# FFmpegSource
    loadPlugin(plugins_dir + "ffms2_87bae19\x86\ffms2.dll")
    
    	# QTGMC
    Import(plugins_dir + "QTGMC.avsi")
    	# Zs_RF_Shared
    Import(plugins_dir + "Zs_RF_Shared.avsi")
    	# MaskTools2
    loadPlugin(plugins_dir + "masktools2-v2.2.23\x86\masktools2.dll")
    	# RgTools
    loadPlugin(plugins_dir + "RgTools-v1.0\x86\RgTools.dll")
    	# MVTools
    loadPlugin(plugins_dir + "mvtools-2.7.41-with-depans20200430\x86\mvtools2.dll")
    	# Nnedi3
    loadPlugin(plugins_dir + "NNEDI3_v0_9_4_55\x86\Release_W7\nnedi3.dll")
    
    	# ColorMatrix
    LoadPlugin(plugins_dir + "ColorMatrix\ColorMatrix.dll")
    
    video_org=FFmpegSource2("Tim & John.mpg", atrack=-1)
    
    deinterlaced=video_org.assumeTFF().QTGMC(preset="fast")
    
    upscaled=deinterlaced.Colormatrix("Rec.601->Rec.709").nnedi3_rpow2(rfactor=2, nns=4, qual=2, cshift="Spline36Resize", fwidth=1920, fheight=1080)
    
    return(upscaled)
    No need to generate the intermadiate .avi file, ffmpeg is fed with the AviSynth script.
    You have to point to your own plugin directory, if any, or have the required luginds in the autoload dir.
    Eventually in nnedi3_rpow2 change rfactor=2 to rfactor=4 if you prefere.
    Replace the aac audio codec and its bitrate with whatever you prefere, if needed.

    A small sample attached
    Image Attached Files
    Quote Quote  
  4. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Virtual Dub 2 settings:

    Deinterlace Yadif double frame rate TFF

    Resized to 852x480

    Audio Full Processing mode

    "Save video.." using 8bit X264 option, SAR 1:1, Audio as AAC and "MP4 Faststart" as the "Save as type".

    Result is an Apple-compliant file.

    I use Photosync to transfer media to and from rotten apples.
    Last edited by Alwyn; 22nd Feb 2023 at 20:47.
    Quote Quote  
  5. MOD is basically a DVD-compliant PS file with either incorrect or proprietary AR. The camcorder has additional files that AFAIK indicate to the proprietary software the correct AR.

    What is the point of the intermediate Huffyuv step? VDub2 allows to save into containers other than AVI, including MOV, MP4 and MKV. I would do something similar to what Alwyn did.
    Quote Quote  
  6. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    What is the point of the intermediate Huffyuv step?
    Because it allows one to run QTGMC without splitting up the MPEG into D2V or whatever the video-only stream is called after running DGIndex?
    Quote Quote  
  7. Originally Posted by Alwyn View Post
    What is the point of the intermediate Huffyuv step?
    Because it allows one to run QTGMC without splitting up the MPEG into D2V or whatever the video-only stream is called after running DGIndex?
    Ah, missed that. Thanks!
    Quote Quote  
  8. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    Thank you guys, The ffmpeg was just a typo, I have the full word in the script, But since I can’t run the script on this computer I have to go the vdub way, as stated, why vdub plugin keeps the AVI container?
    Quote Quote  
  9. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Originally Posted by Dellsham
    why vdub plugin keeps the AVI container?
    What do you mean, "plugin"?

    You set the container on export/Save Video..., as I described above. It defaults to AVI, even though you are using x264. You have to choose "MP4 Faststart" from the "type" dropdown.
    Quote Quote  
  10. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    Your vdub must be different than mine, I don't have the option to choose the mp4 container, When I click on the codec configure button there is no option for container, I'm not familiar with vdub encoding as I don't use it, so I must be missing something, I guess I have to get the laptop ready and use ffmpeg script.
    On this computer I'm getting this message, so I'm assuming is some dependency file is missing:
    Code:
    'ffmpeg' is not recognized as an internal or external command,
    operable program or batch file.
    Quote Quote  
  11. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    I have the 43382 build. I just downloaded to the latest 64bit build 35491 and still no option for container.
    Image Attached Thumbnails Click image for larger version

Name:	save.png
Views:	20
Size:	16.6 KB
ID:	69391  

    Last edited by dellsam34; 23rd Feb 2023 at 04:09.
    Quote Quote  
  12. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    VDub2 44282 is available in the Software area.

    Unzip the zip and run Virtualdub.exe
    Quote Quote  
  13. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    Thanks, I see now.
    Quote Quote  
  14. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    ......
    Quote Quote  
  15. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Originally Posted by dellsam34 View Post
    On this computer I'm getting this message, so I'm assuming is some dependency file is missing:
    Code:
    'ffmpeg' is not recognized as an internal or external command,
    operable program or batch file.
    Use the full path, i.e. c:\Programs\...\ffmpeg...\ffmpeg.exe
    Quote Quote  
  16. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    I found out that the ffmpeg file was in another folder, not in the usual C:\location, I just copied and pasted it to the location of the video without specifying the path and it worked, Thank you all for the refreshing ideas.
    Quote Quote  
  17. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    I just copied and pasted it to the location of the video without specifying the path and it worked
    Good, so you can now have the full power and quality of AviSynth deinterlace (QTGMC) and upscale (Nnedi3), together with a full control of what AviSynth and ffmpeg are doing

    I watched the generated file on my Iphone 13 Pro Max through this forum and it is ok
    Quote Quote  



Similar Threads

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