VideoHelp Forum




+ Reply to Thread
Results 1 to 24 of 24
  1. HI All,

    I just downloaded ffms2.dll online and then tried running this command in avs file i get error : "Script error: there is no FFmpegSource2() function found " . But the ffms2.dll file is in the same folder

    avs file :

    LoadPlugin("ffms2.dll")
    FFmpegSource2("AVSync_15Mins.mp4")


    Please let me know if i need to install any additional package for this..

    Thanks
    fido
    Quote Quote  
  2. you need ffms2.avsi which defines a wrapper function : FFMpegSource2()

    the most recent download doesn't bundle it with the zip file for some reason, you can get it from earlier versions



    FFMpegSource2("AVSync_15Mins.mp4",atrack=-1)

    is the same thing as

    vid=FFVideoSource("AVSync_15Mins.mp4")
    aud=FFVideoSource("AVSync_15Mins.mp4")
    AudioDub(vid,aud)

    EDIT: I've uploaded it here for your convenience
    Image Attached Files
    Last edited by poisondeathray; 11th Oct 2010 at 15:14.
    Quote Quote  
  3. Thanks of the zip file...

    Here is my code

    LoadPlugin("ffms2.dll")
    Import("ffms2.avsi")
    FFmpegSource2("sportsavs.mp4")


    "Cannot play back the video stream: no suitable decompressor could be found " while playing on window media player.. do i need to install any software for this... MP4 files has .h264 encoded video and aac audio.
    Quote Quote  
  4. Do you have avisynth installed ? You also need haali media splitter for transport streams, but I don't think you need it for mp4 , but I would install it anyways
    Quote Quote  
  5. Hi

    Thanks for your help.. I installed haali media splitter and also previously installed Avisynth (https://www.videohelp.com/tools/Avisynth). But it is still not working getting same error. Do i need to set any "environment variable path" for avisynth after installing it..

    Thanks
    fido
    Quote Quote  
  6. no, it should work without environment variables

    can you open the .avs in vdub ?

    Some versions of mp4box have a bug, you may have to re-wrap the mp4 container with a modern build

    Where did you get the video file ?
    Quote Quote  
  7. It works fine in Vdub. i can see video being played clearly without any problem. What could be the problem do you think....

    and regarding the mp4 file. i got it online i can play this in vlc and quicktime..

    thanks
    fido
    Quote Quote  
  8. if it works in vdub, the problem is the media player

    did you choose the full install when installing avisynth ? IIRC it installs some plugins for media players

    only players like mpc, mpchc, kmplayer , wmp , support avs files. Other players like quicktime do not
    Quote Quote  
  9. ok. i have one more question. Let say i am not able to play the avs on media player.. that's fine because i am doing some other job in the avs file like Psnr calculation for this i don't need the video display... just the psnr output (.txt)is sufficient. so is there any way that i can run batch files of testing.avs (20 avs files) in a batch files on the command (.bat) so that it gives me the psnr files one shot...

    basically, i need to run the .avs file on cmd prompt without playing it in media player.

    thanks
    fido
    Quote Quote  
  10. sorry not sure how you would do that

    what are you using to do the psnr testing ? avisynth's psnr filter or some other application ?
    Quote Quote  
  11. So there is no way that i can run the avs file on command prompt. Please let me know if there is any command to run the .avs file. for psnr "compare" filter

    Thanks
    fido
    Quote Quote  
  12. Member
    Join Date
    Feb 2009
    Location
    United States
    Search Comp PM
    Google brought up this thread for me, and it was partially helpful. I have an FLV and am trying to open it with FFmpegsource2. It does now open it once I put all 4 files:
    -- ffms2.dll
    -- ffms2.lib
    -- ffmsindex.exe
    -- FFMS2.avsi
    into the AviSynth plugins folder under "Program Files (x86)" (Windows 7).

    The video loads great, but the audio, which I know is there, does not come up in Vdub. It feels there's no sound track. Here's my script:

    Code:
    FFmpegSource2("D:/Video-Work/myVideoClip.flv")
    (I'm going with FFmpegSource2 as I saw somewhere that it can be the best way to open an FLV directly in AviSynth. I want to avoid converting it to a big AVI and using AviSource.)
    Quote Quote  
  13. FFmpegSource2() does not automatically include sound. You need to add the atrack argument as in post #2.
    Quote Quote  
  14. Member
    Join Date
    Feb 2009
    Location
    United States
    Search Comp PM
    Ah, so easy to miss something out to the right, esp. when one would not expect to need an additional parameter.

    I did add atrack=-1 (and I read up on how -1 picks up the first audio track found). I get:

    Avisynth open failure:
    FFAudioSource: No audio track found
    (FFMS2.avsi, line 40)

    Is it possible that the FLV was "fudged at the factory" to fool tools like this but still play okay in players?
    Quote Quote  
  15. It's possible there's something about the audio that FFMS2 doesn't like but I doubt it's intentional. What does MediaInfo say about the audio?
    Quote Quote  
  16. Member
    Join Date
    Feb 2009
    Location
    United States
    Search Comp PM
    Nothing abnormal.

    Code:
    Audio
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : 10
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 48.0 KHz
    Compression mode                         : Lossy
    Quote Quote  
  17. I wouldn't expect ffms2 to have any problems with AAC LC audio. Try deleting the index file and opening the script again. If that doesn't help maybe you can remux to MKV with MMG and open that with ffms2.
    Quote Quote  
  18. Member
    Join Date
    Feb 2009
    Location
    United States
    Search Comp PM
    What "index file"? I have not done anything regard to an index file. Haven't created one, seen one, or anything.
    Quote Quote  
  19. ffms2 creates an index file when it is used to open a video. You should see a file with the same name as the FLV file but with the additional extension .ffindex in the same folder as the FLV file.
    Quote Quote  
  20. Member
    Join Date
    Feb 2009
    Location
    United States
    Search Comp PM
    Ahhh, I see that file! Deleted it, and now it works! I must have created it in some partial way and/or damaged it. Now that I know there's an index file that gets created, I can look to deleting when there's a problem. THANKS!
    Quote Quote  
  21. Originally Posted by TCmullet View Post
    Ahhh, I see that file! Deleted it, and now it works! I must have created it in some partial way and/or damaged it.
    Yes, that's what I was thinking.
    Quote Quote  
  22. Member
    Join Date
    Jun 2016
    Location
    Moscow, Russia
    Search PM
    FFMS2 v2.22 doesn't work when trying to extract audio from multi-AC3 VOB file.

    Test file: https://drive.google.com/file/d/0BxITyeHd2HuMQjNmSjhuZHBDTG8/view?usp=sharing
    (this is a part of "Man of La Mancha" DVD movie containing "The Impossible Dream" song by Don Quixote).

    This 1GB VOB file contains 5 audio streams (AC3, 48 kHz) and 9 subtitle streams. It is normally played by Media Player Classic from latest K-Lite Codec Pack (allowing selecting any audio/subtitle stream).

    Tried several script variants, all returning error "FFAudioSource: No audio track found (FFMS2.avsi, line 40)":

    1. Calling FFMpegSource2 (with audio autoselect):

    Code:
    file = "VTS_01_5.VOB"
    video = FFMpegSource2(file, atrack=-1)
    video
    2. Calling FFAudioSource explicitly:

    Code:
    file = "VTS_01_5.VOB"
    audio = FFAudioSource(file, track=-1)
    video = FFVideoSource(file)
    video = AudioDub(video, audio)
    video
    3. Calling FFIndex first:

    Code:
    file = "VTS_01_5.VOB"
    FFIndex(file)
    video = FFMpegSource2(file, atrack=-1)
    video
    Of course, I deleted VTS_01_5.VOB.ffindex file before each run. No effect.

    I tried several versions of FFMS2: 2.22, 2.21, 2.20, 2.19 (copying FFMS2.avsi, ffms2.dll, ffms2.lib, ffmsindex.exe from x86 folder into AviSynth plugin folder and deleting .ffindex file after each downgrade) - not working in any version.

    Also I tried manually specifying atrack (1, 2, 3, 4, 5). In this case another error message was returned: "FFAudioSource: Audio track contains no audio frames (FFMS2.avsi, line 40)".

    Also I tried manually specifying atrack from subtitles track range (6, 7, 8, 9, 10, 11, 12, 13, 14, 15 - subtitles tracks and video). Then it logically returned error "FFAudioSource: Not an audio track (FFMS2.avsi, line 40)".

    And finally I tried to specify track out of range (16). And the error was "FFAudioSource: Out of bounds track index selected (FFMS2.avsi, line 40)".

    When opening file with audio track disabled (atrack=-2), it opens OK (but, of course, without audio).

    So it proves that the file contains 5 audio tracks (numbered from 1 to 5) but they're somehow not recognized by FFMS2 of the latest version. Could you please fix it?
    Quote Quote  
  23. I saw the same problem with your file and ffms2. The preferred source filter for VOB files is DgMpgDec. First index the video and demux the audio tracks with DgIndex. Then use Mpeg2Source() in your script to open the index file. ffAudioSource() was able to open the extracted AC3 streams.

    Code:
    A = ffAudioSource("VTS_01_5 T82 2_0ch 192Kbps DELAY -72ms.ac3") 
    V = Mpeg2Source("VTS_01_5.d2v") 
    AudioDub(A, V)
    I usually mux the original AC3 audio with the new video, so my scripts only deal with the video. But the above script worked with all five audio tracks.

    <edit>
    Another thing that worked was to remux the VOB file to an MPG file with Mpeg2Cut2. Then ffms2 worked opening the audio and video.
    </edit>
    Last edited by jagabo; 16th Jun 2016 at 09:23.
    Quote Quote  
  24. Member
    Join Date
    Jun 2016
    Location
    Moscow, Russia
    Search PM
    Thanks, Mpeg2Source worked. Anyway, I created a bugreport to ffms2 on github (https://github.com/FFMS/ffms2/issues/263).
    Quote Quote  



Similar Threads

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