Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 59

Thread: HOWTO: AviSynth video processing with WINE

  1. #11
    Join Date
    Nov 2005
    Location
    Bordeaux, France
    Beans
    11,294
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: AviSynth video processing with WINE

    Quote Originally Posted by qyot27 View Post
    Couldn't that be a problem with libass, though? If it is, then taking the decision out of its hands by using TextSub() would resolve it. The problem with that encode could have been if the H.264 stream had certain frame types, though (does mplayer have a known problem with B-frames/B-pyramid/mixed refs?) - with AviSynth this would be null and void.
    Yeah, you're right, I'll blame that on lack of sleep.

    But anyway, the goal here is to make as little use of WINE as possible. However you look at it, WINE is in itself a hack, and as with all hacks, it is a bit dirty (just look at all the warning is spits out when you run pretty much anything), so the less we use it, the better. At least that's how I see it.
    「明後日の夕方には帰ってるからね。」


  2. #12
    Join Date
    Dec 2005
    Location
    St. Petersburg, FL
    Beans
    543
    Distro
    Lubuntu

    Re: HOWTO: AviSynth video processing with WINE

    Quote Originally Posted by Bachstelze View Post
    Yeah, you're right, I'll blame that on lack of sleep.

    But anyway, the goal here is to make as little use of WINE as possible. However you look at it, WINE is in itself a hack, and as with all hacks, it is a bit dirty (just look at all the warning is spits out when you run pretty much anything), so the less we use it, the better. At least that's how I see it.
    The only thing being called with WINE would be mplayer, as it would take avs2yuv's place in the pipe. The other solution would be to use wine mencoder to output to an ffvhuff or ffv1 AVI and then use the native mplayer+x264 method, which is currently what I do if I don't just output to raw YUV 4:2:0.

    Agreed, though; if only there was a native framework that was compatible with VFW and DirectShow filters - albeit with necessary recompilation against the new framework - this would be solved (AviSynth 3.0 may have been well-intentioned, but I honestly think it was a little too much of trying to reinvent the wheel, and therefore was kind of doomed from the get-go).

  3. #13
    Join Date
    Mar 2007
    Beans
    Hidden!

    Re: HOWTO: AviSynth video processing with WINE

    How can you trim audio if you're just piping a yuv stream?
    For audio to stay in proper sync with video, it has to be trimmed with avisynth as well.
    Freedom is neither exclusive nor unlimited.

  4. #14
    Join Date
    Nov 2005
    Location
    Bordeaux, France
    Beans
    11,294
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: AviSynth video processing with WINE

    Quote Originally Posted by verb3k View Post
    How can you trim audio if you're just piping a yuv stream?
    For audio to stay in proper sync with video, it has to be trimmed with avisynth as well.
    For audio you can use WAVI which is basically the avs2yuv counterpart for audio (dumps the audio output of the AviSynth script in raw PCM or WAV format, to stdout or to a file).

  5. #15
    Join Date
    Mar 2007
    Beans
    Hidden!

    Re: HOWTO: AviSynth video processing with WINE

    Thanks for the quick response, Bachstelze.

    I've installed the ffdshow-tryout package with the latest avisynth, but when I try to open an avi with AVISource() it gives me the following message:

    Avisynth error:
    No compatible ACM codec to decode 0x2000 audio stream to PCM.
    I tried and made an avi with only video, and it works perfectly. So, I'd appreciate it if you could help.

    Thanks in advance.
    Freedom is neither exclusive nor unlimited.

  6. #16
    Join Date
    Nov 2005
    Location
    Bordeaux, France
    Beans
    11,294
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: AviSynth video processing with WINE

    Quote Originally Posted by verb3k View Post
    Thanks for the quick response, Bachstelze.

    I've installed the ffdshow-tryout package with the latest avisynth, but when I try to open an avi with AVISource() it gives me the following message:
    ffdshow is, as its name implies, a DirectShow filter, which means that it is only used to decode files with DirectShow. In AviSynth, you do that with DirectShowSource(). AviSource() uses a different decoding method, and requires a real VfW or ACM codec to decode files, not just a DirectShow filter. What is the audio format your video uses?

  7. #17
    Join Date
    Mar 2007
    Beans
    Hidden!

    Re: HOWTO: AviSynth video processing with WINE

    For the file I used for the first test, it was using AC3. I also tried a file with MP3 and it gives the same message. DirectShowSource() would give me the following:


    Avisynth error:
    DirectShowSource: Could not open as video or audio.

    Video returned: "DirectShowSource: RenderFile, the filter graph manager won't talk to me"

    Audio returned: "DirectShowSource: RenderFile, the filter graph manager won't talk to me"
    Freedom is neither exclusive nor unlimited.

  8. #18
    Join Date
    Nov 2005
    Location
    Bordeaux, France
    Beans
    11,294
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: AviSynth video processing with WINE

    Quote Originally Posted by verb3k View Post
    For the file I used for the first test, it was using AC3. I also tried a file with mp3 and it gives the same message. DirectShowSource would give me the following:
    I have actually never tried DSS() in WINE, that's something I would have to investigate. What I would do if I were you is extract the audio stream from the AVI file and decode it to WAV using ffmpeg:

    Code:
    ffmpeg -i input.avi -vn -acodec pcm_s16le audio.wav
    And then use that as the audio stream in your AviSynth script with WAVSource():

    Code:
    video = AVISource("video.avi", audio=false)
    audio = WAVSource("audio.wav")
    AudioDubEx(video, audio)
    That being said, for MP3, the WINE appDB says the LameACM codec works, so you shouldn't need to do that.

  9. #19
    Join Date
    Mar 2007
    Beans
    Hidden!

    Re: HOWTO: AviSynth video processing with WINE

    Quote Originally Posted by Bachstelze View Post
    I have actually never tried DSS() in WINE, that's something I would have to investigate. What I would do if I were you is extract the audio stream from the AVI file and decode it to WAV using ffmpeg:

    Code:
    ffmpeg -i input.avi -vn -acodec pcm_s16le audio.wav
    And then use that as the audio stream in your AviSynth script with WAVSource():

    Code:
    video = AVISource("video.avi", audio=false)
    audio = WAVSource("audio.wav")
    AudioDubEx(video, audio)
    That being said, for MP3, the WINE appDB says the LameACM codec works, so you shouldn't need to do that.
    Thank you very much Bachstelze, I didn't know about the audio=false argument and the WAVSource(). Now everything works great!
    Thanks again
    Last edited by verb3k; January 30th, 2010 at 11:24 PM.
    Freedom is neither exclusive nor unlimited.

  10. #20
    Join Date
    Dec 2005
    Location
    St. Petersburg, FL
    Beans
    543
    Distro
    Lubuntu

    Re: HOWTO: AviSynth video processing with WINE

    Quote Originally Posted by Bachstelze View Post
    ffdshow is, as its name implies, a DirectShow filter, which means that it is only used to decode files with DirectShow. In AviSynth, you do that with DirectShowSource(). AviSource() uses a different decoding method, and requires a real VfW or ACM codec to decode files, not just a DirectShow filter. What is the audio format your video uses?
    ffdshow also has a VFW interface, and can do both encoding and decoding (I often used it through VirtualDub to produce ffvhuff and MJPEG files before I switched to using mencoder for the former, and it of course also provides the necessary support to open those formats in VirtualDub, et al). I'm not entirely sure if the audio decoder is ACM-compatible, though. I doubt it, however.

    I don't think I've ever gotten DirectShowSource to work, even after attempting to get the Platform SDK 2003 (which is what has the DirectShow layer stuff in it) installed using winetricks. Of course, that could just be a matter of me not configuring it right. I can't remember what kinds of results I got with AVISource. ffdshow is a terror to try to get setup correctly in Wine, though. None of the drop-downs on the decoder configuration pages work - I had to grab the .reg file I generated under XP and import that into Wine's registry to make it select the formats I needed.

    Generally, I would recommend sticking to MPEG2Source (DGMPGDec package), and FFmpegSource (both 1.21 and the 2.x branch/svn snapshots, since they don't conflict with each other) - those really cover most or all of what AVISource and DirectShowSource can do, and they're pretty much guaranteed to work under Wine because they're self-contained. If they don't work then your files were probably already borked to start with. FFmpegSource2 can use Haali's Media Splitter to work with MPEG2-TS files, and I don't know how well that would work under Wine. The solution, of course, is just remux TS to MKV first.

    For FFmpegSource, you can get it to index the audio by passing the atrack=-1 parameter.

    1.21 (deprecated for quite a while now, but still works well):
    Code:
    FFmpegSource("video.mkv",atrack=-1)
    or 2.x/svn:
    Code:
    FFmpegSource2("video.mkv",atrack=-1)
    Technically, the function FFmpegSource2 is in the wrapper .avsi that comes with the plugin, and is provided for those more comfortable with 1.21's syntax, although because it can also load audio it has its own usefulness apart from that.
    Last edited by qyot27; January 31st, 2010 at 03:39 AM.

Page 2 of 6 FirstFirst 1234 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •