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 29th June 2009, 22:24   #1  |  Link
bartnovsky
Registered User
 
Join Date: Feb 2009
Location: Russia, Moscow
Posts: 29
DirectShow access crash

I need to simultaneously capture and encode video(via x264) and sound(via ffmpeg to mp3, for example) from BlackMagic Intensity capture card. Here is simple script, which i used for this purpose:
v = DirectShowSource("video.grf", audio=false, fps=25, framecount=4000).ConvertToYV12
a = DirectShowSource("sound.grf", video=false, fps=25, framecount=4000)
AudioDub(a,v)
where "video.grf" and "sound.grf" are the corresponding capture graphs. When i launch encoding separately, everything is fine. But parallel starting of encoding processes from command line leads to breakdown of the one (the other is working correctly at the same time). Here are examples of error messages:
[ffmpeg]:
Input #0, avs, from 'sony_1080i.avs':
Duration: 00:00:10.00, start: 0.000000, bitrate: 0 kb/s
Stream #0.0: Video: rawvideo, rgb32, 804x80, 49397 kb/s, 24.00 tb(r)
Output file does not contain any stream
[x264]:
avis [error]: unsupported input format (DIB )
x264 [error]: could not open input file 'sony_1080i.avs'
The usage of two separate avs scripts cannot solve this problem. Everything is fine also when i use *.avi clip in the first call of DirectShowSource. Could anyone help or suggest more convenient way to achive the goal described above?
bartnovsky is offline   Reply With Quote
Old 29th June 2009, 23:51   #2  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,171
"rgb32, 804x80" That is the shape of an error message clip.

You are between a rock and a hard place. You need to see the text of that error message to proceed.

Maybe something like this will help you move forward
Code:
Try {
  v = DirectShowSource("video.grf", audio=false, fps=25, framecount=4000).ConvertToYV12
  a = DirectShowSource("sound.grf", video=false, fps=25, framecount=4000)
  AudioDub(a,v)
}
Catch(err_msg) {
  WriteFileStart("log.txt", err_msg)

# or perhaps

#  BlankClip(100, 804, 80, pixel_type="YV12")
#  Subtitle(err_msg)
}
IanB is offline   Reply With Quote
Old 30th June 2009, 01:34   #3  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,383
Quote:
Originally Posted by IanB View Post
Code:
  WriteFileStart("log.txt", err_msg)
Since the parameter to WriteFileStart is an expression, not the value itself, this needs to be:

WriteFileStart("log.txt", "err_msg")
Gavino is offline   Reply With Quote
Old 1st July 2009, 21:33   #4  |  Link
bartnovsky
Registered User
 
Join Date: Feb 2009
Location: Russia, Moscow
Posts: 29
Thanks a lot for advice! I solved this problem by such a stupid way:

The error message was:
"DirectShowSource:GRF file does not have a compatible video pin.
Graph must have 1 output pin that will bid RGB24, RGB32, ......
(.....\sony_1080i.avs line 2 (or line 1))
It seems that the call of DirectShowSource from first encoder blocked the access to GRF-files for second encoder. So I tryed to use video and audio capture graphs separatly from different scripts, but ffmpeg crashed when was becoming to encode audio from capture graph! I think this is the problem of ffmpeg software because the same graph is normally rendered by, for example, Classic Media Player (I hear my voice with little delay). Then i substituted *.avi-video instead of "video.grf", and audio-stream have been encoded correctly. Could anyone suggest any command line-operated mp3 encoder, which can use avs scripts on input or capture audio directly?
bartnovsky is offline   Reply With Quote
Reply

Tags
avisynth, directshowsource, intencity, video capture

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 11:10.


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