Log in

View Full Version : How to encode AVS file with DirectShowSource() at linux wine?


nkk
6th September 2010, 11:28
Trying to encode video at linux (CentOS) via wine and x264.

AVS:DirectShowSource("Shiki_07.mkv", fps=120, convertfps=true, audio=false)
FDecimate()
Spline36Resize( 640, 360 )
Trim(13924, 14756)

command line:$ wine x264.exe --preset faster --tune animation --crf 21.0 --keyint 300 --min-keyint 30 --bframes 3 --b-pyramid none --ref 2 --sar 1:1 --output 07.mp4 07.avs
i got this errors:Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
err:systray:initialize_systray Could not create tray window
fixme:quartz:FilterGraphNoThread_create CLSID_FilterGraphNoThread partially implemented - Forwarding to CLSID_FilterGraph
fixme:quartz:GraphConfig_AddFilterToCache (0x1b9f80)->(0x209183c): stub!
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
ALSA lib seq_hw.c:457:(snd_seq_hw_open) open /dev/snd/seq failed: Permission denied
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:3513:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:3513:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:3513:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:3985:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM default
fixme:ole:CoCreateInstance no instance created for interface {56a86895-0ad4-11ce-b03a-0020af0ba770} of class {0b0eff97-c750-462c-9488-b10e7d87f1a6}, hres is 0x80004002
err:quartz:CreateRenderingWindow Unable to create window
fixme:ole:CoCreateInstance no instance created for interface {56a86895-0ad4-11ce-b03a-0020af0ba770} of class {6bc1cffa-8fc1-4261-ac22-cfb4cc38db50}, hres is 0x80004005
err:quartz:CreateRenderingWindow Unable to create window
fixme:ole:CoCreateInstance no instance created for interface {56a86895-0ad4-11ce-b03a-0020af0ba770} of class {70e102b0-5556-11ce-97c0-00aa0055595a}, hres is 0x80004005
^C

I think it`s DirectShowSource() working incorrectly. How to fix it? :-)

nm
6th September 2010, 12:15
Do you really need DirectShowSource? I'd use FFMS2 (http://code.google.com/p/ffmpegsource/) instead.

nkk
6th September 2010, 12:28
Do you really need DirectShowSource? I'd use FFMS2 (http://code.google.com/p/ffmpegsource/) instead.

:thanks: It's wery good idea!

qyot27
7th September 2010, 07:59
You can't use DirectShowSource in Wine because Wine doesn't support DirectShow fully enough to do so, and last I checked there is no ETA on when it will. Not even installing the Platform 2003 SDK through winetricks can fix it.

http://wiki.winehq.org/DirectShow

nkk
10th September 2010, 07:37
qyot27, domo arigato

And how to prevent audio/video desynchronization on VFR vodeo?

I`m encoding video using script (in.avs):FFmpegSource2("input_file").FDecimate().Spline36Resize(640,360)
andwine x264.exe --preset faster --tune animation --crf 21.0 --keyint 300 --min-keyint 30 --bframes 3 --b-pyramid none --ref 2 --sar 1:1 --output out.mp4 in.avs

and audio:mplayer -ao pcm:fast:file=tmp.wav -vo /dev/null -vc null input_file && \
wine neroAacEnc.exe -ignorelength -q 0.3 -if tmp.wav -of out.m4a

LoRd_MuldeR
10th September 2010, 12:15
wine x264.exe --preset faster --tune animation --crf 21.0 --keyint 300 --min-keyint 30 --bframes 3 --b-pyramid none --ref 2 --sar 1:1 --output out.mp4 in.avs

Why not use a "native" Linux build of x264 and pipe in the AVS input via avs2yuv from Wine?

wine avs2yuv.exe source.avs | x264 --preset faster --tune animation --crf 21.0 [...] --output output.mkv --frames 1234 --demuxer y4m --stdin y4m -

J_Darnley
10th September 2010, 12:54
--demuxer y4m --stdin y4m

Isn't this a little redundant? You only need one of those

kemuri-_9
10th September 2010, 13:19
Isn't this a little redundant? You only need one of those

correct: --stdin is simply an alias for --demuxer

qyot27, domo arigato

And how to prevent audio/video desynchronization on VFR vodeo?

if your source is VFR, then normally you could get the timecodes from it and pass it to x264cli, since you're processing it through avisynth which is CFR.

however since you're decimating it within avisynth, the original timecodes are not aligned with the output from avisynth, so you'll need to additionally fix them.
continuing to use FDecimate will make the work a lot harder as it has no way of indicating which frames were decimated so your original timecodes file is useless as you don't even have an idea of how to fix it.

nkk
10th September 2010, 21:18
Now I got more questions then had answers