Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th June 2018, 00:52   #1  |  Link
andoru
Registered User
 
Join Date: Jul 2016
Posts: 5
AviSynth pipe to Linux ffmpeg?

I'm trying to my avs expose scripts to ffmpeg so I could encode them to vp9 video on linux.
I've tried using avs2pipemod, but ffmpeg can't seem to detect/understand the video data being piped so either it's not supposed to work through Wine and pipe video data to ffmpeg, or I'm doing something wrong.
I've also seen that avs2yuv can be used for this, but I wanted to be able to encode RGB video.
Does anyone know of any alternatives? Or perhaps a way to encode my avs scripts to VP9 video under Wine?
andoru is offline   Reply With Quote
Old 9th June 2018, 06:37   #2  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Never tried avs2pipemod, but I can confirm that avs2yuv works fine (with YV12, YV16, YV24).
Quote:
or I'm doing something wrong.
Since you don't show the command lines you use, how should anyone know?

Also you did read this from the help of avs2pipemod?
Quote:
note1 : in yuv4mpeg2 output mode, RGB input that has 720pix height or more
will be converted to YUV with Rec.709 coefficients instead of Rec.601.
If you use something with a height > 720pixel and expect the input to be RGB this might cause problems,..

Quote:
Or perhaps a way to encode my avs scripts to VP9 video under Wine?
use a 32bit ffmpeg version compiled for Windows. (64bit if you use 64bit Avisynth)

Cu Selur

Ps.: may be switch to Vapoursynth and drop wine,..
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 9th June 2018, 11:27   #3  |  Link
andoru
Registered User
 
Join Date: Jul 2016
Posts: 5
Quote:
Originally Posted by Selur View Post
Since you don't show the command lines you use, how should anyone know?
Fair point, here you go:

Code:
$ wine ~/.wine/drive_c/avs2pipemod.exe -rawvideo ./test.avs | ffmpeg -i pipe: -c:v libvpx-vp9 -lossless 1 output.webm


[...]

avs2pipemod[info]: writing 3438 frames of 1920x1080 BGR-packed-8bit rawvideo.
pipe:: Invalid data found when processing input
avs2pipemod[info]: finished, wrote 0 frames [0%].
avs2pipemod[info]: total elapsed time is 0.160 sec.
avs2pipemod[error]: only wrote 0 of 3438 frames.

Quote:
Originally Posted by Selur View Post
Also you did read this from the help of avs2pipemod?


If you use something with a height > 720pixel and expect the input to be RGB this might cause problems,..
I did read that, but I thought since I've set avs2pipemod to output raw video, I wouldn't have limitations. Besides, I want the input as well as the output to be RGB, that's one of the reasons why I chose to use VP9.


Quote:
Originally Posted by Selur View Post
use a 32bit ffmpeg version compiled for Windows. (64bit if you use 64bit Avisynth)

I think I'll go down this path, thanks.
andoru is offline   Reply With Quote
Old 9th June 2018, 14:06   #4  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Quote:
-rawvideo ./test.avs | ffmpeg -i pipe:
There is your problem. You are feeding raw video which has no headers and ffmpeg thus doesn't know how to process what you feed it with,...
If you feed ffmpeg with raw video you need set resolution, format, etc. before the input otherwise how should ffmpeg know what that data is that you feed to it.
something similar to:
Code:
 .. | ffmpeg -pix_fmt yuv422p -s 640x352 -f rawvideo -i - ...
should be used,...
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 9th June 2018 at 14:10.
Selur is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:28.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.