Discussion Forums > Technology
Hardsubbing video using Avisynth
Bob2004:
I'm trying to burn a bunch of anime to DVD at the moment for some friends, and am having a bit of trouble with the subtitles. Since its all full of typesetting and overlapping timestamps, my only realistic option for getting them onto DVD is hardsubbing them, but I've been having no end of problems getting it to work.
I've managed to solve most of them (I had a lot of problems finding a working version of VSFilter, and then there was no real documentation on how to use it, but I'm fairly sure I've figured it out), but now I can't get the resulting script to actually open in MPC (to check it actually works before burning it).
Firstly, this is my AVS script:
(click to show/hide)LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
Clip="From_Up_On_Poppy_Hi ll_(2011)_[1080p,BluRay,flac,x264]_-_THORA"
V = DirectShowSource(Clip+".mkv")
V.TextSub(Clip+".ass")
# A = DirectShowSource(Clip+".flac")
# AudioDub(V, A)
As you can see the video has flac audio (24 bit 5 channel flac, to be precise), but as I understand it (and useful documentation for Avisynth seems to be few and far between, so I'm not 100% sure), so long as I have a decoder installed which allows FFDShow to decode flac (and I do), then it should be able to be decoded using DirectShowSource in Avisynth. However, when I try and run the script as above, MPC spends ages loading it, then throws up an error saying that it could not render some of the pins in the graph - specifically "ACM Wrapper::Output". It also gives a huge load of details, which look like this:
(click to show/hide)D:\Video\From Up On Poppy Hill\script.avs::Avisynth audio #1
ACM Wrapper::Output
Media Type 0:
--------------------------
Audio: PCM 48000Hz 3ch 2304kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 6
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 3
nSamplesPerSec: 48000
nAvgBytesPerSec: 288000
nBlockAlign: 6
wBitsPerSample: 16
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 03 00 80 bb 00 00 00 65 04 00 06 00 10 00 ....€»...e......
0010: 00 00 ..
Media Type 1:
--------------------------
Audio: PCM 44100Hz stereo 1411kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 4
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 2
nSamplesPerSec: 44100
nAvgBytesPerSec: 176400
nBlockAlign: 4
wBitsPerSample: 16
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 02 00 44 ac 00 00 10 b1 02 00 04 00 10 00 ....D¬...±......
0010: 00 00 ..
Media Type 2:
--------------------------
Audio: PCM 44100Hz mono 705kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 2
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 1
nSamplesPerSec: 44100
nAvgBytesPerSec: 88200
nBlockAlign: 2
wBitsPerSample: 16
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 01 00 44 ac 00 00 88 58 01 00 02 00 10 00 ....D¬..ˆX......
0010: 00 00 ..
Media Type 3:
--------------------------
Audio: PCM 44100Hz stereo 705kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 2
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 2
nSamplesPerSec: 44100
nAvgBytesPerSec: 88200
nBlockAlign: 2
wBitsPerSample: 8
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 02 00 44 ac 00 00 88 58 01 00 02 00 08 00 ....D¬..ˆX......
0010: 00 00 ..
Media Type 4:
--------------------------
Audio: PCM 44100Hz mono 352kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 1
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 1
nSamplesPerSec: 44100
nAvgBytesPerSec: 44100
nBlockAlign: 1
wBitsPerSample: 8
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 01 00 44 ac 00 00 44 ac 00 00 01 00 08 00 ....D¬..D¬......
0010: 00 00 ..
Media Type 5:
--------------------------
Audio: PCM 22050Hz stereo 705kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 4
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 2
nSamplesPerSec: 22050
nAvgBytesPerSec: 88200
nBlockAlign: 4
wBitsPerSample: 16
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 02 00 22 56 00 00 88 58 01 00 04 00 10 00 ...."V..ˆX......
0010: 00 00 ..
Media Type 6:
--------------------------
Audio: PCM 22050Hz mono 352kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 2
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 1
nSamplesPerSec: 22050
nAvgBytesPerSec: 44100
nBlockAlign: 2
wBitsPerSample: 16
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 01 00 22 56 00 00 44 ac 00 00 02 00 10 00 ...."V..D¬......
0010: 00 00 ..
Media Type 7:
--------------------------
Audio: PCM 22050Hz stereo 352kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 2
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 2
nSamplesPerSec: 22050
nAvgBytesPerSec: 44100
nBlockAlign: 2
wBitsPerSample: 8
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 02 00 22 56 00 00 44 ac 00 00 02 00 08 00 ...."V..D¬......
0010: 00 00 ..
Media Type 8:
--------------------------
Audio: PCM 22050Hz mono 176kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 1
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 1
nSamplesPerSec: 22050
nAvgBytesPerSec: 22050
nBlockAlign: 1
wBitsPerSample: 8
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 01 00 22 56 00 00 22 56 00 00 01 00 08 00 ...."V.."V......
0010: 00 00 ..
Media Type 9:
--------------------------
Audio: PCM 11025Hz stereo 352kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 4
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 2
nSamplesPerSec: 11025
nAvgBytesPerSec: 44100
nBlockAlign: 4
wBitsPerSample: 16
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 02 00 11 2b 00 00 44 ac 00 00 04 00 10 00 .....+..D¬......
0010: 00 00 ..
Media Type 10:
--------------------------
Audio: PCM 11025Hz mono 176kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 2
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 1
nSamplesPerSec: 11025
nAvgBytesPerSec: 22050
nBlockAlign: 2
wBitsPerSample: 16
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 01 00 11 2b 00 00 22 56 00 00 02 00 10 00 .....+.."V......
0010: 00 00 ..
Media Type 11:
--------------------------
Audio: PCM 11025Hz stereo 176kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 2
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 2
nSamplesPerSec: 11025
nAvgBytesPerSec: 22050
nBlockAlign: 2
wBitsPerSample: 8
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 02 00 11 2b 00 00 22 56 00 00 02 00 08 00 .....+.."V......
0010: 00 00 ..
Media Type 12:
--------------------------
Audio: PCM 11025Hz mono 88kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 1
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 1
nSamplesPerSec: 11025
nAvgBytesPerSec: 11025
nBlockAlign: 1
wBitsPerSample: 8
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 01 00 11 2b 00 00 11 2b 00 00 01 00 08 00 .....+...+......
0010: 00 00 ..
Media Type 13:
--------------------------
Audio: PCM 8000Hz stereo 256kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 4
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 2
nSamplesPerSec: 8000
nAvgBytesPerSec: 32000
nBlockAlign: 4
wBitsPerSample: 16
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 02 00 40 1f 00 00 00 7d 00 00 04 00 10 00 ....@....}......
0010: 00 00 ..
Media Type 14:
--------------------------
Audio: PCM 8000Hz mono 128kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 2
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 1
nSamplesPerSec: 8000
nAvgBytesPerSec: 16000
nBlockAlign: 2
wBitsPerSample: 16
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 01 00 40 1f 00 00 80 3e 00 00 02 00 10 00 ....@...€>......
0010: 00 00 ..
Media Type 15:
--------------------------
Audio: PCM 8000Hz stereo 128kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 2
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 2
nSamplesPerSec: 8000
nAvgBytesPerSec: 16000
nBlockAlign: 2
wBitsPerSample: 8
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 02 00 40 1f 00 00 80 3e 00 00 02 00 08 00 ....@...€>......
0010: 00 00 ..
Media Type 16:
--------------------------
Audio: PCM 8000Hz mono 64kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 1
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 1
nSamplesPerSec: 8000
nAvgBytesPerSec: 8000
nBlockAlign: 1
wBitsPerSample: 8
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 01 00 40 1f 00 00 40 1f 00 00 01 00 08 00 ....@...@.......
0010: 00 00 ..
Media Type 17:
--------------------------
Audio: PCM 48000Hz stereo 1536kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 4
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 2
nSamplesPerSec: 48000
nAvgBytesPerSec: 192000
nBlockAlign: 4
wBitsPerSample: 16
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 02 00 80 bb 00 00 00 ee 02 00 04 00 10 00 ....€»...î......
0010: 00 00 ..
Media Type 18:
--------------------------
Audio: PCM 48000Hz mono 768kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 2
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 1
nSamplesPerSec: 48000
nAvgBytesPerSec: 96000
nBlockAlign: 2
wBitsPerSample: 16
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 01 00 80 bb 00 00 00 77 01 00 02 00 10 00 ....€»...w......
0010: 00 00 ..
Media Type 19:
--------------------------
Audio: PCM 48000Hz stereo 768kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 2
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 2
nSamplesPerSec: 48000
nAvgBytesPerSec: 96000
nBlockAlign: 2
wBitsPerSample: 8
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 02 00 80 bb 00 00 00 77 01 00 02 00 08 00 ....€»...w......
0010: 00 00 ..
Media Type 20:
--------------------------
Audio: PCM 48000Hz mono 384kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 1
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 1
nSamplesPerSec: 48000
nAvgBytesPerSec: 48000
nBlockAlign: 1
wBitsPerSample: 8
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 01 00 80 bb 00 00 80 bb 00 00 01 00 08 00 ....€»..€»......
0010: 00 00 ..
Media Type 21:
--------------------------
Audio: PCM 32000Hz stereo 1024kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 4
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 2
nSamplesPerSec: 32000
nAvgBytesPerSec: 128000
nBlockAlign: 4
wBitsPerSample: 16
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 02 00 00 7d 00 00 00 f4 01 00 04 00 10 00 .....}...ô......
0010: 00 00 ..
Media Type 22:
--------------------------
Audio: PCM 32000Hz mono 512kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 2
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 1
nSamplesPerSec: 32000
nAvgBytesPerSec: 64000
nBlockAlign: 2
wBitsPerSample: 16
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 01 00 00 7d 00 00 00 fa 00 00 02 00 10 00 .....}...ú......
0010: 00 00 ..
Media Type 23:
--------------------------
Audio: PCM 32000Hz stereo 512kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 2
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 2
nSamplesPerSec: 32000
nAvgBytesPerSec: 64000
nBlockAlign: 2
wBitsPerSample: 8
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 02 00 00 7d 00 00 00 fa 00 00 02 00 08 00 .....}...ú......
0010: 00 00 ..
Media Type 24:
--------------------------
Audio: PCM 32000Hz mono 256kbps
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompressio n: 0
lSampleSize: 1
cbFormat: 18
WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 1
nSamplesPerSec: 32000
nAvgBytesPerSec: 32000
nBlockAlign: 1
wBitsPerSample: 8
cbSize: 0 (extra bytes)
pbFormat:
0000: 01 00 01 00 00 7d 00 00 00 7d 00 00 01 00 08 00 .....}...}......
0010: 00 00 ..
The only useful documentation I've found on how to open flac files with Avisynth is to install madflac, but even after manually doing so, the problem still persists.
If I uncomment the two commented out lines and try that, the script just throws out an unspecified error for both DirectShowSource() commands.
Does anyone here have any experience with Avisynth, and maybe have any idea of how to fix this? It doesn't seem like it should be a particularly difficult thing to do, but it's caused me hours of frustration already, and I'm no closer to fixing it. I've tried to use Avisynth a few times now, and never once have I ever managed to get anything other than the most basic of scripts to work. It's really quite annoying.
Ooh, also, here's the mediainfo output for the file, if that makes it easier to identify the problem. I've extracted the only audio track I want (Audio #1), and the only sub track I want (Text #1), to separate files, to make life easier:
(click to show/hide)General
Unique ID : 2232675362147289887 0986314494167050593 8 (0xA7F7C36B98D8D091A 36CC475E7661DD2)
Complete name : D:\Video\From Up On Poppy Hill\From_Up_On_Poppy_Hill_(2011)_[1080p,BluRay,flac,x264]_-_THORA.mkv
Format : Matroska
Format version : Version 2
File size : 6.42 GiB
Duration : 1h 30mn
Overall bit rate mode : Variable
Overall bit rate : 10.1 Mbps
Movie name : From Up On Poppy Hill (2011)
Encoded date : UTC 2012-06-26 09:36:20
Writing application : mkvmerge v5.6.0 ('Kenya Kane') built on May 27 2012 16:44:04
Writing library : libebml v1.2.3 + libmatroska v1.3.0
Attachment : Yes / Yes / Yes / Yes / Yes / Yes / Yes / Yes / Yes / Yes / Yes / Yes / Yes / Yes / Yes / Yes / Yes
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 10@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Muxing mode : Header stripping
Codec ID : V_MPEG4/ISO/AVC
Duration : 1h 30mn
Width : 1 920 pixels
Height : 1 038 pixels
Display aspect ratio : 1.850
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Writing library : x264 core
Language : Japanese
Audio #1
ID : 2
Format : FLAC
Format/Info : Free Lossless Audio Codec
Codec ID : A_FLAC
Duration : 1h 30mn
Bit rate mode : Variable
Channel(s) : 5 channels
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Writing library : libFLAC 1.2.1 (UTC 2007-09-17)
Language : Japanese
Audio #2
ID : 3
Format : Vorbis
Format settings, Floor : 1
Codec ID : A_VORBIS
Duration : 1h 30mn
Bit rate mode : Variable
Bit rate : 96.0 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 62.4 MiB (1%)
Writing library : libVorbis 1.1.1/1.1.2 (UTC 2005-03-04)
Language : French
Audio #3
ID : 4
Format : Vorbis
Format settings, Floor : 1
Codec ID : A_VORBIS
Duration : 1h 30mn
Bit rate mode : Variable
Bit rate : 96.0 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 62.4 MiB (1%)
Writing library : libVorbis 1.1.1/1.1.2 (UTC 2005-03-04)
Language : Chinese
Audio #4
ID : 5
Format : Vorbis
Format settings, Floor : 1
Codec ID : A_VORBIS
Duration : 1h 30mn
Bit rate mode : Variable
Bit rate : 96.0 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 62.4 MiB (1%)
Writing library : libVorbis 1.1.1/1.1.2 (UTC 2005-03-04)
Language : Chinese
Audio #5
ID : 6
Format : Vorbis
Format settings, Floor : 1
Codec ID : A_VORBIS
Duration : 1h 30mn
Bit rate mode : Variable
Bit rate : 96.0 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 62.4 MiB (1%)
Writing library : libVorbis 1.1.1/1.1.2 (UTC 2005-03-04)
Language : Korean
Text #1
ID : 7
Format : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info : Advanced Sub Station Alpha
Compression mode : Lossless
Language : English
Text #2
ID : 8
Format : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info : Advanced Sub Station Alpha
Compression mode : Lossless
Language : French
Text #3
ID : 9
Format : VobSub
Muxing mode : zlib
Codec ID : S_VOBSUB
Codec ID/Info : The same subtitle format used on DVDs
Language : Chinese
Text #4
ID : 10
Format : VobSub
Muxing mode : zlib
Codec ID : S_VOBSUB
Codec ID/Info : The same subtitle format used on DVDs
Language : Chinese
Text #5
ID : 11
Format : VobSub
Muxing mode : zlib
Codec ID : S_VOBSUB
Codec ID/Info : The same subtitle format used on DVDs
Language : Korean
RedSuisei:
I personally don't use directshowsource since it's known not to be frame-accurate, and I'm not in a position to try out how dss loads flac file with my computer, so I'd recommend trying out ffmpegsource2 to load the video and audio in avisynth. I've been using that for a while and it loads flac audio just fine. One issue is that when you first open the script, it'll create an index of the file which may take a few minutes (but it's what makes ffms2 frame-accurate).
Just to be sure, what's your avisynth version, and is it x86 or x64?
Bob2004:
2.5.8.5, and it's x86. Thanks for the suggestion, I'll give ffmpegsource2 a go now.
EDIT: Unfortunately, when I do "A = FFAudioSource(Clip+".flac")", it just gives me an error saying "FFAudioSource: Can't Parse File". Maybe there's something wrong with the audio, it wouldn't at all surprise me if THORA encoded it with some settings that go way beyond the specification or something. Maybe I'll try and transcode it into AC3 or something myself tomorrow and give that a go.
Temuthril:
Give eac3to a try if you're re-encoding audio to something else.
revo:
--- Quote from: Temuthril on August 16, 2012, 08:53:33 AM ---Give eac3to a try if you're re-encoding audio to something else.
--- End quote ---
yeah
eac3to rules :D
and FFvideosource is a must :)
Navigation
[0] Message Index
[#] Next page
Go to full version