VideoHelp Forum


Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 36
Thread
  1. I have a bunch of old DV files that I transferred years ago on a mac. I don't remember what program I used but for some reason the file extension is .dv rather than .mov (or .avi).

    I am trying to open them in AviSynth with audio using FFMPEGSource2("samplevideo.dv", atrack=-1)

    The short version is, something doesn't like these .dv files when I bring the audio track in and it's crashing if I try to frameserve to VirtualDub or use ffmpeg to convert my AVS to MP4. (If I leave atrack=-1 out and just do video, all is fine.) However, if I rewrap the .dv file using ffmpeg like this...

    ffmpeg -i samplevideo.dv -vcodec copy -acodec copy output.mov

    ...everything works just fine replacing samplevideo.dv with output.mov in my AviSynth script.

    I was able to get the mysterious .dv files to open with audio using QTinput but I know this is old and only runs in 32 bit, and I'm not sure if there are any other drawbacks to it besides that (although I was working with everything in 64 bit prior).

    I have a lot of these .dv files and it would be time consuming to rewrap them all to .mov files, but at least I know it works. So I'm wondering if anyone knows why this might be happening, if there's anything I need to know about QTinput as my other option, or any other ideas to try to get ffmpegsource2 to work with the .dv files without rewrapping.

    Here are all the details pertaining to the above:

    VirtualDub error: AviSynth read error: CAVIStreamSynth: System exception - Access Violation at 0x63E37DA4.

    FFMPEG in the command prompt: FFMPEG just crashes with message: ffmpeg.exe has stopped working.

    Here are the details from MediaInfo for the .dv file:

    Video
    Format : DV
    Commercial name : DVCPRO
    Duration : 27 min 35 s
    Bit rate mode : Constant
    Bit rate : 24.4 Mb/s
    Width : 720 pixels
    Height : 480 pixels
    Display aspect ratio : 4:3
    Frame rate mode : Constant
    Frame rate : 29.970 (29970/1000) FPS
    Standard : NTSC
    Color space : YUV
    Chroma subsampling : 4:1:1
    Bit depth : 8 bits
    Scan type : Interlaced
    Scan order : Bottom Field First
    Compression mode : Lossy
    Bits/(Pixel*Frame) : 2.357
    Stream size : 4.70 GiB (85%)

    Audio #1
    ID : 0
    Format : PCM
    Format settings : Big / Signed
    Duration : 27 min 35 s
    Bit rate mode : Constant
    Bit rate : 768 kb/s
    Channel(s) : 2 channels
    Sampling rate : 32.0 kHz
    Bit depth : 12 bits
    Stream size : 152 MiB (3%)

    Audio #2
    ID : 1
    Format : PCM
    Format settings : Big / Signed
    Duration : 27 min 35 s
    Bit rate mode : Constant
    Bit rate : 768 kb/s
    Channel(s) : 2 channels
    Sampling rate : 32.0 kHz
    Bit depth : 12 bits
    Stream size : 152 MiB (3%)
    After I rewrap the .dv file to .mov with ffmpeg using same codecs:

    Video
    ID : 1
    Format : DV
    Commercial name : DVCPRO
    Codec ID : dvc
    Duration : 27 min 35 s
    Bit rate mode : Constant
    Bit rate : 24.4 Mb/s
    Width : 720 pixels
    Height : 480 pixels
    Display aspect ratio : 4:3
    Frame rate mode : Constant
    Frame rate : 29.970 (30000/1001) FPS
    Original frame rate : 29.970 (29970/1000) FPS
    Standard : NTSC
    Color space : YUV
    Chroma subsampling : 4:1:1
    Bit depth : 8 bits
    Scan type : Interlaced
    Scan order : Bottom Field First
    Compression mode : Lossy
    Bits/(Pixel*Frame) : 2.357
    Stream size : 4.70 GiB (82%)

    Audio #1
    ID : 2
    Format : PCM
    Format settings : Little / Signed
    Codec ID : sowt
    Duration : 27 min 34 s
    Bit rate mode : Constant
    Bit rate : 1 024 kb/s
    Channel(s) : 2 channels
    Channel layout : L R
    Sampling rate : 32.0 kHz
    Bit depth : 16 bits
    Stream size : 202 MiB (3%)
    Default : Yes
    Alternate group : 1

    Audio #2
    ID : 1-0
    Format : PCM
    Format settings : Big / Signed
    Muxing mode : DV
    Muxing mode, more info : Muxed in Video #1
    Duration : 27 min 35 s
    Bit rate mode : Constant
    Bit rate : 768 kb/s
    Channel(s) : 2 channels
    Sampling rate : 32.0 kHz
    Bit depth : 12 bits
    Stream size : 152 MiB (3%)

    Audio #3
    ID : 1-1
    Format : PCM
    Format settings : Big / Signed
    Muxing mode : DV
    Muxing mode, more info : Muxed in Video #1
    Duration : 27 min 35 s
    Bit rate mode : Constant
    Bit rate : 768 kb/s
    Channel(s) : 2 channels
    Sampling rate : 32.0 kHz
    Bit depth : 12 bits
    Stream size : 152 MiB (3%)

    Other
    ID : 3
    Type : Time code
    Format : QuickTime TC
    Duration : 27 min 35 s
    Frame rate : 29.970 (30000/1001) FPS
    Time code of first frame : 00:00:00;00
    Time code, striped : Yes
    Language : English
    Default : No
    I realize this is a bit obscure but... any ideas?
    Quote Quote  
  2. This is type2 dv, where the audio is in separate tracks . Sometimes the audio is "blank". You have to listen or look at audio waveform to find out. Decide what you want to do with it and load it in the script with FFAudioSource track=1, track=2 . It might be track 1 is mute, or maybe track 2

    eg. return video with 1st stereo track

    Code:
    aud1=FFAudioSource("input.dv",track=1)
    aud2=FFAudioSource("input.dv",track=2)
    vid=FFVideoSource("input.dv")
    audiodub(vid,aud1)
    You might be able to discard 1 track, depending on what it is

    QTInput should be fine, although it won't return the original colorspace. But default it will upsample to 4:2:2, I'm not sure if it does it correctly (interlaced vs. progressive), or what algorithm it uses. One advantage is no indexing.
    Quote Quote  
  3. Originally Posted by poisondeathray View Post
    This is type2 dv, where the audio is in separate tracks . Sometimes the audio is "blank". You have to listen or look at audio waveform to find out. Decide what you want to do with it and load it in the script with FFAudioSource track=1, track=2 . It might be track 1 is mute, or maybe track 2

    eg. return video with 1st stereo track

    Code:
    aud1=FFAudioSource("input.dv",track=1)
    aud2=FFAudioSource("input.dv",track=2)
    vid=FFVideoSource("input.dv")
    audiodub(vid,aud1)
    You might be able to discard 1 track, depending on what it is
    Tried this and it crashed regardless if I used aud1 or aud2 with audiodub. And it's not just saying there is no audio stream. It completely crashes.

    QTInput should be fine, although it won't return the original colorspace. But default it will upsample to 4:2:2, I'm not sure if it does it correctly (interlaced vs. progressive), or what algorithm it uses. One advantage is no indexing.
    Ok well this is good to know as another option. Is there a way to get it to return the original colorspace? Original files are interlaced.
    Quote Quote  
  4. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Don't know how/whether it affects things, but I notice that original stream is Big-Endian, while newly-added type2 audio in container (now track 1) is Little-Endian.


    Scott
    Quote Quote  
  5. Big-Endian works ok for me on DV stream

    What version of ffms2 ?

    Try this one
    http://forum.doom9.net/showthread.php?p=1928993#post1928993
    https://cloud.owncube.com/s/g35T64mo6SNQBpF
    Quote Quote  
  6. Originally Posted by Christina View Post

    Ok well this is good to know as another option. Is there a way to get it to return the original colorspace? Original files are interlaced.
    Not according to the readme for QTSource

    Code:
    color - output colorspace (default = 2)
        0 = RGB24
        1 = RGB32
        2 = YUY2
    Quote Quote  
  7. Originally Posted by poisondeathray View Post
    Big-Endian works ok for me on DV stream

    What version of ffms2 ?

    Try this one
    http://forum.doom9.net/showthread.php?p=1928993#post1928993
    https://cloud.owncube.com/s/g35T64mo6SNQBpF
    I actually don't know how to tell. The ffms2.dll file has a date of 8/22/20 which corresponds to the release date of the most recent official build v2.4. I could try the one you sent (the most recent unofficial build, v2.87) but for some reason I am not too hopeful! :/
    Quote Quote  
  8. It probably won't make a difference, those builds are only months apart. Or you can try lsmash

    What is the crash exactly ? Does it crash as soon as you open it up in vdub2 ?

    The .avs should return 16bit audio (upconverted from 12bit), and 32Khz. If you feed that to something that expects 44.1 or 48 Khz , that might crash. If that's the case, try adding SSRC(48000)

    Or there might be something peculiar about your specific files, if you want to upload a sample I can take a look
    Quote Quote  
  9. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    if it were me, i'd redo the tape captures over again using windows. apple dv captures were always problematic when transferred to windows. they are usually "raw" and not avi, that's why they have a .dv extension.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  10. Unfortunately, the OP left out the General section of the MediaInfo reports that show the container (or lack thereof). But I find that a quick mux of raw dv from a Mac to DV AVI with ffmpeg works fine:

    Code:
    ffmpeg -i raw.dv -c copy raw.avi
    The result is a type 2 DV AVI. I've only used it for 48 KHz, 16 bit DV audio though.
    Quote Quote  
  11. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Multiple streams of audio in 32kHz mode might make this (mux/remux) more complicated.


    Scott
    Quote Quote  
  12. Originally Posted by jagabo View Post
    Unfortunately, the OP left out the General section of the MediaInfo reports that show the container (or lack thereof). But I find that a quick mux of raw dv from a Mac to DV AVI with ffmpeg works fine:

    Code:
    ffmpeg -i raw.dv -c copy raw.avi
    The result is a type 2 DV AVI. I've only used it for 48 KHz, 16 bit DV audio though.
    Here is the General Section from MediaInfo:

    Code:
    Complete name : C:\Users\user\Videos\DV Test\samplevideo.dv 
    Format : DV 
    Commercial name : DVCPRO 
    File size : 5.54 GiB 
    Duration : 27 min 35 s 
    Overall bit rate mode : Constant 
    Overall bit rate : 28.8 Mb/s
    I wasn't sure if it mattered that I had transferred these dv files using a mac, so I had done the same thing you did with ffmpeg except I wrapped in .mov container, and that worked as well. I was just trying to understand why it was happening and see if there are any other workarounds since I have a LOT of these files and while rewrapping with ffmpeg isn't super time consuming, it was a step I was just trying to avoid.

    QTinput seems to work in place of FFMPEGSource2 on the original .dv file so I was wondering if I should just use that rather than rewrapping everything. Poisondeathray was explaining (on another post about QTInput) that it should be fine, except by default it automatically upscales the chroma to 4:2:2 and wasn't sure if it created any problems in doing so, depending on if video was interlaced or progressive among other things. I likely would be saving a copy to ProRes so 4:2:2 would actually be a good thing here, but I just don't know if it's doing any harm in its default upscale method.

    Originally Posted by poisondeathray
    What is the crash exactly ? Does it crash as soon as you open it up in vdub2 ?

    The .avs should return 16bit audio (upconverted from 12bit), and 32Khz. If you feed that to something that expects 44.1 or 48 Khz , that might crash. If that's the case, try adding SSRC(48000)

    Or there might be something peculiar about your specific files, if you want to upload a sample I can take a look
    I posted the actual crash message in the original post but it doesn't occur until I hit play in VirtualDub. It loads the file ok, I see the preview of the first frame, but as soon as I hit play, I get the error message.

    If I am trying to process my AVS script using ffmpeg, it just crashes ffmpeg as soon as it starts to process the file.

    There just must be something in the header (or lack thereof) that FFMPEGSource2 doesn't like with the audio, since remuxing to a .mov works fine.

    I'd be happy to send you a sample but I can't figure out a good way to trim a section out without "fixing" the file in the process. If I try to trim a section out using ffmpeg with an output file of .dv, it gives me an error. If I mux to .mov, we already know that fixes the problem. How can I extract a sample of the original file without changing it?

    Originally Posted by aedipuss
    if it were me, i'd redo the tape captures over again using windows. apple dv captures were always problematic when transferred to windows. they are usually "raw" and not avi, that's why they have a .dv extension.
    Thanks but this doesn't seem necessary since remuxing the file with ffmpeg works just fine, if I take that route.
    Quote Quote  
  13. Not sure; it works for me on .dv files with similar audio

    You can cut with mpegstreamclip (I, O keys to mark in/out, File => export to DV) , but you might need the QT Pro version installed , not sure if the free QT version will work

    The other option is to not include audio in the script (no reason to unless you're performing audio processing in avisynth), and include it in ffmpeg using -map (and you can choose which audio track or channels or mix)

    ffmpeg -i input.avs -i input.dv -map 0:0 -map 1:1 -ar 48000 .... (for 1st audio stereo track)

    QTInput should be ok too. 4:1:1 to 4:2:2 isn't at risk of interlaced chroma upsampling issues, because it's a horizontal resample, not vertical, but you might prefer other upsampling methods
    Quote Quote  
  14. Originally Posted by poisondeathray View Post
    Not sure; it works for me on .dv files with similar audio

    You can cut with mpegstreamclip (I, O keys to mark in/out, File => export to DV) , but you might need the QT Pro version installed , not sure if the free QT version will work
    That seemed to work ok, and I tested on the file and it still doesn't work, although now it is giving me a different error in VirtualDub so the process did change something about the file. Now the vdub error I get is "Avisynth read error: CAVIStreamSynth: unhandled C++ exception". I attached the file here anyway if you want to take a look. The MediaInfo looks the same as the original from what I can see but the resulting vdub error is different so I don't know...

    The other option is to not include audio in the script (no reason to unless you're performing audio processing in avisynth), and include it in ffmpeg using -map (and you can choose which audio track or channels or mix)
    Ehhh, I'm not processing the audio but I will probably be trimming and adding titles, so remuxing audio after would not be ideal. I'd rather stick with one of the other fixes we've talked about so far.

    QTInput should be ok too. 4:1:1 to 4:2:2 isn't at risk of interlaced chroma upsampling issues, because it's a horizontal resample, not vertical, but you might prefer other upsampling methods
    I may just end up using this on the .dv files I have to avoid remuxing every file. Or maybe I'll try it both ways and see if I notice any differences. I am not really clear on the various upsampling methods anyway, and would probably just be adding ConverttoYV16(interlaced=true) anyhow.

    PS. I tried LSMASH and that couldn't open either the video or the audio stream.
    Image Attached Files
    Last edited by Christina; 2nd Mar 2021 at 10:38. Reason: PS
    Quote Quote  
  15. Works ok for me

    Code:
    aud=FFAudioSource("sampledv.dv",track=1)
    vid=FFVideoSource("sampledv.dv")
    AudioDub(vid,aud)
    ConvertAudioToFloat()
    SSRC(48000)
    Works in ffmpeg, vdub2, mpchc

    ffms2 is the version listed above, and avs+ x64 3.7.0 r3382




    Or if you wanted to use QTGMC and 4:2:2 output for Prores

    Code:
    aud=FFAudioSource("sampledv.dv",track=1)
    vid=FFVideoSource("sampledv.dv")
    AudioDub(vid,aud)
    ConvertToYV16(interlaced=true)
    QTGMC()
    ConvertBits(10)
    ConvertAudioToFloat()
    SSRC(48000)
    prefetch(8)
    Quote Quote  
  16. Originally Posted by Christina View Post
    PS. I tried LSMASH and that couldn't open either the video or the audio stream.
    This works for me with your sample.
    Code:
    a = LWLibavAudioSource("sampledv.dv") 
    v = LWLibavVideoSource("sampledv.dv", format="YUY2") 
    AudioDub(v,a)
    Info()
    The audio is 32 KHz so you may want to convert to 48KHz.

    Image
    [Attachment 57594 - Click to enlarge]
    Quote Quote  
  17. Originally Posted by poisondeathray View Post
    Works ok for me

    Code:
    aud=FFAudioSource("sampledv.dv",track=1)
    vid=FFVideoSource("sampledv.dv")
    AudioDub(vid,aud)
    ConvertAudioToFloat()
    SSRC(48000)
    Works in ffmpeg, vdub2, mpchc

    ffms2 is the version listed above, and avs+ x64 3.7.0 r3382

    Or if you wanted to use QTGMC and 4:2:2 output for Prores

    Code:
    aud=FFAudioSource("sampledv.dv",track=1)
    vid=FFVideoSource("sampledv.dv")
    AudioDub(vid,aud)
    ConvertToYV16(interlaced=true)
    QTGMC()
    ConvertBits(10)
    ConvertAudioToFloat()
    SSRC(48000)
    prefetch(8)
    OK so I finally figured out the thing that's causing an issue for me. TRIMMING.

    It's because for my testing I was trimming out a portion of the file since the original is so long. When I comment out the Trim(1000,2000) I don't get the error. Without trim, it also works without ConvertAudioToFloat() and SSRC(48000).

    I am unable to replicate the error in the short sample I uploaded here. That one works fine even if I add Trim(35,100) to it.

    Why would Trim() cause it to crash?

    Also, even without Trim(), in vdub I am unable to scrub. So the video plays fine if I play from the beginning but if I jump to another point, it crashes. This isn't really a big deal but I figured I would point it out.

    Trimming is pretty important to my process though so, any ideas?
    Quote Quote  
  18. Trim() shouldn't cause a crash, especially with DV (I-frame only)

    Maybe an issue with the source file , some errors at the trim points?

    Can you replicate the issue with loop(20) on the sample ?

    Code:
    aud=FFAudioSource("sampledv.dv",track=1)
    vid=FFVideoSource("sampledv.dv")
    AudioDub(vid,aud)
    Loop(20)
    Trim(1000,2000)
    This works ok for me


    What about other .dv files in that batch ? Try a random one, maybe the one you're testing is corrupted ?
    Quote Quote  
  19. Originally Posted by jagabo View Post
    Originally Posted by Christina View Post
    PS. I tried LSMASH and that couldn't open either the video or the audio stream.
    This works for me with your sample.
    Code:
    a = LWLibavAudioSource("sampledv.dv") 
    v = LWLibavVideoSource("sampledv.dv", format="YUY2") 
    AudioDub(v,a)
    Info()
    The audio is 32 KHz so you may want to convert to 48KHz.
    This worked on the original .dv file to open, but again, adding Trim() screws up the audio. It doesn't CRASH with this, but the audio is just a clicking static-y sound. Same result whether I open it in VirtualDub or actually make a file with ffmpeg.
    Quote Quote  
  20. Originally Posted by poisondeathray View Post
    Trim() shouldn't cause a crash, especially with DV (I-frame only)

    Maybe an issue with the source file , some errors at the trim points?

    Can you replicate the issue with loop(20) on the sample ?

    This works ok for me

    What about other .dv files in that batch ? Try a random one, maybe the one you're testing is corrupted ?
    Loop on the sample works for me too. I will have to try other files but what's weird is that Trim() doesn't cause any issues when I use QTInput. Something with FFMPEGSource2 just doesn't like something in my original file. So, assuming other files behave the same way, I think I'll probably just stick with QTInput since that seems to work ok, as long as I don't see anything funky happening with the chroma upscaling. Also, I will have to change my workflow to 32 bit which isn't a huge deal, right? Is QTGMC slower in 32 bit version? I suppose it doesn't matter if it solves all my other problems.
    Quote Quote  
  21. Originally Posted by Christina View Post
    Originally Posted by jagabo View Post
    Originally Posted by Christina View Post
    PS. I tried LSMASH and that couldn't open either the video or the audio stream.
    This works for me with your sample.
    Code:
    a = LWLibavAudioSource("sampledv.dv") 
    v = LWLibavVideoSource("sampledv.dv", format="YUY2") 
    AudioDub(v,a)
    Info()
    The audio is 32 KHz so you may want to convert to 48KHz.
    This worked on the original .dv file to open, but again, adding Trim() screws up the audio. It doesn't CRASH with this, but the audio is just a clicking static-y sound. Same result whether I open it in VirtualDub or actually make a file with ffmpeg.
    You're right. If the audio isn't accessed linearly from the start it gets screwed up.
    Quote Quote  
  22. Originally Posted by Christina View Post
    Loop on the sample works for me too. I will have to try other files but what's weird is that Trim() doesn't cause any issues when I use QTInput. Something with FFMPEGSource2 just doesn't like something in my original file. So, assuming other files behave the same way, I think I'll probably just stick with QTInput since that seems to work ok, as long as I don't see anything funky happening with the chroma upscaling. Also, I will have to change my workflow to 32 bit which isn't a huge deal, right? Is QTGMC slower in 32 bit version? I suppose it doesn't matter if it solves all my other problems.



    Use whatever works . Yes x86 will be slower for processing, and encoding step alone is slower too

    You can use most x86 plugins/filters including QTInput in x64 avisynth with mp_pipeline (or vice versa, x64 plugins in x86 avs host), but it does not pass audio - so not useful for your case

    QTInput uses point resampled chroma (nearest neighbor, "blocky" color edges) for the YUY2 4:2:2 upsampling. But it's probably not too bad for "normal" DV from a camera, because of noise and other factors that obscure the issue, but it's something to be aware of.
    Quote Quote  
  23. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    "clicking static-y sound" is how big-endian is often described when not interpreted correctly.


    Scott
    Quote Quote  
  24. Trim returns clicks on that sample with LSmash, but it's fine with ffms2

    trim + ffms2 works
    Code:
    aud=FFAudioSource("sampledv.dv")
    vid=FFVideoSource("sampledv.dv")
    AudioDub(vid,aud)
    Trim(25,0)
    trim + lsmash clicks
    Code:
    aud=LWLibavAudioSource("sampledv.dv")
    vid=LWLibavVideoSource("sampledv.dv")
    AudioDub(vid,aud)
    Trim(25,0)
    track 2 is silent in your example (blank audio) , and the 1st audio track is returned by default . But on other recordings you might want to utilize other tracks or channels
    Quote Quote  
  25. You mentioned crashing on the larger file only when audio was included with trimming -

    If it is ffms2 audio + trim on the larger file, then another option is bestaudiosource for the audio. It works ok for me too on the small sample + trim
    https://forum.doom9.org/showthread.php?t=177337

    aud = BestAudioSource("original.dv")





    Here are separated fields using ffms2 (bicubic from 4:1:1 to 4:2:2) and QTInput (default 4:2:2 output) . Both use bicubic for the 422=>RGB screenshot conversion . It's an apng and should animate in most browsers




    QTInput looks like it's using nearest neighbor. The 120 pixels for 4:1:1 CbCr width planes are duplicated to 240 width for the chroma for 4:2:2. ConvertToYUY2(interlaced=true) or ConvertToYV16(interlaced=true) uses bicubic by default . Bicubic means a 4x4 grid is used, resulting in smoother appearance, less blocky. In some situations you might prefer one or the other. You can specify chromaresample="blah" to use other resampling algorithms if you start with the original 4:1:1 color sampling . If you used ConvertToYV16(interlaced=true, chromaresample="point"), you get virtually the same thing as QTInput

    Of course this is a synthetic test. You're usually not going to have high contrast colors like this, and real world noise, and other artifacts will obscure the issues
    Quote Quote  
  26. Originally Posted by poisondeathray View Post
    Trim returns clicks on that sample with LSmash, but it's fine with ffms2

    trim + ffms2 works
    Code:
    aud=FFAudioSource("sampledv.dv")
    vid=FFVideoSource("sampledv.dv")
    AudioDub(vid,aud)
    Trim(25,0)
    trim + lsmash clicks
    Code:
    aud=LWLibavAudioSource("sampledv.dv")
    vid=LWLibavVideoSource("sampledv.dv")
    AudioDub(vid,aud)
    Trim(25,0)
    track 2 is silent in your example (blank audio) , and the 1st audio track is returned by default . But on other recordings you might want to utilize other tracks or channels
    I was able to trim the sample file with ffms2 but I still got the error when I tried on the original file.

    One last question for you - if I end up rewrapping to AVI and using AviSource to decode the file (rather than .mov and ffmpegsource2), can you tell me what that does to the chroma/colorspace? I tried doing that and Info() shows that it's YV12 without me doing any conversions in the script. I can add pixel_type="YUY2" but "YV16" doesn't work. This is the area I understand the least so forgive me, but if i am going to convert to ProRes, should I put pixel_type="YUY2" in AviSource line? And I assume if I am converting straight to x264/mp4 I should just leave defaults and stay in YV12?

    Thank you for all your help!
    Quote Quote  
  27. Originally Posted by Christina View Post

    One last question for you - if I end up rewrapping to AVI and using AviSource to decode the file (rather than .mov and ffmpegsource2), can you tell me what that does to the chroma/colorspace? I tried doing that and Info() shows that it's YV12 without me doing any conversions in the script. I can add pixel_type="YUY2" but "YV16" doesn't work. This is the area I understand the least so forgive me, but if i am going to convert to ProRes, should I put pixel_type="YUY2" in AviSource line? And I assume if I am converting straight to x264/mp4 I should just leave defaults and stay in YV12?
    AVISource() uses whatever VFW decoder you have installed on that system. So your decoder is outputting YV12, not the original 4:1:1

    When you convert to ProRes, it will automatically be upsampled to 10bit422 . You can do it in the script, or ffmpeg will automatically do it if you feed it something else

    You do not open ProRes with AVISource. AVISource is a source filter that cannot open .MOV
    Quote Quote  
  28. Originally Posted by poisondeathray View Post
    You mentioned crashing on the larger file only when audio was included with trimming -

    If it is ffms2 audio + trim on the larger file, then another option is bestaudiosource for the audio. It works ok for me too on the small sample + trim
    https://forum.doom9.org/showthread.php?t=177337

    aud = BestAudioSource("original.dv")

    Here are separated fields using ffms2 (bicubic from 4:1:1 to 4:2:2) and QTInput (default 4:2:2 output) . Both use bicubic for the 422=>RGB screenshot conversion . It's an apng and should animate in most browsers

    ...
    This was extremely helpful as well, thank you! I tried BestAudioSource and that works! Although it raised other questions I didn't know I had that are a bit off topic to this thread but maybe you can help me or point me in a direction for further reading.

    I am using Avisynth+ and I have plugins in both 32-bit and 64-bit. When I run these scripts using ffmpeg, I force a 64-bit process by using ffmpeg 64-bit version (and when I need to use a 32-bit only plugin, I use ffmpeg 32-bit). At least that's how I'm understanding what I am doing.

    My confusion lies with AVSPmod and VirtualDub, which I guess I am using the 32-bit versions of by default. I ran into problems with BestAudioSource since it's 64-bit only. I had to explicitly open AVSPmod 64-bit version to get it to recognize the plugin, and VirtualDub 64-bit version to open the file, since by default it was trying to use AviSynth+ 32-bit version.

    Is there a way to use AvsPmod and Vdub 32-bit versions but tell them to use AviSynth+ 64-bit? Or does the entire process need to be totally in one or the other?
    Quote Quote  
  29. Originally Posted by poisondeathray View Post
    AVISource() uses whatever VFW decoder you have installed on that system. So your decoder is outputting YV12, not the original 4:1:1

    When you convert to ProRes, it will automatically be upsampled to 10bit422 . You can do it in the script, or ffmpeg will automatically do it if you feed it something else
    How do I know what VFW decoder it's using? I did install Cedocida when I started researching dv this time around, is that what it's likely using then?

    And would it be better (i.e. less converting colorspaces) if I just added pixel_format YUY2 to the avisource line, rather than opening in YV12 and letting ffmpeg handle it or is it basically the same exact thing / same number of conversions at that point?
    Quote Quote  
  30. Originally Posted by Christina View Post
    Originally Posted by poisondeathray View Post
    You mentioned crashing on the larger file only when audio was included with trimming -

    If it is ffms2 audio + trim on the larger file, then another option is bestaudiosource for the audio. It works ok for me too on the small sample + trim
    https://forum.doom9.org/showthread.php?t=177337

    aud = BestAudioSource("original.dv")

    Here are separated fields using ffms2 (bicubic from 4:1:1 to 4:2:2) and QTInput (default 4:2:2 output) . Both use bicubic for the 422=>RGB screenshot conversion . It's an apng and should animate in most browsers

    ...
    This was extremely helpful as well, thank you! I tried BestAudioSource and that works! Although it raised other questions I didn't know I had that are a bit off topic to this thread but maybe you can help me or point me in a direction for further reading.

    I am using Avisynth+ and I have plugins in both 32-bit and 64-bit. When I run these scripts using ffmpeg, I force a 64-bit process by using ffmpeg 64-bit version (and when I need to use a 32-bit only plugin, I use ffmpeg 32-bit). At least that's how I'm understanding what I am doing.
    Yes, that's how it works

    My confusion lies with AVSPmod and VirtualDub, which I guess I am using the 32-bit versions of by default. I ran into problems with BestAudioSource since it's 64-bit only. I had to explicitly open AVSPmod 64-bit version to get it to recognize the plugin, and VirtualDub 64-bit version to open the file, since by default it was trying to use AviSynth+ 32-bit version.
    It works the same way, vdub or vdub2 x86 uses avisynth x86 ; vdub or vdub2 x64 uses avisynth x64

    Is there a way to use AvsPmod and Vdub 32-bit versions but tell them to use AviSynth+ 64-bit? Or does the entire process need to be totally in one or the other?
    No
    Quote Quote  



Similar Threads