niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » Linux » Distributions » Debian
ffmpeg - piped input (from dvgrab) problem
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
Author Message
Jerry L Bash
*nix forums beginner


Joined: 04 Feb 2005
Posts: 2

PostPosted: Fri Feb 04, 2005 1:20 pm    Post subject: ffmpeg - piped input (from dvgrab) problem Reply with quote

Hi,

I need to capture analog video and convert to mpeg 'on the fly'. I am
trying to use hardware that I currently have, which includes a canopus
ADCV-100 capture device, and a PC running debian linux (sid). I need a
command line interface (or something that can be easily scripted, and I
discovered dvgrab and ffmpeg in my googling. Seemed like this should be
do-able, so I installed a 1394 capture card in the PC and began.
Initially, I installed the 2.6.10 kernel (a debian build), but found
(googling) that there were some problems with that (which I was
experiencing as well), so I reverted to a 2.4 kernel.


To date, I have been able to capture the video and store to a file:

dvgrab foo- (which stores .avi files in the default format (.avi) and the
default size (1GB) ...

I can view them (using vlc or xine) as well as convert these files to mpg
files without problems, as in:

ffmpeg -i foo-001.avi -target vcd foo-001.mpg

Again checking that the results are viewable from vlc and xine.

My final step (for now; before the next final step : ) ) is to pipe the
output of the dvgrab to ffmpeg to generate the mpg file. I was thinking
something along the lines of:

dvgrab - | ffmpeg -i - -target vcd foo-001.mpg

realizing I may have to adjust durations, etc. (I'm not sure how ffmpeg
will name the files, or for that matter, if dvgrab will split the files if
it is piping to stdout. It's a detail I'll have to work.)

However, this did not work. I get:

pipe:: Unknown format
Capture Started

(looks like the canopus starts to capture for 3 or 4 seconds, then
everything quits, and I'm back to a command prompt.

So, I try specifying the format:

dvgrab - | ffmpeg -f avi -i - -target vcd foo-001.mpg

but now, I get:

pipe: Error while opening file
Capture started

(same behavior from the canopus and command shell).



I then backed up and tried piping the output of the avi file I captured to
ffmpeg (again, from a command line, specifying '-i filename', all is
well).

cat foo-001.avi | ffmpeg -i - -target vcd foo-001.mpg

This command starts and finishes very quickly (too quickly). foo-001.mpg
is an empty file. No change if I specify the format (-f option) as above.

Just to check my syntax and procedure, I took the file I converted to mpg
(ffmpeg -i foo-001.avi -target vcd foo-001.mpg) and pipe it back through
ffmpeg:

cat foo-001.mpg | ffmpeg -i - -target dvd foo-001a.mpg

and find that this works fine.


I have tried other formats from dvgrab (dv1, dv2, raw, ...), and then
indicating that format for ffmpeg, but thusfar without success.



(Grasping for straws), I've also tried using a named pipe, not knowing
exactly how, but this is what I tried:

mkfifo vidbuff.avi
cat foo-001.avi > vidbuff.avi | ffmpeg -i - -target vcd foo-001.mpg

This just sits, as if it's waiting for input somewhere. There is probably
something wrong with my syntax here, but I'm not even sure it should be
needed.




(Potentially) Relevant additional information -

ffmpeg installation - from debian cvs20050121
dvgrab - debian package (1.7-1)

Here is an output from ffmpeg which indicates build information.

jlb@elm:~/capture/geo_20-21$ ffmpeg -i geo_2021-001.dv -target vcd
geo_2021-001.mpg
ffmpeg version 0.4.9-pre1, build 4738, Copyright (c) 2000-2004 Fabrice
Bellard
configuration: --build i386-linux --enable-gpl --enable-pp
--enable-zlib --enable-vorbis --enable-a52 --enable-dts --disable-mmx
--disable-debug --prefix=/usr
built on Jan 21 2005 19:24:19, gcc: 3.3.5 (Debian 1:3.3.5-6)


Any help you can provide would be greatly appreciated. From the posts I
have read, it seems like this should be a do-able thing. Initially I was
afraid the processor would not keep up, but it seems that ffmpeg is very
fast, as indicated in the posts, and confirmed by my tests (converting a
file is completed in less than real time (75% or so)), so it seems
reasonable. I know I may be able to use a hardware mpeg encoder, but I
like the flexibility the canopus device gives me.

Thanks in advance.
Jerry
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
The time now is Fri Jan 09, 2009 12:51 pm | All times are GMT
navigation Forum index » *nix » Linux » Distributions » Debian
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Unknown in header problem -SOLVED- Light Speed Postfix 0 Thu Jul 03, 2008 10:40 am
No new posts problem with sending mail nuxia Postfix 0 Mon Apr 21, 2008 3:58 am
No new posts Postfix 2.3.8 Virtual problem Blotto Postfix 0 Fri Apr 04, 2008 6:11 am
No new posts Postfix sending problem for local domain remote email monkey_magix Postfix 0 Mon Sep 10, 2007 10:17 am
No new posts bounce problem murkis Postfix 0 Sun Oct 08, 2006 3:45 pm

Debt Consolidation | Credit Cards | Credit Cards | Keeping Aquarium Fish | Bankruptcy
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1938s ][ Queries: 16 (0.1274s) ][ GZIP on - Debug on ]