Log in

View Full Version : How to specify what way to open video file


GacekSSJ4
28th September 2013, 15:44
I'm trying for a past hour or so to open a file in avisynth, want to learn a bit more of avisynth (i was using some avisynth few years ago, but I just can't open a file or don't remember how).

My .avs is:
AVISource("film_ze_slubu_1.avi", false)
#DirectShowSource("film_ze_slubu_1.avi")


## General
## Complete name : F:\filmy\film_ze_slubu_1.avi
## Format : AVI
## Format/Info : Audio Video Interleave
## File size : 147 MiB
## Duration : 23mn 2s
## Overall bit rate : 889 Kbps
##
## Video
## ID : 0
## Format : MPEG-4 Visual
## Format settings, BVOP : 1
## Format settings, QPel : No
## Format settings, GMC : No warppoints
## Format settings, Matrix : Default (H.263)
## Muxing mode : Packed bitstream
## Codec ID : DX50
## Codec ID/Hint : DivX 5
## Duration : 23mn 2s
## Bit rate : 652 Kbps
## Width : 512 pixels
## Height : 384 pixels
## Display aspect ratio : 4:3
## Frame rate : 25.054 fps
## Color space : YUV
## Chroma subsampling : 4:2:0
## Bit depth : 8 bits
## Scan type : Progressive
## Compression mode : Lossy
## Bits/(Pixel*Frame) : 0.132
## Stream size : 107 MiB (73%)
## Writing library : DivX 6.1.1 (UTC 2006-02-01)
##
## Audio
## ID : 1
## Format : MPEG Audio
## Format version : Version 1
## Format profile : Layer 2
## Codec ID : 50
## Duration : 23mn 2s
## Bit rate mode : Constant
## Bit rate : 224 Kbps
## Channel(s) : 2 channels
## Sampling rate : 48.0 KHz
## Compression mode : Lossy
## Stream size : 36.9 MiB (25%)
## Alignment : Aligned on interleaves
## Interleave, duration : 24 ms (0.60 video frame)
## Interleave, preload duration : 480 ms
## Title : Audio Stream

When I open file in MplayerClassic it shows me:

F:\filmy\testscriipt.avs::Avisynth video #1

Media Type 0:
--------------------------
Video: YV12 512x384 25.05fps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Video {73646976-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_YV12 {32315659-0000-0010-8000-00AA00389B71}
formattype: FORMAT_VideoInfo {05589F80-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 294912
cbFormat: 88

VIDEOINFOHEADER:
rcSource: (0,0)-(0,0)
rcTarget: (0,0)-(0,0)
dwBitRate: 0
dwBitErrorRate: 0
AvgTimePerFrame: 399137

BITMAPINFOHEADER:
biSize: 40
biWidth: 512
biHeight: 384
biPlanes: 1
biBitCount: 12
biCompression: YV12
biSizeImage: 294912
biXPelsPerMeter: 0
biYPelsPerMeter: 0
biClrUsed: 0
biClrImportant: 0

pbFormat:
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0020: 00 00 00 00 00 00 00 00 21 17 06 00 00 00 00 00 ........!.......
0030: 28 00 00 00 00 02 00 00 80 01 00 00 01 00 0c 00 (.......€.......
0040: 59 56 31 32 00 80 04 00 00 00 00 00 00 00 00 00 YV12.€..........
0050: 00 00 00 00 00 00 00 00 ........


Is there any way to determine how to open a file?

Gavino
30th September 2013, 12:03
AviSource relies on having the appropriate VfW filters installed on your system.
Similarly, DirectShowSource requires the presence of appropriate DirectShow filters.

A good way to add filters which will handle most videos is to install ffdshow (http://sourceforge.net/projects/ffdshow-tryout/).

Another solution is to use FFmpegsource() from the ffms2 (http://code.google.com/p/ffmpegsource) plugin, which has the necessary filters built-in.