VideoHelp Forum




+ Reply to Thread
Results 1 to 27 of 27
  1. Hi,
    I'm new to the forum although I come here on occasion when I have these problems.
    I thought I'd start my own thread. I have a 3D movie I want to convert to anaglyph without resorting to steroscopic players. I tried following guides on the net but i've had no luck yet. There are a few commercial solutions but I'd rather stick with something free.
    Can anyone help me get started with this? Thanks.
    Quote Quote  
  2. Thanks for the links jagabo.

    I decided to follow your instructions using avisynth and convert it with an encoder:

    I'm having trouble opening the file via the script in virtualdub, it says

    Avisynth open failure.
    DirectShowSource: Could not open as video or audio.
    ... Cannot play back the file. The format is not supported.

    The file itself opens no problem in MPC Classic player.

    This is the script I created for the purpose:

    DirectShowSource("C:\Users\Frederic\Downloads\CC\C C1.mkv")
    #ConvertToRGB()

    #left=Crop(0,0,960,-0)
    #right=Crop(960,0,960,-0)

    #r=ShowRed(left)
    #g=ShowGreen(right)
    #b=ShowBlue(right)

    #MergeRGB(r,g,b)

    #BilinearResize(960,540)


    What's going on? Do I have a problem with my original file?
    Quote Quote  
  3. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    What's going on is exactly what it told you: "DirectShowSource: Could not open as video or audio.
    ... Cannot play back the file. The format is not supported."
    DirectshowSource doesn't support opening ALL formats.

    First, find out what format you file truly is, by opening in MediaInfo (do a detailed text readout and post here).

    What that says will determine which kind of source filter you will/should use that can accommodate it...

    Scott
    Quote Quote  
  4. It looks like you're trying to open an MKV file. You'll need a DirectShow MKV reader/splitter to use DirectShowSource() for that. If you can play the MKV file with Windows Media Player you should already have those components. If not, you can use Haali or LAV Filters for that.
    Quote Quote  
  5. I installed Haali on my computer and the script now opens fine so that is taken care of.
    I wanted to use MS Expression encoder to create a MP4 but I just learned you have to pay for this feature. So how do I convert it now? Do I use virtualdub? And can I make it something else than avi?
    Quote Quote  
  6. Code:
    src="JVC 3D Demo - A Time In Marche - 3D Side by Side (SBS) (HD 3D).mp4"
    #src=""
    
    V=FFVideoSource(src, cache = true, cachefile = src + ".ffindex", fpsnum = -1, fpsden = 1, colorspace = "YV12", threads = -1, seekmode = 1)
    A=FFAudioSource(src, cache = true, cachefile = src + ".ffindex")
    AudioDub(V,A)
    
    #ConvertToRGB(matrix="PC.709", Interlaced=False)
    #ConvertToRGB(matrix="PC.601", Interlaced=False)
    #ConvertToRGB(matrix="rec601", Interlaced=False)
    ConvertToRGB(matrix="rec709", Interlaced=False)
    
    #ConvertToRGB(matrix="PC.709", Interlaced=True)
    #ConvertToRGB(matrix="PC.601", Interlaced=True)
    #ConvertToRGB(matrix="rec601", Interlaced=True)
    #ConvertToRGB(matrix="rec709", Interlaced=True)
    
    # extract left and right views as separate videos
    left=Crop(0,0,width/2,-0)
    right=Crop(width/2,0,width/2,-0)
    
    # merge color channels to make an anaglyph image Red Cyan
    r=ShowRed(left)
    g=ShowGreen(right)
    b=ShowBlue(right)
    
    # merge color channels to make an anaglyph image Amber Blue
    #r=ShowRed(left)
    #g=ShowGreen(left)
    #b=ShowBlue(right)
    
    MergeRGB(r,g,b)
    
    BicubicResize(960,540)
    
    ConvertToRGB24()
    Works for me.

    Big Thx to Author of above (sorry for not remembering who is the Author).
    Quote Quote  
  7. I tried encoding the video but all I get is a video with a sbs image, sound low in pitch and juddery in general.

    I'm looking at the script above but I wouldn't even know what to use from it.

    I'm a bit disappointed, thought this would be easier.
    Quote Quote  
  8. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    When used in an avs script the '#' (hash) character designates the beginning of a comment, ie anything after a # until the end of the line is intended for the person reading the script and is not AVISynth code, so AVISynth simply ignores it. Since all the lines in your script after DirectShowSource are commented out, you're just passing through the original image unchanged.
    Quote Quote  
  9. Ok great thanks that helped.
    I converted my first video, video is ok but the sound doesn't follow.
    The pitch and timing seem different, what can i do?

    The same happens if I open the script in VDub and Expression Encoder.
    Last edited by digifred5; 19th Nov 2014 at 13:00.
    Quote Quote  
  10. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    My guess is that you need to add AssumeFPS() to either the videosource or audiosource (or both).

    Scott
    Quote Quote  
  11. Since I don't know how to edit the script I used the hard way and demuxed the mkv, converted the video to anaglyph and the audio and remuxed it back together. Now I have to try if it will work on my tv.
    Thanks for the help.
    Quote Quote  
  12. Originally Posted by Cornucopia View Post
    My guess is that you need to add AssumeFPS() to either the videosource or audiosource (or both).

    Scott
    How do I do that?

    Is this something I can learn in the documentation?
    Quote Quote  
  13. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Yes there is: http://avisynth.nl/index.php/Main_Page is a start.

    I would suggest you use AVSPMod, start with a Source line and then an Info() line and see what the preview shows. Then add on each line (or groups of lines) and see the difference.

    ...You know, since you seem so green WRT AVISynth, why don't you try something easier, like StereoMovie Maker?

    Scott
    Quote Quote  
  14. Thanks for the tip.

    I tried StereoMovie but my video file is not supported so that's too bad.
    Quote Quote  
  15. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Convert first to a lossless format that it does accept (like if you have Laragrith installed, etc). Then try it. Then get rid of the intermediate file once the conversion is done. Extra step, no big deal.

    Scott
    Quote Quote  
  16. Originally Posted by digifred5 View Post
    Originally Posted by Cornucopia View Post
    My guess is that you need to add AssumeFPS() to either the videosource or audiosource (or both).

    Scott
    How do I do that?
    Add AssumeFPS(29.97) (or whatever the correct rate is) anywhere after AudioDub() in the script in your first post.
    Quote Quote  
  17. Actually I didn't have AudioDub() in my script.
    Anyaway I added the AssumeFPS function with the correct frame rate but that wasn't enough.

    On a different note, i don't have the space on my ssd to do a lossless conversion with Lagarith
    Quote Quote  
  18. Please provide information's: how many frames is in video, how many samples is in audio, provide audio sampling frequency.
    Quote Quote  
  19. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    You don't specify your hardware, so there's no way for us to know, but I sure hope you are not dealing with video+audio while trying to use your boot SSD drive only!
    Media should be played from & recorded to its own dedicated drive. And, for most consumer purposes, single fast HDDs are sufficient for that. If one's bitrate needs reach above standard consumer levels, superfast drives (10k or 15k rpm) and/or RAID systems and/or SSD become necessary then.

    *******************

    I think what pandy is asking about is: might there be a difference in the calculated running time of the video (as evidenced by the framerate) vs. the running time of the audio (as evidenced by the samplerate). Of course, that assumes that length differences is all that is troubling you. I was under the impression it had to do with "sound low in pitch & juddery in general". This, in an of itself, doesn't fully explain your problem, I'm guessing.

    Maybe you need to be more specific about your sources altogether (by providing a detailed MediaInfo text readout).
    Comparing the source info details as reported by that app vs. the info seen by AVISynth, as shown by an inserted Info() command, might produce something fruitful.

    Scott
    Quote Quote  
  20. Originally Posted by digifred5 View Post
    Actually I didn't have AudioDub() in my script.
    Anyaway I added the AssumeFPS function with the correct frame rate but that wasn't enough.
    Without more explicit information there's not much anyone can do to help you. Provide samples of your source and your encoded video, and the script you used.
    Quote Quote  
  21. Ok the sript so far

    DirectShowSource("C:\Users\Frederic\Videos\CC\CC.m kv")
    ConvertToRGB()

    left=Crop(0,0,960,-0)
    right=Crop(960,0,960,-0)

    r=ShowRed(left)
    g=ShowGreen(right)
    b=ShowBlue(right)

    MergeRGB(r,g,b)

    BilinearResize(960,540)

    AssumeFPS(23.976)


    And here is the file info:

    Format : Matroska
    Format version : Version 2
    File size : 12.4 GiB
    Duration : 1h 35mn
    Overall bit rate mode : Variable
    Overall bit rate : 18.6 Mbps
    Movie name : A_CHRISTMAS_CAROL
    Encoded date : UTC 2010-11-28 12:49:17
    Writing application : DVDFab
    Writing library : libebml v0.7.8 + libmatroska v0.8.1

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L5.1
    Format settings, CABAC : Yes
    Format settings, ReFrames : 1 frame
    Format settings, GOP : M=1, N=15
    Codec ID : V_MPEG4/ISO/AVC
    Duration : 1h 35mn
    Bit rate mode : Variable
    Maximum bit rate : 22.5 Mbps
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 23.976 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Default : Yes
    Forced : No

    Audio
    ID : 2
    Format : DTS
    Format/Info : Digital Theater Systems
    Format profile : MA / Core
    Mode : 16
    Format settings, Endianness : Big
    Codec ID : A_DTS
    Duration : 1h 35mn
    Bit rate mode : Variable
    Bit rate : Unknown / 1 509 Kbps
    Channel(s) : 6 channels
    Channel positions : Front: L C R, Side: L R, LFE
    Sampling rate : 48.0 KHz
    Bit depth : 24 bits
    Compression mode : Lossless / Lossy
    Language : English
    Default : Yes
    Forced : No

    This is all being done on my notebook with a ssd drive as primary and only disk.
    Quote Quote  
  22. DirectShowSource() may not be returning 23.976 fps -- put Return(Info()) right after DirectShowSource() and see what it says.
    Quote Quote  
  23. Well, it says it's 23.976 fps.

    Originally Posted by digifred5 View Post
    video is ok but the sound doesn't follow.
    The pitch and timing seem different
    What exactly is wrong with your encoded video? In what way is the audio out of sync? Is it a constant offset? Does the sync vary? Say, in sync at the start out of sync at the end? What is the running time of the new video you made? What exactly did you do with the audio?
    Quote Quote  
  24. The audio is not necessarily out of sync it just plays in a different 'key' or lower pitch than the original
    I haven't done any editing or processing on the audio.

    I haven't kept the encoded file so i can't say about running time. I can encode again and post back if you like.
    Quote Quote  
  25. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Do you like the original audio? (while still in SbS) If so, you could just as easily extract it and remux with the converted video.

    Though I notice your pic shows a difference in audio vs. video length of ~1 1/2 frames (@23.976), audio being shorter. This could have been the result of the conversion from the rip. Depending upon choices made there, that could have resulted in "processing" of the audio, even if you didn't realize it.

    It would help if you showed ALL the details (by using [Debug | Advanced Mode])

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