VideoHelp Forum
+ Reply to Thread
Results 1 to 30 of 30
Thread
  1. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    I am new to all the varieties of video processing.

    I am trying to do some conversion to this mp4 video

    https://www.dspace.cam.ac.uk/bitstream/1810/226248/1/Nakane.mp4

    When I try to use virtualdub to import it directly, it works OK. However, when I try to use avisynth script such as

    V=DirectShowSource("file", convertfps=true, audio=false)
    A=DirectShowSource("file", video=False) # audio only (video renderer removed)
    AudioDub(V, A)

    it also works (faster, due to audio processing I believe) but there are all sorts of colour artifacts and banding issues with the opened video. I have ffdshow installed. Not sure what have I missed.

    Thanks for your kind help.
    Quote Quote  
  2. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    I also tried to open the .avs file using Windows Media Player and virtualdubmod but without any success. Very confused.
    Quote Quote  
  3. V=DirectShowSource("file", convertfps=true, audio=false)
    A=DirectShowSource("file", video=False) # audio only (video renderer removed)
    AudioDub(V, A)
    you need the extension, hopefully "file" means "file.mp4"



    your directshow filters probably aren't organized properly . You probably need a mp4 splitter , like haali media splitter or gabest mp4 splitter

    on win7 you need to use preferred filter tweaker

    better yet, avoid directshow issues and use ffmpegsource2
    http://code.google.com/p/ffmpegsource/

    e.g.
    aud = ffaudiosource("video.mp4")
    vid = ffvideosource("video.mp4")
    audiodub(vid,aud)

    or

    ffmpegsource2("video.mp4", atrack=-1)
    Quote Quote  
  4. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    Thanks poisondeathray. ffaudiosource route works for me. not sure about the ffmpegsource2 route.

    I am not sure whether there should be a sequence of installing all these packages. I do have haali splitter installed.

    meanwhile, when I try to use some more up to date GUI such as virtualdubmod, to convert things to, say MKV, none of the above works either.

    The only thing I can do is to convert the .mp4 to .avi by using xvid. by virtualdub.
    Quote Quote  
  5. Originally Posted by Campony View Post
    ffaudiosource route works for me. not sure about the ffmpegsource2 route.
    Not sure what you mean.... they are the same thing. ffaudiosource is part of ffms2.dll ; ffmpegsource2() is a wrapper function for ffaudiosource , ffvideosource and audiodub , to make things easier

    meanwhile, when I try to use some more up to date GUI such as virtualdubmod, to convert things to, say MKV, none of the above works either.
    vdubmod hasn't been up to date for a few years. It's mkv support is out of date as well. Cannot open newer MKV's within the last few years


    The only thing I can do is to convert the .mp4 to .avi by using xvid. by virtualdub.
    vdub has external encoder function now , you can use other encoders, and are no longer limited to AVI container

    the vfw version of x264 can export different wrappers out of vdub as well

    you can use other converters as well - lots of options, some are ffmpeg based e.g. winff , any video converter, xmediarecode and do not rely on directshow

    some are avisynth based, eg. megui, xvid4psp
    Quote Quote  
  6. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by Campony View Post
    ffaudiosource route works for me. not sure about the ffmpegsource2 route.
    Not sure what you mean.... they are the same thing. ffaudiosource is part of ffms2.dll ; ffmpegsource2() is a wrapper function for ffaudiosource , ffvideosource and audiodub , to make things easier
    yes I realised that but this is the confusing bit. virtualdub simply won't recognise the ffmpegsource2 function.

    meanwhile, when I try to use some more up to date GUI such as virtualdubmod, to convert things to, say MKV, none of the above works either.
    vdubmod hasn't been up to date for a few years. It's mkv support is out of date as well. Cannot open newer MKV's within the last few years
    I realised that too so that's why I try to use vdmod, which doesn't open .avs script correctly at all


    The only thing I can do is to convert the .mp4 to .avi by using xvid. by virtualdub.
    vdub has external encoder function now , you can use other encoders, and are no longer limited to AVI container

    the vfw version of x264 can export different wrappers out of vdub as well

    you can use other converters as well - lots of options, some are ffmpeg based e.g. winff , any video converter, xmediarecode and do not rely on directshow

    some are avisynth based, eg. megui, xvid4psp
    Just clarified some concepts by browsing. Got to give megui a try.
    Quote Quote  
  7. Originally Posted by Campony View Post
    yes I realised that but this is the confusing bit. virtualdub simply won't recognise the ffmpegsource2 function.
    I still don't understand what you're trying to say

    vdub doesn't see or use the ffmpegsource2 function, when you open the .avs, all it "sees" is uncompressed video and audio


    what error message do you get?

    did you unzip the ffms2 plugin to the avisynth/plugins folder (the .dll and .avsi)?

    does your .avs preview in mpc, or avspmod (push f5) ?

    post your exact script

    I didn't download your video yet , use mediainfo (view=>text) and copy & paste the results back here
    Quote Quote  
  8. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    Thanks but the whole point is that I do not care that much certain function works or not but as long as the process can give me a working mp4 output, for this task, I am more keen to try things other than vdub, such as vdubmod or megui.

    when megui opens the .avs, the video is alright but there seems to be no sound. not sure if this is natural.

    vdubmod opens the .avs

    aud = ffaudiosource("video.mp4")
    vid = ffvideosource("video.mp4")
    audiodub(vid,aud)

    with the following error: Error decompressing video frame 0: the source image format is not acceptable. (error code -2)
    Quote Quote  
  9. answer the questions in the previous post, especially about mediainfo

    avidemux is another option as well (similar look and function as vdub)

    i wouldn't use vdubmod , it's depreciated
    Quote Quote  
  10. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    here is the info.

    Format : MPEG-4
    Format profile : Base Media / Version 2
    Codec ID : mp42
    File size : 397 MiB
    Duration : 1h 1mn
    Overall bit rate : 904 Kbps
    Encoded date : UTC 2007-12-06 14:29:24
    Tagged date : UTC 2007-12-06 14:30:38

    Video
    ID : 2
    Format : MPEG-4 Visual
    Format profile : Advanced Simple@L3
    Format settings, BVOP : Yes
    Format settings, QPel : No
    Format settings, GMC : No warppoints
    Format settings, Matrix : Default (H.263)
    Codec ID : 20
    Duration : 1h 1mn
    Bit rate mode : Constant
    Bit rate : 791 Kbps
    Width : 352 pixels
    Height : 264 pixels
    Display aspect ratio : 4:3
    Frame rate mode : Constant
    Frame rate : 25.000 fps
    Color space : YUV
    Bit depth : 8 bits
    Scan type : Progressive
    Compression mode : Lossy
    Bits/(Pixel*Frame) : 0.340
    Stream size : 347 MiB (87%)
    Language : English
    Encoded date : UTC 2007-12-06 14:29:13
    Tagged date : UTC 2007-12-06 14:30:38

    Audio
    ID : 1
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format profile : LC
    Codec ID : 40
    Duration : 1h 1mn
    Bit rate mode : Constant
    Bit rate : 112 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 32.0 KHz
    Compression mode : Lossy
    Stream size : 49.2 MiB (12%)
    Language : English
    Encoded date : UTC 2007-12-06 14:29:13
    Tagged date : UTC 2007-12-06 14:30:38

    I am trying out a number of tools now. the advantage of vdub was that I could abort processing at any point and see the temp result. Now I have to cut a small section out of the original video to try other tools. Do you think Yamb is a good tool to do this?
    Quote Quote  
  11. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    downloaded MeGUI. it always asks an Update of NeroAACEnc. I have downloaded it manually, but where is the proper place to put this? In tools? I have done it but the update window still pops up each time.
    Quote Quote  
  12. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by Campony View Post
    virtualdub simply won't recognise the ffmpegsource2 function.
    It's actually Avisynth that is not recognising it.
    You need to copy ffms2.avsi (as well as ffms2.dll) into your Avisynth plugins folder.
    (That's where the ffmpegsource2 function is defined.)
    Quote Quote  
  13. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    Originally Posted by Gavino View Post
    Originally Posted by Campony View Post
    virtualdub simply won't recognise the ffmpegsource2 function.
    It's actually Avisynth that is not recognising it.
    You need to copy ffms2.avsi (as well as ffms2.dll) into your Avisynth plugins folder.
    (That's where the ffmpegsource2 function is defined.)
    I copied them actually. But simply no luck. fortunately

    aud = ffaudiosource("video.mp4")
    vid = ffvideosource("video.mp4")
    audiodub(vid,aud)

    do work for me in virtualdub.

    I am actually trying MeGUI and MKVMerge at the moment. Both of them seem to have sound problems--basically outputs are silent, although audio information can be seen in MediaInfo.
    Quote Quote  
  14. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    I just realised that the options here seem to be endless. So it's better to state my intention first.

    The project is aimed at converting a bunch of .mp4 in the forms stated above, by doing certain resizing, hsv adjustment and subtitling, and export to files with similar or smaller sizes (around 500kb/s). sound will be largely kept unchanged although some might need a bit level adjustment and noise reduction.

    output format ideally will stay .mp4 or .mkv.

    something like this following file is my target.

    Format : Matroska
    File size : 224 MiB
    Duration : 54mn 56s
    Overall bit rate : 569 Kbps
    Encoded date : UTC 2010-02-28 09:02:05
    Writing application : mkvmerge v3.0.0
    Writing library : libebml v0.7.9 + libmatroska v0.8.1

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L3.0
    Format settings, CABAC : Yes
    Format settings, ReFrames : 9 frames
    Codec ID : V_MPEG4/ISO/AVC
    Duration : 54mn 56s
    Nominal bit rate : 520 Kbps
    Width : 640 pixels
    Height : 352 pixels
    Display aspect ratio : 16:9
    Frame rate : 29.970 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.077
    Writing library : x264 core 80 r1376M 3feaec2
    Encoding settings : cabac=1 / ref=9 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 / psy_rd=1.0:0.0 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / mbaff=0 / constrained_intra=0 / bframes=3 / b_pyramid=0 / b_adapt=2 / b_bias=0 / direct=3 / wpredb=1 / wpredp=2 / keyint=250 / keyint_min=25 / scenecut=40 / rc_lookahead=60 / rc=2pass / mbtree=1 / bitrate=520 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00

    Audio
    ID : 2
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format profile : HE-AACv2 / HE-AAC / LC
    Codec ID : A_AAC
    Duration : 54mn 56s
    Channel(s) : 2 channels / 1 channel / 1 channel
    Channel positions : Front: L R / Front: C / Front: C
    Sampling rate : 44.1 KHz / 44.1 KHz / 22.05 KHz
    Compression mode : Lossy

    Text #1
    ID : 3
    Format : UTF-8
    Codec ID : S_TEXT/UTF8
    Codec ID/Info : UTF-8 Plain Text
    Quote Quote  
  15. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    tried avidemux.

    loaded avs through avisynth proxy GUI. now the preview is full of colour artifacts and voice is jumppy. not sure which step was wrong.
    Quote Quote  
  16. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    I think I must have missed a lot of basic knowledge in this whole business.

    but somehow most of the jobs can be done in vdub without any error. I just tried output .avi by using h264vfw and then transcode the output to .mkv by mkvmerge.

    I guess this will be the baseline I will fall back on when other fails. Not sure what is the best strategy with sound. Currently I just use Yamb to separate audio and then use direct copy in vdub. Is there any better way to do this?
    Quote Quote  
  17. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    I took the liberty of downloading the source file.
    Avidemux will open the file directly - I don't think there is a need for the proxy.
    Set "video" to mpeg-4 AVC. Audio to "copy", format to MKV.
    Encode the file.
    Quote Quote  
  18. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    Thanks Davexnet. I do need something like avisynth to call some filters to give the video some processing (size, subtitle, satuation etc).

    Do you know how to setup Nero AAC encoder as I might need to use MeGUI to convert some processed audio too.

    Thanks again.
    Quote Quote  
  19. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    I've never used MeGui, so I can't help with that. Have you tried using Avidemux's filters?
    You can resize, alter color & add subs right there.
    Quote Quote  
  20. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    I tried avidemux direct import. I have to say its AVC/AAC MP4 output options are simply mindblowing. if I were just doing conversion, this is definitely my first choice. Unfortunately its subtile function is not up to the standard of ffdshow(ffvdub in vdub). considering my video is of rather static nature, I will probably pick x264vfw and vdub for the moment.
    Quote Quote  
  21. Originally Posted by Campony View Post
    Do you know how to setup Nero AAC encoder as I might need to use MeGUI to convert some processed audio too.

    unless you specify audio in a script through something other than directshow, megui will use directshow to load audio if you input audio or the file directly

    but your directshow filters aren't working

    did you use preferred filter tweaker yet as instructed in post #3? you have to specify ffdshow, the default ms filters don't work for avisynth on win7 . That's probably why directshowsource doesn't work for you. If you have haali, ffdshow, and setup the filters correctly, everything should work

    in the megui options, you need to set the path to neroaacenc.exe . options=>settings=>external program settings tab => specify path
    Quote Quote  
  22. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    Hi, Poisondeathray. Nice to hear from you again.

    I set up neroaacenc as you suggested. MeGUI works great with avs script. No problem so far with sound or video.

    The only thing I haven't tried is the subtitle. Obviously I haven't tried everything out there but it seems to me the ffvdub (ffdshow?) subtitle is the most straightforward and stable as well as feature rich option. I know ffvdub can call .avs script, but how to do it the other way round, that is to say, calling ffdshow subtitle function(if there is one) in .avs script?

    Anyway, thanks for these many suggestions. They are very helpful. I haven't tried to set the tweaker yet but will try tomorrow.

    Night for now.
    Quote Quote  
  23. vsfilter.dll
    http://avisynth.org.ru/docs/english/externalfilters/vsfilter.htm

    #whateversource
    Textsub()

    Text based subs have no formatting. So if you want "feature rich" you need ssa or ass subs. Use aegisub
    Quote Quote  
  24. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    Originally Posted by poisondeathray View Post
    vsfilter.dll
    http://avisynth.org.ru/docs/english/externalfilters/vsfilter.htm

    #whateversource
    Textsub()

    Text based subs have no formatting. So if you want "feature rich" you need ssa or ass subs. Use aegisub
    Works like a charm! I should have visited this forum long ago. Some rubbish subtitle editors almost killed me. But probably they were right: no pain no gain.

    Thanks again for Poisondeathray.

    Now I move on to some fine tuning of the parameters.

    First thing, there are faint aliasing issues with, I would say, original lossy videos. I wonder is there any point to remove them if I want to enlarge the video and probably sharpen it a bit before compress it to something even smaller in size?

    Secondly, how to setup x264 parameters in MeGUI? I know this is dumb but it seems to me that MeGUI is not a very straightforward user interface, although I can use its basic functions without a problem.
    Quote Quote  
  25. Originally Posted by Campony View Post
    First thing, there are faint aliasing issues with, I would say, original lossy videos. I wonder is there any point to remove them if I want to enlarge the video and probably sharpen it a bit before compress it to something even smaller in size?
    I can't recommend anything unless I look at it, or how small, or how compressed , or know what you have in mind

    You can try avisynth antialiasing filters
    http://avisynth.org/mediawiki/External_filters#Anti-aliasing


    Secondly, how to setup x264 parameters in MeGUI? I know this is dumb but it seems to me that MeGUI is not a very straightforward user interface, although I can use its basic functions without a problem.
    Just start with the presets and tunings. It's not really megui that you're asking about, it's x264. Megui just exposes the options in a GUI format moreso than some other programs if you enable advanced options. You can learn about what the parameters do by experimenting with them when you have a chance. Here is a list
    http://mewiki.project357.com/wiki/X264_Settings
    Quote Quote  
  26. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    Firstly, here is an example of some of the aliasing on a background door, not very protruding but can be seen there



    Secondly, I do understand the parameters are of x264. That was why my question was how to set them "in" MeGUI. I simply couldn't find the place to put parameters in. All that I can get seems to be on this page. The adjustment is rather limited.
    Quote Quote  
  27. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    Sorry, here are the photos.
    Click image for larger version

Name:	1.jpg
Views:	1956
Size:	61.9 KB
ID:	6823Name:  2.jpg
Views: 3953
Size:  20.1 KB
    Quote Quote  
  28. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    found some more tabs in x264 popup window when "show advanced settings" option is checked. I think that's the place to make fine tunes.
    Quote Quote  
  29. Member
    Join Date
    May 2011
    Location
    London
    Search Comp PM
    Hi, everyone.

    Thanks for all the help I got from my last post, credit mainly goes to Poisondeathray.

    Now I managed to convert one .mp4 to another .mp4 with added features using MeGUI. Everything goes fine except one little problem.

    When I try to play a result by quicktime, it starts with white page instead of black. All other players I tried (Windows media player, vlc, kmplayer etc) won't have any problem at all.

    I believe it has something to do with x264 rendering setting, but which one I am not sure.

    Sorry I can't show this problem on youtube etc since it is player-specific. but one can repeat this problem easily by processing a few seconds of material form THE BEGINING of the following material.

    https://www.dspace.cam.ac.uk/bitstre...8/1/Nakane.mp4

    Thanks for your kind help.
    Quote Quote  
  30. don't use quicktime , it's a very poor player, and cannot handle some AVC options

    if you need QT compatibility you need to use QT compatibility settings (use google) , or use QT Pro
    Quote Quote  



Similar Threads

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