Quantcast

ffmpeg and pipe output

classic Classic list List threaded Threaded
91 messages Options
12345
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ffmpeg and pipe output

Rob, M0DTS
Hi All

It's my first post here after spending a lot of time hunting on the web
to find a solution to my problem, i did not find a solution.

I'm trying to use ffmpeg to output to a pipe..

I'm trying to send video elementry stream to a program called
esvideo2pes which is part of the OpenCaster DVB package.

ffmpeg hangs when i try to do this and does not start encoding.

Script is something like this:


#

mkfifo /tmp/video.es

fmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
-bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
1024k  /tmp/video.es &

esvideo2pes /tmp/video.es > video.pes

etc
etc


I hope someone can point me in the right direction, eventually i would
like to generate both audio and video elementry streams at once and send
them to fifo's for further processing but we better get one working
first!

Thanks

Rob

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Jan Stary
On Jan 02 16:48:04, Rob, M0DTS wrote:

> Hi All
>
> It's my first post here after spending a lot of time hunting on the web
> to find a solution to my problem, i did not find a solution.
>
> I'm trying to use ffmpeg to output to a pipe..
>
> I'm trying to send video elementry stream to a program called
> esvideo2pes which is part of the OpenCaster DVB package.
>
> ffmpeg hangs when i try to do this and does not start encoding.
>
> Script is something like this:
>

Give us the exact command line.

> #
>
> mkfifo /tmp/video.es
>
> fmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
> -bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
> 1024k  /tmp/video.es &

There's no "fmpeg", and you don't even specify a format, framerate,
or size for the /dev/video input, so this cannot work (pipes or not);
or this is not your commandline.

> esvideo2pes /tmp/video.es > video.pes

What is "es", what is "pes", what is esvideo2eps suppose to do,
and why don't you do it in ffmpeg directly?

> I hope someone can point me in the right direction, eventually i would
> like to generate both audio and video elementry streams at once and send
> them to fifo's for further processing but we better get one working
> first!

What are you trying to do, really?

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Rob, M0DTS
On Sat, 2010-01-02 at 19:13 +0100, Jan Stary wrote:

> On Jan 02 16:48:04, Rob, M0DTS wrote:
> > Hi All
> >
> > It's my first post here after spending a lot of time hunting on the web
> > to find a solution to my problem, i did not find a solution.
> >
> > I'm trying to use ffmpeg to output to a pipe..
> >
> > I'm trying to send video elementry stream to a program called
> > esvideo2pes which is part of the OpenCaster DVB package.
> >
> > ffmpeg hangs when i try to do this and does not start encoding.
> >
> > Script is something like this:
> >
>
> Give us the exact command line.
>
> > #
> >
> > mkfifo /tmp/video.es
> >
> > fmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
> > -bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
> > 1024k  /tmp/video.es &
>
> There's no "fmpeg", and you don't even specify a format, framerate,
> or size for the /dev/video input, so this cannot work (pipes or not);
> or this is not your commandline.
>
> > esvideo2pes /tmp/video.es > video.pes
>
> What is "es", what is "pes", what is esvideo2eps suppose to do,
> and why don't you do it in ffmpeg directly?
>
> > I hope someone can point me in the right direction, eventually i would
> > like to generate both audio and video elementry streams at once and send
> > them to fifo's for further processing but we better get one working
> > first!
>
> What are you trying to do, really?


Ok The /dev/video0 video comes from a hauppauge capture card in MPEG-2
program stream format - see below.
The command line is what i'm running (but is ffmpeg yes!)
There are some v4l2 commands to set the mpeg encoder, see below...
Some parameters are set by default so are not included like framerate of
25 for example.

v4l2-ctl -c stream_type=0
v4l2-ctl -c video_bitrate=15000000
v4l2-ctl -c video_bitrate_mode=1
v4l2-ctl -c video_aspect=1
v4l2-ctl --set-fmt-video=width=704,height=576
v4l2-ctl --set-input=2

ffmpeg seems to be the only way i can seperate out the elementry streams
from the program stream coming from the device. The tools in opencaster
do not support program stream input, only elementry streams.

What i'm doing is generating some elementry CBR (or as close as
possible) streams for the audio and video, they eventually need to be
seperate transport streams which as far as i'm aware ffmpeg cannot
do...?

This is why i'm using seperate tools to convert from elementry stream to
program stream to transport stream with the associated pid's that I
require - without re-compiling i dont think ffmpeg can change pid's
either..?

These audio and video transport streams are them re-muxed with another
program along with PAT,PMT,SDT  etc...


I hope i have made some sense of that for you!

Rob



_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Henk D. Schoneveld
In reply to this post by Rob, M0DTS
Rob, M0DTS wrote:

> Hi All
>
> It's my first post here after spending a lot of time hunting on the web
> to find a solution to my problem, i did not find a solution.
>
> I'm trying to use ffmpeg to output to a pipe..
>
> I'm trying to send video elementry stream to a program called
> esvideo2pes which is part of the OpenCaster DVB package.
>
> ffmpeg hangs when i try to do this and does not start encoding.
>
> Script is something like this:
>
>
> #
>
> mkfifo /tmp/video.es
>
> fmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
> -bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
> 1024k  /tmp/video.es &
>
> esvideo2pes /tmp/video.es > video.pes
Your source is DVB, which is ts, and as I understand you want it to be a
pes ? Is that right ?
In the meantime you want to lower the bitrate to 1450k, which for mpeg2
is very low and quality will be low as a result. Is that what you want?
ffmpeg -formats gives among others
  DE mpeg            MPEG-1 System format
   E mpeg1video      raw MPEG-1 video
   E mpeg2video      raw MPEG-2 video
  DE mpegts          MPEG-2 transport stream format
  D  mpegtsraw       MPEG-2 raw transport stream format
  D  mpegvideo       raw MPEG video

and AFAIK -f mpeg gives you the wanted pes

> etc
> etc
>
>
> I hope someone can point me in the right direction, eventually i would
> like to generate both audio and video elementry streams at once and send
> them to fifo's for further processing but we better get one working
> first!
>
> Thanks
>
> Rob
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Henk D. Schoneveld
In reply to this post by Rob, M0DTS
Rob, M0DTS wrote:

> On Sat, 2010-01-02 at 19:13 +0100, Jan Stary wrote:
>> On Jan 02 16:48:04, Rob, M0DTS wrote:
>>> Hi All
>>>
>>> It's my first post here after spending a lot of time hunting on the web
>>> to find a solution to my problem, i did not find a solution.
>>>
>>> I'm trying to use ffmpeg to output to a pipe..
>>>
>>> I'm trying to send video elementry stream to a program called
>>> esvideo2pes which is part of the OpenCaster DVB package.
>>>
>>> ffmpeg hangs when i try to do this and does not start encoding.
>>>
>>> Script is something like this:
>>>
>> Give us the exact command line.
>>
>>> #
>>>
>>> mkfifo /tmp/video.es
>>>
>>> fmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
>>> -bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
>>> 1024k  /tmp/video.es &
>> There's no "fmpeg", and you don't even specify a format, framerate,
>> or size for the /dev/video input, so this cannot work (pipes or not);
>> or this is not your commandline.
>>
>>> esvideo2pes /tmp/video.es > video.pes
>> What is "es", what is "pes", what is esvideo2eps suppose to do,
>> and why don't you do it in ffmpeg directly?
>>
>>> I hope someone can point me in the right direction, eventually i would
>>> like to generate both audio and video elementry streams at once and send
>>> them to fifo's for further processing but we better get one working
>>> first!
>> What are you trying to do, really?
>
>
> Ok The /dev/video0 video comes from a hauppauge capture card in MPEG-2
> program stream format - see below.
Is it an analog-capture card like the pvr-?50 models or from DVB-T or DVB-S
The DVB versions create a transport stream
If you do:
cat  /dev/video0 > test.mpg
stop it with ctrl-c
what does:
ffmpeg -i test.mpg
tell you about this file ?

> The command line is what i'm running (but is ffmpeg yes!)
> There are some v4l2 commands to set the mpeg encoder, see below...
> Some parameters are set by default so are not included like framerate of
> 25 for example.
>
> v4l2-ctl -c stream_type=0
> v4l2-ctl -c video_bitrate=15000000
> v4l2-ctl -c video_bitrate_mode=1
> v4l2-ctl -c video_aspect=1
> v4l2-ctl --set-fmt-video=width=704,height=576
> v4l2-ctl --set-input=2
>
> ffmpeg seems to be the only way i can seperate out the elementry streams
> from the program stream coming from the device. The tools in opencaster
> do not support program stream input, only elementry streams.
>
> What i'm doing is generating some elementry CBR (or as close as
> possible) streams for the audio and video, they eventually need to be
> seperate transport streams which as far as i'm aware ffmpeg cannot
> do...?
ffmpeg can do this with the -f mpegts option

>
> This is why i'm using seperate tools to convert from elementry stream to
> program stream to transport stream with the associated pid's that I
> require - without re-compiling i dont think ffmpeg can change pid's
> either..?
>
> These audio and video transport streams are them re-muxed with another
> program along with PAT,PMT,SDT  etc...
>
>
> I hope i have made some sense of that for you!
>
> Rob
>
>
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Jan Stary
In reply to this post by Rob, M0DTS
On Jan 02 18:33:43, Rob, M0DTS wrote:

> On Sat, 2010-01-02 at 19:13 +0100, Jan Stary wrote:
> > On Jan 02 16:48:04, Rob, M0DTS wrote:
> > > Hi All
> > >
> > > It's my first post here after spending a lot of time hunting on the web
> > > to find a solution to my problem, i did not find a solution.
> > >
> > > I'm trying to use ffmpeg to output to a pipe..
> > >
> > > I'm trying to send video elementry stream to a program called
> > > esvideo2pes which is part of the OpenCaster DVB package.
> > >
> > > ffmpeg hangs when i try to do this and does not start encoding.
> > >
> > > Script is something like this:
> > >
> >
> > Give us the exact command line.
> >
> > > #
> > >
> > > mkfifo /tmp/video.es
> > >
> > > fmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
> > > -bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
> > > 1024k  /tmp/video.es &
> >
> > There's no "fmpeg", and you don't even specify a format, framerate,
> > or size for the /dev/video input, so this cannot work (pipes or not);
> > or this is not your commandline.
> >
> > > esvideo2pes /tmp/video.es > video.pes
> >
> > What is "es", what is "pes", what is esvideo2eps suppose to do,
> > and why don't you do it in ffmpeg directly?
> >
> > > I hope someone can point me in the right direction, eventually i would
> > > like to generate both audio and video elementry streams at once and send
> > > them to fifo's for further processing but we better get one working
> > > first!
> >
> > What are you trying to do, really?
>
>
> Ok The /dev/video0 video comes from a hauppauge capture card in MPEG-2
> program stream format - see below.

But you need to tell ffmpeg that, which you don't.

> The command line is what i'm running (but is ffmpeg yes!)

Please use script(1) to give us the exact commandline(s),
and ffmpeg's exact response.

> There are some v4l2 commands to set the mpeg encoder, see below...
> Some parameters are set by default so are not included like framerate of
> 25 for example.
>
> v4l2-ctl -c stream_type=0
> v4l2-ctl -c video_bitrate=15000000
> v4l2-ctl -c video_bitrate_mode=1
> v4l2-ctl -c video_aspect=1
> v4l2-ctl --set-fmt-video=width=704,height=576
> v4l2-ctl --set-input=2

Whether you use some 3rd party tool to set the capturing card's
parameters or they are the card's defaults, you still need to
tell ffmpeg what these are, which you don't.

> ffmpeg seems to be the only way i can seperate out the elementry streams
> from the program stream coming from the device.

What "elementry streams". You use "-an" on a capturing device,
so there's just one video stream (an mpeg2video stream).

> The tools in opencaster
> do not support program stream input, only elementry streams.
>
> What i'm doing is generating some elementry CBR (or as close as
> possible) streams for the audio and video,

There's no audio; you say "-an" yourself".

> they eventually need to be seperate transport streams

Why?

> which as far as i'm aware ffmpeg cannot do...?
>
> This is why i'm using seperate tools to convert from elementry stream to
> program stream to transport stream with the associated pid's that I
> require - without re-compiling i dont think ffmpeg can change pid's
> either..?

Sorry, I don;t know what "pid"s are in this context,
and what you require about them ...

> These audio and video transport streams are them re-muxed with another
> program along with PAT,PMT,SDT  etc...
>
> I hope i have made some sense of that for you!

Not really. From the command you showed us, I gather you
are trying to capture one mpeg2stream - and than do _what_
with it? Give us the big picture.


_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Rob, M0DTS
In reply to this post by Henk D. Schoneveld
belcampo wrote:

> Rob, M0DTS wrote:
>> On Sat, 2010-01-02 at 19:13 +0100, Jan Stary wrote:
>>> On Jan 02 16:48:04, Rob, M0DTS wrote:
>>>> Hi All
>>>>
>>>> It's my first post here after spending a lot of time hunting on the
>>>> web
>>>> to find a solution to my problem, i did not find a solution.
>>>>
>>>> I'm trying to use ffmpeg to output to a pipe..
>>>>
>>>> I'm trying to send video elementry stream to a program called
>>>> esvideo2pes which is part of the OpenCaster DVB package.
>>>>
>>>> ffmpeg hangs when i try to do this and does not start encoding.
>>>>
>>>> Script is something like this:
>>>>
>>> Give us the exact command line.
>>>
>>>> #
>>>>
>>>> mkfifo /tmp/video.es
>>>>
>>>> fmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f
>>>> mpeg2video
>>>> -bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
>>>> 1024k  /tmp/video.es &
>>> There's no "fmpeg", and you don't even specify a format, framerate,
>>> or size for the /dev/video input, so this cannot work (pipes or not);
>>> or this is not your commandline.
>>>
>>>> esvideo2pes /tmp/video.es > video.pes
>>> What is "es", what is "pes", what is esvideo2eps suppose to do,
>>> and why don't you do it in ffmpeg directly?
>>>
>>>> I hope someone can point me in the right direction, eventually i would
>>>> like to generate both audio and video elementry streams at once and
>>>> send
>>>> them to fifo's for further processing but we better get one working
>>>> first!
>>> What are you trying to do, really?
>>
>>
>> Ok The /dev/video0 video comes from a hauppauge capture card in MPEG-2
>> program stream format - see below.
> Is it an analog-capture card like the pvr-?50 models or from DVB-T or
> DVB-S
> The DVB versions create a transport stream
> If you do:
> cat  /dev/video0 > test.mpg
> stop it with ctrl-c
> what does:
> ffmpeg -i test.mpg
> tell you about this file ?

Ok the capture card is Analogue PVR-350

Here's the test file report...

rob@DATV:~/datv$ ffmpeg -i test.mpg
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et
al.
  configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg
--enable-libgsm --enable-dc1394 --disable-debug --enable-shared
--prefix=/usr
  libavutil version: 1d.49.3.0
  libavcodec version: 1d.51.38.0
  libavformat version: 1d.51.10.0
  built on Mar 16 2009 21:19:49, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Input #0, mpeg, from 'test.mpg':
  Duration: 00:00:02.9, start: 0.276156, bitrate: 16046 kb/s
  Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 704x576, 15000 kb/s,
25.00 fps(r)
  Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 192 kb/s
Must supply at least one output file
rob@DATV:~/datv$


>> The command line is what i'm running (but is ffmpeg yes!)
>> There are some v4l2 commands to set the mpeg encoder, see below...
>> Some parameters are set by default so are not included like framerate of
>> 25 for example.
>>
>> v4l2-ctl -c stream_type=0          
>> v4l2-ctl -c video_bitrate=15000000      
>> v4l2-ctl -c video_bitrate_mode=1  
>> v4l2-ctl -c video_aspect=1      
>> v4l2-ctl --set-fmt-video=width=704,height=576  
>> v4l2-ctl --set-input=2  
>>
>> ffmpeg seems to be the only way i can seperate out the elementry streams
>> from the program stream coming from the device. The tools in opencaster
>> do not support program stream input, only elementry streams.
>>
>> What i'm doing is generating some elementry CBR (or as close as
>> possible) streams for the audio and video, they eventually need to be
>> seperate transport streams which as far as i'm aware ffmpeg cannot
>> do...?
> ffmpeg can do this with the -f mpegts option

Ok, but can i change the video pid and stop the other pids like pat pmt
etc? i think they are added in during muxing..

>>
>> This is why i'm using seperate tools to convert from elementry stream to
>> program stream to transport stream with the associated pid's that I
>> require - without re-compiling i dont think ffmpeg can change pid's
>> either..?
>>
>> These audio and video transport streams are them re-muxed with another
>> program along with PAT,PMT,SDT  etc...
>>
>>
>> I hope i have made some sense of that for you!
>>
>> Rob
>>
>>
>>
>> _______________________________________________
>> ffmpeg-user mailing list
>> [hidden email]
>> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
>

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Rob, M0DTS
In reply to this post by Jan Stary
Jan Stary wrote:

> On Jan 02 18:33:43, Rob, M0DTS wrote:
>  
>> On Sat, 2010-01-02 at 19:13 +0100, Jan Stary wrote:
>>    
>>> On Jan 02 16:48:04, Rob, M0DTS wrote:
>>>      
>>>> Hi All
>>>>
>>>> It's my first post here after spending a lot of time hunting on the web
>>>> to find a solution to my problem, i did not find a solution.
>>>>
>>>> I'm trying to use ffmpeg to output to a pipe..
>>>>
>>>> I'm trying to send video elementry stream to a program called
>>>> esvideo2pes which is part of the OpenCaster DVB package.
>>>>
>>>> ffmpeg hangs when i try to do this and does not start encoding.
>>>>
>>>> Script is something like this:
>>>>
>>>>        
>>> Give us the exact command line.
>>>
>>>      
>>>> #
>>>>
>>>> mkfifo /tmp/video.es
>>>>
>>>> fmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
>>>> -bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
>>>> 1024k  /tmp/video.es &
>>>>        
>>> There's no "fmpeg", and you don't even specify a format, framerate,
>>> or size for the /dev/video input, so this cannot work (pipes or not);
>>> or this is not your commandline.
>>>
>>>      
>>>> esvideo2pes /tmp/video.es > video.pes
>>>>        
>>> What is "es", what is "pes", what is esvideo2eps suppose to do,
>>> and why don't you do it in ffmpeg directly?
>>>
>>>      
>>>> I hope someone can point me in the right direction, eventually i would
>>>> like to generate both audio and video elementry streams at once and send
>>>> them to fifo's for further processing but we better get one working
>>>> first!
>>>>        
>>> What are you trying to do, really?
>>>      
>> Ok The /dev/video0 video comes from a hauppauge capture card in MPEG-2
>> program stream format - see below.
>>    
>
> But you need to tell ffmpeg that, which you don't.
>
>  
>> The command line is what i'm running (but is ffmpeg yes!)
>>    
>
> Please use script(1) to give us the exact commandline(s),
> and ffmpeg's exact response.
>
>  
>> There are some v4l2 commands to set the mpeg encoder, see below...
>> Some parameters are set by default so are not included like framerate of
>> 25 for example.
>>
>> v4l2-ctl -c stream_type=0
>> v4l2-ctl -c video_bitrate=15000000
>> v4l2-ctl -c video_bitrate_mode=1
>> v4l2-ctl -c video_aspect=1
>> v4l2-ctl --set-fmt-video=width=704,height=576
>> v4l2-ctl --set-input=2
>>    
>
> Whether you use some 3rd party tool to set the capturing card's
> parameters or they are the card's defaults, you still need to
> tell ffmpeg what these are, which you don't.
>
>  
>> ffmpeg seems to be the only way i can seperate out the elementry streams
>> from the program stream coming from the device.
>>    
>
> What "elementry streams". You use "-an" on a capturing device,
> so there's just one video stream (an mpeg2video stream).
>
>  
>> The tools in opencaster
>> do not support program stream input, only elementry streams.
>>
>> What i'm doing is generating some elementry CBR (or as close as
>> possible) streams for the audio and video,
>>    
>
> There's no audio; you say "-an" yourself".
>
>  
>> they eventually need to be seperate transport streams
>>    
>
> Why?
>
>  
>> which as far as i'm aware ffmpeg cannot do...?
>>
>> This is why i'm using seperate tools to convert from elementry stream to
>> program stream to transport stream with the associated pid's that I
>> require - without re-compiling i dont think ffmpeg can change pid's
>> either..?
>>    
>
> Sorry, I don;t know what "pid"s are in this context,
> and what you require about them ...
>
>  
Ok here's the bits i'm currently doing, audio is forgotten about for now
until i get at least video working.


Here is the exact shell script i used to start it off..
If i tell ffmpeg to output to a normal test.mpg file and not a fifo it
encodes without any problem.

#!/bin/sh

# Batch file for  PVR-350 Card


#PVR-150 card settings..
v4l2-ctl -c audio_layer_ii_bitrate=9 #192Kbps
v4l2-ctl -c audio_stereo_mode=0 #Stereo
v4l2-ctl -c stream_type=0 #MPEG-2 Program Stream=0
v4l2-ctl -c video_bitrate=15000000 #Set Video Bitrate
v4l2-ctl -c video_bitrate_mode=1 #CBR
v4l2-ctl -c video_aspect=1 #4:3
v4l2-ctl --set-fmt-video=width=704,height=576 #704x576 resolution
v4l2-ctl --set-input=2

v4l2-ctl --log-status #Show PVR-350 status

mkfifo /tmp/video.pes
mkfifo /tmp/video.es



ffmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
-bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
1024k /tmp/video.es &
esvideo2pes /tmp/video.es > video.pes





Here is the script log but ends imcomplete...???



Script started on Sat 02 Jan 2010 19:34:40 GMT
]0;rob@DATV: ~/datvrob@DATV:~/datv$ ./test
ioctl: VIDIOC_S_FMT
Video input set to 2 (Composite 1)

Status Log:

   [19428.074259] ivtv0: =================  START STATUS CARD #0
=================
   [19428.074269] ivtv0: Version: 1.1.0 Card: Hauppauge WinTV PVR-350
   [19428.114529] tveeprom 2-0050: Hauppauge model 48135, rev J324,
serial# 6815344
   [19428.114533] tveeprom 2-0050: tuner model is Philips FM1246 (idx
24, type 1)
   [19428.114536] tveeprom 2-0050: TV standards PAL(I) (eeprom 0x10)
   [19428.114539] tveeprom 2-0050: audio processor is MSP4418 (idx 25)
   [19428.114541] tveeprom 2-0050: decoder processor is SAA7115 (idx
19)
   [19428.114543] tveeprom 2-0050: has radio, has IR receiver, has no IR
transmitter
   [19428.114553] tuner 2-0061: Tuner mode:      analog TV
   [19428.114556] tuner 2-0061: Frequency:       567.00 MHz
   [19428.114558] tuner 2-0061: Standard:        0x0000000f
   [19428.114561] saa7115 2-0021: Audio frequency: 48000 Hz
   [19428.115889] saa7115 2-0021: Input:           Composite 0
   [19428.115892] saa7115 2-0021: Video signal:    bad
   [19428.115894] saa7115 2-0021: Frequency:       50 Hz
   [19428.115896] saa7115 2-0021: Detected format: BW/No color
   [19428.115898] saa7115 2-0021: Width, Height:   704, 576
   [19428.115901] saa7127 2-0044: Standard: 50 Hz
   [19428.115902] saa7127 2-0044: Input:    normal
   [19428.115904] saa7127 2-0044: Output:   S-Video + Composite
   [19428.115907] saa7127 2-0044: WSS:      disabled
   [19428.115908] saa7127 2-0044: VPS:      disabled
   [19428.115910] saa7127 2-0044: CC:       disabled
   [19428.117028] msp3400 2-0040: MSP4418G-A2 rev1 = 0x0117 rev2 =
0x1242
   [19428.117031] msp3400 2-0040: Audio:    volume 58880
   [19428.117034] msp3400 2-0040: Mode:     External input
   [19428.117035] msp3400 2-0040: Audmode:  0x0001
   [19428.117038] msp3400 2-0040: Routing:  0x00222220 (input)
0x00000044 (output)
   [19428.117040] msp3400 2-0040: ACB:      0x0c00
   [19428.117043] ivtv0: Video Input:  Composite 1
   [19428.117044] ivtv0: Audio Input:  Line In 1
   [19428.117046] ivtv0: Video Output: S-Video + Composite
   [19428.117048] ivtv0: Audio Output: A/V Audio Out (Stereo/Bilingual:
Stereo/Left)
   [19428.117050] ivtv0: Output Mode:  None
   [19428.117163] ivtv0: Overlay:      Off, Alpha: Global, Pixel Format:
ARGB 8:8:8:8
   [19428.117165] ivtv0: Tuner:  TV
   [19428.117168] ivtv0: Stream: MPEG-2 Program Stream
   [19428.117170] ivtv0: VBI Format: No VBI
   [19428.117173] ivtv0: Video:  704x576, 25 fps
   [19428.117175] ivtv0: Video:  MPEG-2, 4x3, Constant Bitrate,
15000000
   [19428.117178] ivtv0: Video:  GOP Size 12, 2 B-Frames, No GOP
Closure
   [19428.117180] ivtv0: Audio:  48 kHz, Layer II, 192 kbps, Stereo, No
Emphasis, No CRC
   [19428.117184] ivtv0: Spatial Filter:  Manual, Luma 1D Horizontal,
Chroma 1D Horizontal, 0
   [19428.117187] ivtv0: Temporal Filter: Manual, 0
   [19428.117189] ivtv0: Median Filter:   Off, Luma [0, 255], Chroma [0,
255]
   [19428.117191] ivtv0: Status flags:    0x00200080
   [19428.117193] ivtv0: Stream encoder MPG: status 0x0000, 0% of 4096
KiB (128 buffers) in use
   [19428.117196] ivtv0: Stream encoder YUV: status 0x0000, 0% of 2050
KiB (162 buffers) in use
   [19428.117199] ivtv0: Stream encoder VBI: status 0x0000, 0% of 1049
KiB (41 buffers) in use
   [19428.117202] ivtv0: Stream encoder PCM: status 0x0000, 0% of 324
KiB (72 buffers) in use
   [19428.117205] ivtv0: Stream decoder MPG: status 0x0000, 0% of 1024
KiB (16 buffers) in use
   [19428.117208] ivtv0: Stream decoder VBI: status 0x0000, 0% of 65 KiB
(29 buffers) in use
   [19428.117211] ivtv0: Stream decoder YUV: status 0x0000, 0% of 1063
KiB (21 buffers) in use
   [19428.117213] ivtv0: Read MPG/VBI: 5242880/0 bytes
   [19428.117216] ivtv0: ==================  END STATUS CARD #0
==================
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et
al.
  configuration: --enable-gpl --enable-pp --enable-swscaler --enable-

script seesm to miss off the end of what is seen in the terminal..



This is what i see on terminal where it hangs.....

FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et
al.
  configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg
--enable-libgsm --enable-dc1394 --disable-debug --enable-shared
--prefix=/usr
  libavutil version: 1d.49.3.0
  libavcodec version: 1d.51.38.0
  libavformat version: 1d.51.10.0
  built on Mar 16 2009 21:19:49, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Input #0, mpeg, from '/dev/video0':
  Duration: N/A, bitrate: 15192 kb/s
  Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 704x576, 15000 kb/s,
25.00 fps(r)
  Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 192 kb/s

it hangs here forever...




Rob








_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Rob, M0DTS
In reply to this post by Henk D. Schoneveld
belcampo wrote:

> Rob, M0DTS wrote:
>> Hi All
>>
>> It's my first post here after spending a lot of time hunting on the web
>> to find a solution to my problem, i did not find a solution.
>>
>> I'm trying to use ffmpeg to output to a pipe..
>>
>> I'm trying to send video elementry stream to a program called
>> esvideo2pes which is part of the OpenCaster DVB package.
>>
>> ffmpeg hangs when i try to do this and does not start encoding.
>>
>> Script is something like this:
>>
>>
>> #
>>
>> mkfifo /tmp/video.es
>>
>> fmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
>> -bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
>> 1024k  /tmp/video.es &
>>
>> esvideo2pes /tmp/video.es > video.pes
> Your source is DVB, which is ts, and as I understand you want it to be
> a pes ? Is that right ?
Not exactly, it'a an anlogue card but provides Program Stream not DVB TS
but i guess ffmpeg will still extract the same information.
> In the meantime you want to lower the bitrate to 1450k, which for
> mpeg2 is very low and quality will be low as a result. Is that what
> you want?
Yes that's correct, the total mux will need to fit into 1843kbps for the
transmitter.
> ffmpeg -formats gives among others
>  DE mpeg            MPEG-1 System format
>   E mpeg1video      raw MPEG-1 video
>   E mpeg2video      raw MPEG-2 video
>  DE mpegts          MPEG-2 transport stream format
>  D  mpegtsraw       MPEG-2 raw transport stream format
>  D  mpegvideo       raw MPEG video
>
> and AFAIK -f mpeg gives you the wanted pes

Yes it should do but i stil have to send this to another program to get
it to TS so there is still the need to use the pipe output which is the
main problem.
The TS i require at the end of this needs to be only one component,  the
video or audio stream encapsulated as TS but not with all the usual
information that is added like pat,pmt,sdt etc.. this is created
seperately and added later.


>> etc
>> etc
>>
>>
>> I hope someone can point me in the right direction, eventually i would
>> like to generate both audio and video elementry streams at once and send
>> them to fifo's for further processing but we better get one working
>> first!
>>
>> Thanks
>>
>> Rob
>>
>>
>

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Jan Stary
In reply to this post by Rob, M0DTS
On Jan 02 19:48:35, Rob, M0DTS wrote:

> Jan Stary wrote:
>> On Jan 02 18:33:43, Rob, M0DTS wrote:
>>  
>>> On Sat, 2010-01-02 at 19:13 +0100, Jan Stary wrote:
>>>    
>>>> On Jan 02 16:48:04, Rob, M0DTS wrote:
>>>>      
>>>>> Hi All
>>>>>
>>>>> It's my first post here after spending a lot of time hunting on the web
>>>>> to find a solution to my problem, i did not find a solution.
>>>>>
>>>>> I'm trying to use ffmpeg to output to a pipe..
>>>>>
>>>>> I'm trying to send video elementry stream to a program called
>>>>> esvideo2pes which is part of the OpenCaster DVB package.
>>>>>
>>>>> ffmpeg hangs when i try to do this and does not start encoding.
>>>>>
>>>>> Script is something like this:
>>>>>
>>>>>        
>>>> Give us the exact command line.
>>>>
>>>>      
>>>>> #
>>>>>
>>>>> mkfifo /tmp/video.es
>>>>>
>>>>> fmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
>>>>> -bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
>>>>> 1024k  /tmp/video.es &
>>>>>        
>>>> There's no "fmpeg", and you don't even specify a format, framerate,
>>>> or size for the /dev/video input, so this cannot work (pipes or not);
>>>> or this is not your commandline.
>>>>
>>>>      
>>>>> esvideo2pes /tmp/video.es > video.pes
>>>>>        
>>>> What is "es", what is "pes", what is esvideo2eps suppose to do,
>>>> and why don't you do it in ffmpeg directly?
>>>>
>>>>      
>>>>> I hope someone can point me in the right direction, eventually i would
>>>>> like to generate both audio and video elementry streams at once and send
>>>>> them to fifo's for further processing but we better get one working
>>>>> first!
>>>>>        
>>>> What are you trying to do, really?
>>>>      
>>> Ok The /dev/video0 video comes from a hauppauge capture card in MPEG-2
>>> program stream format - see below.
>>>    
>>
>> But you need to tell ffmpeg that, which you don't.
>>
>>  
>>> The command line is what i'm running (but is ffmpeg yes!)
>>>    
>>
>> Please use script(1) to give us the exact commandline(s),
>> and ffmpeg's exact response.
>>
>>  
>>> There are some v4l2 commands to set the mpeg encoder, see below...
>>> Some parameters are set by default so are not included like framerate of
>>> 25 for example.
>>>
>>> v4l2-ctl -c stream_type=0
>>> v4l2-ctl -c video_bitrate=15000000
>>> v4l2-ctl -c video_bitrate_mode=1
>>> v4l2-ctl -c video_aspect=1
>>> v4l2-ctl --set-fmt-video=width=704,height=576
>>> v4l2-ctl --set-input=2
>>>    
>>
>> Whether you use some 3rd party tool to set the capturing card's
>> parameters or they are the card's defaults, you still need to
>> tell ffmpeg what these are, which you don't.
>>
>>  
>>> ffmpeg seems to be the only way i can seperate out the elementry streams
>>> from the program stream coming from the device.
>>>    
>>
>> What "elementry streams". You use "-an" on a capturing device,
>> so there's just one video stream (an mpeg2video stream).
>>
>>  
>>> The tools in opencaster
>>> do not support program stream input, only elementry streams.
>>>
>>> What i'm doing is generating some elementry CBR (or as close as
>>> possible) streams for the audio and video,
>>>    
>>
>> There's no audio; you say "-an" yourself".
>>
>>  
>>> they eventually need to be seperate transport streams
>>>    
>>
>> Why?
>>
>>  
>>> which as far as i'm aware ffmpeg cannot do...?
>>>
>>> This is why i'm using seperate tools to convert from elementry stream to
>>> program stream to transport stream with the associated pid's that I
>>> require - without re-compiling i dont think ffmpeg can change pid's
>>> either..?
>>>    
>>
>> Sorry, I don;t know what "pid"s are in this context,
>> and what you require about them ...
>>
>>  
> Ok here's the bits i'm currently doing, audio is forgotten about for now  
> until i get at least video working.
>
>
> Here is the exact shell script i used to start it off..
> If i tell ffmpeg to output to a normal test.mpg file and not a fifo it
> encodes without any problem.

We still don't know what you are trying to do.
Why don't you just save to test.mpg and postprocess it?
Why are you using fifo's at all? What's you ultimate goal?


> #!/bin/sh
>
> # Batch file for  PVR-350 Card
>
>
> #PVR-150 card settings..
> v4l2-ctl -c audio_layer_ii_bitrate=9 #192Kbps
> v4l2-ctl -c audio_stereo_mode=0 #Stereo
> v4l2-ctl -c stream_type=0 #MPEG-2 Program Stream=0
> v4l2-ctl -c video_bitrate=15000000 #Set Video Bitrate
> v4l2-ctl -c video_bitrate_mode=1 #CBR
> v4l2-ctl -c video_aspect=1 #4:3
> v4l2-ctl --set-fmt-video=width=704,height=576 #704x576 resolution  
> v4l2-ctl --set-input=2
>
> v4l2-ctl --log-status #Show PVR-350 status
>
> mkfifo /tmp/video.pes
> mkfifo /tmp/video.es
>
>
>
> ffmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
> -bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
> 1024k /tmp/video.es &
> esvideo2pes /tmp/video.es > video.pes

What is "esvideo2pes" supposed to do, and why?

>
>
>
> Here is the script log but ends imcomplete...???
>
>
>
> Script started on Sat 02 Jan 2010 19:34:40 GMT
> ]0;rob@DATV: ~/datvrob@DATV:~/datv$ ./test
> ioctl: VIDIOC_S_FMT
> Video input set to 2 (Composite 1)
>
> Status Log:
>
>   [19428.074259] ivtv0: =================  START STATUS CARD #0
> =================
>   [19428.074269] ivtv0: Version: 1.1.0 Card: Hauppauge WinTV PVR-350
>   [19428.114529] tveeprom 2-0050: Hauppauge model 48135, rev J324,
> serial# 6815344
>   [19428.114533] tveeprom 2-0050: tuner model is Philips FM1246 (idx
> 24, type 1)
>   [19428.114536] tveeprom 2-0050: TV standards PAL(I) (eeprom 0x10)
>   [19428.114539] tveeprom 2-0050: audio processor is MSP4418 (idx 25)
>   [19428.114541] tveeprom 2-0050: decoder processor is SAA7115 (idx
> 19)
>   [19428.114543] tveeprom 2-0050: has radio, has IR receiver, has no IR
> transmitter
>   [19428.114553] tuner 2-0061: Tuner mode:      analog TV
>   [19428.114556] tuner 2-0061: Frequency:       567.00 MHz
>   [19428.114558] tuner 2-0061: Standard:        0x0000000f
>   [19428.114561] saa7115 2-0021: Audio frequency: 48000 Hz
>   [19428.115889] saa7115 2-0021: Input:           Composite 0
>   [19428.115892] saa7115 2-0021: Video signal:    bad
>   [19428.115894] saa7115 2-0021: Frequency:       50 Hz
>   [19428.115896] saa7115 2-0021: Detected format: BW/No color
>   [19428.115898] saa7115 2-0021: Width, Height:   704, 576
>   [19428.115901] saa7127 2-0044: Standard: 50 Hz
>   [19428.115902] saa7127 2-0044: Input:    normal
>   [19428.115904] saa7127 2-0044: Output:   S-Video + Composite
>   [19428.115907] saa7127 2-0044: WSS:      disabled
>   [19428.115908] saa7127 2-0044: VPS:      disabled
>   [19428.115910] saa7127 2-0044: CC:       disabled
>   [19428.117028] msp3400 2-0040: MSP4418G-A2 rev1 = 0x0117 rev2 =
> 0x1242
>   [19428.117031] msp3400 2-0040: Audio:    volume 58880
>   [19428.117034] msp3400 2-0040: Mode:     External input
>   [19428.117035] msp3400 2-0040: Audmode:  0x0001
>   [19428.117038] msp3400 2-0040: Routing:  0x00222220 (input)
> 0x00000044 (output)
>   [19428.117040] msp3400 2-0040: ACB:      0x0c00
>   [19428.117043] ivtv0: Video Input:  Composite 1
>   [19428.117044] ivtv0: Audio Input:  Line In 1
>   [19428.117046] ivtv0: Video Output: S-Video + Composite
>   [19428.117048] ivtv0: Audio Output: A/V Audio Out (Stereo/Bilingual:
> Stereo/Left)
>   [19428.117050] ivtv0: Output Mode:  None
>   [19428.117163] ivtv0: Overlay:      Off, Alpha: Global, Pixel Format:
> ARGB 8:8:8:8
>   [19428.117165] ivtv0: Tuner:  TV
>   [19428.117168] ivtv0: Stream: MPEG-2 Program Stream
>   [19428.117170] ivtv0: VBI Format: No VBI
>   [19428.117173] ivtv0: Video:  704x576, 25 fps
>   [19428.117175] ivtv0: Video:  MPEG-2, 4x3, Constant Bitrate,
> 15000000
>   [19428.117178] ivtv0: Video:  GOP Size 12, 2 B-Frames, No GOP
> Closure
>   [19428.117180] ivtv0: Audio:  48 kHz, Layer II, 192 kbps, Stereo, No
> Emphasis, No CRC
>   [19428.117184] ivtv0: Spatial Filter:  Manual, Luma 1D Horizontal,
> Chroma 1D Horizontal, 0
>   [19428.117187] ivtv0: Temporal Filter: Manual, 0
>   [19428.117189] ivtv0: Median Filter:   Off, Luma [0, 255], Chroma [0,
> 255]
>   [19428.117191] ivtv0: Status flags:    0x00200080
>   [19428.117193] ivtv0: Stream encoder MPG: status 0x0000, 0% of 4096
> KiB (128 buffers) in use
>   [19428.117196] ivtv0: Stream encoder YUV: status 0x0000, 0% of 2050
> KiB (162 buffers) in use
>   [19428.117199] ivtv0: Stream encoder VBI: status 0x0000, 0% of 1049
> KiB (41 buffers) in use
>   [19428.117202] ivtv0: Stream encoder PCM: status 0x0000, 0% of 324
> KiB (72 buffers) in use
>   [19428.117205] ivtv0: Stream decoder MPG: status 0x0000, 0% of 1024
> KiB (16 buffers) in use
>   [19428.117208] ivtv0: Stream decoder VBI: status 0x0000, 0% of 65 KiB
> (29 buffers) in use
>   [19428.117211] ivtv0: Stream decoder YUV: status 0x0000, 0% of 1063
> KiB (21 buffers) in use
>   [19428.117213] ivtv0: Read MPG/VBI: 5242880/0 bytes
>   [19428.117216] ivtv0: ==================  END STATUS CARD #0
> ==================
> FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et
> al.
>  configuration: --enable-gpl --enable-pp --enable-swscaler --enable-
>

Where's the "script done" line you your script(1) session?
What exactly did you do in script(1) besides running ./test?
How did you end script(1)?

> script seesm to miss off the end of what is seen in the terminal..
>
>
>
> This is what i see on terminal where it hangs.....
>
> FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et
> al.
>  configuration: --enable-gpl --enable-pp --enable-swscaler
> --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg
> --enable-libgsm --enable-dc1394 --disable-debug --enable-shared
> --prefix=/usr
>  libavutil version: 1d.49.3.0
>  libavcodec version: 1d.51.38.0
>  libavformat version: 1d.51.10.0
>  built on Mar 16 2009 21:19:49, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
> Input #0, mpeg, from '/dev/video0':
>  Duration: N/A, bitrate: 15192 kb/s
>  Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 704x576, 15000 kb/s,
> 25.00 fps(r)
>  Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 192 kb/s
>
> it hangs here forever...

What if you create the fifo first and start reading from it
_before_ running ffmpeg? That works for me.  The way it is now,
ffmpeg is supposed to write into a pipe that no-one is reading from.
I don't know how exactly fifo's work inside (your) kernel, but I would
guess there's a finite buffer that gets filled quickly in a situation
like this. Then, ffmpeg cannot write any further. I guess.

mkfifo /tmp/fifo
cat /tmp/fifo > /tmp/output.mpg # or whatever
ffmpeg -i /dev/video0 /tmp/fifo # fill in the options

But first, please, let us know already what you are really doing.

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Jan Stary
In reply to this post by Rob, M0DTS
>>> I'm trying to use ffmpeg to output to a pipe..
>>>
>>> I'm trying to send video elementry stream to a program called
>>> esvideo2pes which is part of the OpenCaster DVB package.
>>>
>>> ffmpeg hangs when i try to do this and does not start encoding.
>>>
>>> Script is something like this:
>>>
>>> #
>>>
>>> mkfifo /tmp/video.es
>>>
>>> fmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
>>> -bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
>>> 1024k  /tmp/video.es &
>>>
>>> esvideo2pes /tmp/video.es > video.pes
>> Your source is DVB, which is ts, and as I understand you want it to be  
>> a pes ? Is that right ?
> Not exactly, it'a an anlogue card but provides Program Stream not DVB TS  
> but i guess ffmpeg will still extract the same information.
>> In the meantime you want to lower the bitrate to 1450k, which for  
>> mpeg2 is very low and quality will be low as a result. Is that what  
>> you want?
> Yes that's correct, the total mux will need to fit into 1843kbps for the  
> transmitter.
>> ffmpeg -formats gives among others
>>  DE mpeg            MPEG-1 System format
>>   E mpeg1video      raw MPEG-1 video
>>   E mpeg2video      raw MPEG-2 video
>>  DE mpegts          MPEG-2 transport stream format
>>  D  mpegtsraw       MPEG-2 raw transport stream format
>>  D  mpegvideo       raw MPEG video
>>
>> and AFAIK -f mpeg gives you the wanted pes
>
> Yes it should do but i stil have to send this to another program to get  
> it to TS so there is still the need to use the pipe output which is the  
> main problem.

Why do you need to use pipes?

> The TS i require at the end of this needs to be only one component,  the  
> video or audio stream encapsulated as TS but not with all the usual  
> information that is added like pat,pmt,sdt etc.. this is created  
> seperately and added later.

"later" meaning that you don't need to do it in realtime?
Why don't you just save a mpegts stream as above and separate
the audio and video later?

ffmpeg -i /dev/video0 -f mpegts capture.mpg
ffmpeg -i capture.mpg -an -f mpegts (...) video.mpg
ffmpeg -i capture.mpg -vn -f mpegts (...) audio.mpg

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Rob, M0DTS
In reply to this post by Jan Stary

>> ncodes without any problem.
>>    
>
> We still don't know what you are trying to do.
> Why don't you just save to test.mpg and postprocess it?
> Why are you using fifo's at all? What's you ultimate goal?
>
>
>  
>> #!/bin/sh
>>
>> # Batch file for  PVR-350 Card
>>
>>
>> #PVR-150 card settings..
>> v4l2-ctl -c audio_layer_ii_bitrate=9 #192Kbps
>> v4l2-ctl -c audio_stereo_mode=0 #Stereo
>> v4l2-ctl -c stream_type=0 #MPEG-2 Program Stream=0
>> v4l2-ctl -c video_bitrate=15000000 #Set Video Bitrate
>> v4l2-ctl -c video_bitrate_mode=1 #CBR
>> v4l2-ctl -c video_aspect=1 #4:3
>> v4l2-ctl --set-fmt-video=width=704,height=576 #704x576 resolution  
>> v4l2-ctl --set-input=2
>>
>> v4l2-ctl --log-status #Show PVR-350 status
>>
>> mkfifo /tmp/video.pes
>> mkfifo /tmp/video.es
>>
>>
>>
>> ffmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
>> -bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
>> 1024k /tmp/video.es &
>> esvideo2pes /tmp/video.es > video.pes
>>    
>
> What is "esvideo2pes" supposed to do, and why?
>  
converts an elementry stream to a program stream with only one component
- i think, i'm just following the OpenCaster manual  with it's  'how to
encode video using ffmpeg' section!

>  
>>
>> Here is the script log but ends imcomplete...???
>>
>>
>>
>> Script started on Sat 02 Jan 2010 19:34:40 GMT
>> ]0;rob@DATV: ~/datvrob@DATV:~/datv$ ./test
>> ioctl: VIDIOC_S_FMT
>> Video input set to 2 (Composite 1)
>>
>> Status Log:
>>
>>   [19428.074259] ivtv0: =================  START STATUS CARD #0
>> =================
>>   [19428.074269] ivtv0: Version: 1.1.0 Card: Hauppauge WinTV PVR-350
>>   [19428.114529] tveeprom 2-0050: Hauppauge model 48135, rev J324,
>> serial# 6815344
>>   [19428.114533] tveeprom 2-0050: tuner model is Philips FM1246 (idx
>> 24, type 1)
>>   [19428.114536] tveeprom 2-0050: TV standards PAL(I) (eeprom 0x10)
>>   [19428.114539] tveeprom 2-0050: audio processor is MSP4418 (idx 25)
>>   [19428.114541] tveeprom 2-0050: decoder processor is SAA7115 (idx
>> 19)
>>   [19428.114543] tveeprom 2-0050: has radio, has IR receiver, has no IR
>> transmitter
>>   [19428.114553] tuner 2-0061: Tuner mode:      analog TV
>>   [19428.114556] tuner 2-0061: Frequency:       567.00 MHz
>>   [19428.114558] tuner 2-0061: Standard:        0x0000000f
>>   [19428.114561] saa7115 2-0021: Audio frequency: 48000 Hz
>>   [19428.115889] saa7115 2-0021: Input:           Composite 0
>>   [19428.115892] saa7115 2-0021: Video signal:    bad
>>   [19428.115894] saa7115 2-0021: Frequency:       50 Hz
>>   [19428.115896] saa7115 2-0021: Detected format: BW/No color
>>   [19428.115898] saa7115 2-0021: Width, Height:   704, 576
>>   [19428.115901] saa7127 2-0044: Standard: 50 Hz
>>   [19428.115902] saa7127 2-0044: Input:    normal
>>   [19428.115904] saa7127 2-0044: Output:   S-Video + Composite
>>   [19428.115907] saa7127 2-0044: WSS:      disabled
>>   [19428.115908] saa7127 2-0044: VPS:      disabled
>>   [19428.115910] saa7127 2-0044: CC:       disabled
>>   [19428.117028] msp3400 2-0040: MSP4418G-A2 rev1 = 0x0117 rev2 =
>> 0x1242
>>   [19428.117031] msp3400 2-0040: Audio:    volume 58880
>>   [19428.117034] msp3400 2-0040: Mode:     External input
>>   [19428.117035] msp3400 2-0040: Audmode:  0x0001
>>   [19428.117038] msp3400 2-0040: Routing:  0x00222220 (input)
>> 0x00000044 (output)
>>   [19428.117040] msp3400 2-0040: ACB:      0x0c00
>>   [19428.117043] ivtv0: Video Input:  Composite 1
>>   [19428.117044] ivtv0: Audio Input:  Line In 1
>>   [19428.117046] ivtv0: Video Output: S-Video + Composite
>>   [19428.117048] ivtv0: Audio Output: A/V Audio Out (Stereo/Bilingual:
>> Stereo/Left)
>>   [19428.117050] ivtv0: Output Mode:  None
>>   [19428.117163] ivtv0: Overlay:      Off, Alpha: Global, Pixel Format:
>> ARGB 8:8:8:8
>>   [19428.117165] ivtv0: Tuner:  TV
>>   [19428.117168] ivtv0: Stream: MPEG-2 Program Stream
>>   [19428.117170] ivtv0: VBI Format: No VBI
>>   [19428.117173] ivtv0: Video:  704x576, 25 fps
>>   [19428.117175] ivtv0: Video:  MPEG-2, 4x3, Constant Bitrate,
>> 15000000
>>   [19428.117178] ivtv0: Video:  GOP Size 12, 2 B-Frames, No GOP
>> Closure
>>   [19428.117180] ivtv0: Audio:  48 kHz, Layer II, 192 kbps, Stereo, No
>> Emphasis, No CRC
>>   [19428.117184] ivtv0: Spatial Filter:  Manual, Luma 1D Horizontal,
>> Chroma 1D Horizontal, 0
>>   [19428.117187] ivtv0: Temporal Filter: Manual, 0
>>   [19428.117189] ivtv0: Median Filter:   Off, Luma [0, 255], Chroma [0,
>> 255]
>>   [19428.117191] ivtv0: Status flags:    0x00200080
>>   [19428.117193] ivtv0: Stream encoder MPG: status 0x0000, 0% of 4096
>> KiB (128 buffers) in use
>>   [19428.117196] ivtv0: Stream encoder YUV: status 0x0000, 0% of 2050
>> KiB (162 buffers) in use
>>   [19428.117199] ivtv0: Stream encoder VBI: status 0x0000, 0% of 1049
>> KiB (41 buffers) in use
>>   [19428.117202] ivtv0: Stream encoder PCM: status 0x0000, 0% of 324
>> KiB (72 buffers) in use
>>   [19428.117205] ivtv0: Stream decoder MPG: status 0x0000, 0% of 1024
>> KiB (16 buffers) in use
>>   [19428.117208] ivtv0: Stream decoder VBI: status 0x0000, 0% of 65 KiB
>> (29 buffers) in use
>>   [19428.117211] ivtv0: Stream decoder YUV: status 0x0000, 0% of 1063
>> KiB (21 buffers) in use
>>   [19428.117213] ivtv0: Read MPG/VBI: 5242880/0 bytes
>>   [19428.117216] ivtv0: ==================  END STATUS CARD #0
>> ==================
>> FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et
>> al.
>>  configuration: --enable-gpl --enable-pp --enable-swscaler --enable-
>>
>>    
>
> Where's the "script done" line you your script(1) session?
> What exactly did you do in script(1) besides running ./test?
> How did you end script(1)?
>  
no idea i had to end the script (my ignorance, i have never used script
before, linux newbie for only 3 weeks!)  the data went into the file so
i did ctrl-c in the termianl and killed ffmpeg.

>  
>> script seesm to miss off the end of what is seen in the terminal..
>>
>>
>>
>> This is what i see on terminal where it hangs.....
>>
>> FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et
>> al.
>>  configuration: --enable-gpl --enable-pp --enable-swscaler
>> --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg
>> --enable-libgsm --enable-dc1394 --disable-debug --enable-shared
>> --prefix=/usr
>>  libavutil version: 1d.49.3.0
>>  libavcodec version: 1d.51.38.0
>>  libavformat version: 1d.51.10.0
>>  built on Mar 16 2009 21:19:49, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
>> Input #0, mpeg, from '/dev/video0':
>>  Duration: N/A, bitrate: 15192 kb/s
>>  Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 704x576, 15000 kb/s,
>> 25.00 fps(r)
>>  Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 192 kb/s
>>
>> it hangs here forever...
>>    
>
> What if you create the fifo first and start reading from it
> _before_ running ffmpeg? That works for me.  The way it is now,
> ffmpeg is supposed to write into a pipe that no-one is reading from.
> I don't know how exactly fifo's work inside (your) kernel, but I would
> guess there's a finite buffer that gets filled quickly in a situation
> like this. Then, ffmpeg cannot write any further. I guess.
>
> mkfifo /tmp/fifo
> cat /tmp/fifo > /tmp/output.mpg # or whatever
> ffmpeg -i /dev/video0 /tmp/fifo # fill in the options
>
> But first, please, let us know already what you are really doing.
>
>
>
>  
Ok

I've trimmed the post a bit as it was getting a bit too long!

This processing with ffmpeg needs to be done in real-time as that's the
idea of a DVB transmitter like digital tv etc.. of course there will be
some delay of a second or so from real life but that's ok

I'm trying to create a reasonably compatable DVB-S Transport Stream
which needs to be CBR (at 1843kbps for my system)
ffmpeg can make TS but there are no options to what goes into the TS, i
need to change parts of the TS to be compatable with DVB format and
that's not possible as far as i'm aware without recompiling ffmpeg with
the changes in the ts muxer code. (way over my head)
This is why i'm trying to do it with other programs using OpenCaster
software tools where it is designed to do this sort of thing and is
easily configured.


The only reason i'm using ffmpeg is to split the program stream from the
hardware into seperate audio and video mpeg elementry streams.
The reason i'm using fifo's is because i need to pipe the data between
the programs in real time with no post processing.


I can post process some test files with ffmpeg and use the opencatser
tools to get the desired output but making it work in real time seems to
be tricky, the only part not playing ball is the ffmpeg pipe, hence the
questions about pipes and fifo.

Does that make any sense....   :-)

Rob


_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Henk D. Schoneveld
Rob, M0DTS wrote:
>
>>> FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et
>>> al.
>>>  configuration: --enable-gpl --enable-pp --enable-swscaler --enable-
Googling ffmpeg pipe named-pipe gave me this
http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2008-February/014147.html
Maybe it helps.
Further your version of ffmpeg is more then 2 years old. Support on this
list is only for recent versions.
>>>
>>>    
>>
>> Where's the "script done" line you your script(1) session?
>> What exactly did you do in script(1) besides running ./test?
<snip>
>
> Rob
>
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Rob, M0DTS
belcampo wrote:
> Rob, M0DTS wrote:
>>
>>>> FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice
>>>> Bellard, et
>>>> al.
>>>>  configuration: --enable-gpl --enable-pp --enable-swscaler --enable-
> Googling ffmpeg pipe named-pipe gave me this
> http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2008-February/014147.html
> Maybe it helps.
Thanks for that, unfortunately it made no difference with the extensions
as i suspected.
All the things i found on the net is about input pipes on ffmpeg which
seem to work fine but nothing related to output pipes.

Unfortunately i cant find any newer ffmpeg packages in my installation
(ubuntu 8.04) so i guess it means building a new version to see if the
problem still exists, building from code is way over my head at present.

Thanks for the pointers..

> Further your version of ffmpeg is more then 2 years old. Support on
> this list is only for recent versions.
>>>>
>>>>    
>>>
>>> Where's the "script done" line you your script(1) session?
>>> What exactly did you do in script(1) besides running ./test?
> <snip>
>>
>> Rob
>>
>>
>> _______________________________________________
>> ffmpeg-user mailing list
>> [hidden email]
>> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
>

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Basil Mohamed Gohar
On 01/03/2010 04:52 AM, Rob, M0DTS wrote:
> Unfortunately i cant find any newer ffmpeg packages in my installation
> (ubuntu 8.04) so i guess it means building a new version to see if the
> problem still exists, building from code is way over my head at present.
Building ffmpeg from code really isn't that hard.  I do it on a frequent
basis with Fedora.

For starters, just checkout the code using SVN (make sure to install SVN
if you don't have it on your system already):

svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg

The above command will checkout the latest version of ffmpeg's code
(i.e., "trunk") into a directory "ffmpeg" below your current directory.

Once the code is done downloading, you can follow the standard build
routine:

./configure (you may tweak this command by appending --enable-*** for
each feature you need in your custom build of ffmpeg)
make
make install (run this last step as root or using sudo)

As an example, to get all the features I want, I run ./configure with
the following parameters:

./configure --enable-gpl --enable-version3 --enable-nonfree
--enable-postproc --enable-avfilter --enable-avfilter-lavf
--enable-x11grab --enable-runtime-cpudetect --enable-libdc1394
--enable-libdirac --enable-libfaac --enable-libfaad --enable-libgsm
--enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger
--enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264
--enable-libxvid --extra-cflags="-I/usr/local/include"
--extra-ldflags="-L/usr/local/lib"

To find out what each step is, just run ./configure --help and it will
give you a listing explaining each parameter.

Note: You may have to install development packages for each feature if
they're not already available on your system.  For example, to enable
MP3 support, you'll need the LAME development packages (I don't know
what the name for that is on Ubuntu - on Fedora it's lame-devel).

--
      Basil Mohamed Gohar
[hidden email]
http://www.basilgohar.com/blog
basilgohar on irc.freenode.net
GPG Key Fingerprint:  5AF4B362

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Rob, M0DTS
Basil Mohamed Gohar wrote:

> On 01/03/2010 04:52 AM, Rob, M0DTS wrote:
>  
>> Unfortunately i cant find any newer ffmpeg packages in my installation
>> (ubuntu 8.04) so i guess it means building a new version to see if the
>> problem still exists, building from code is way over my head at present.
>>    
> Building ffmpeg from code really isn't that hard.  I do it on a frequent
> basis with Fedora.
>
> For starters, just checkout the code using SVN (make sure to install SVN
> if you don't have it on your system already):
>
> svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
>
> The above command will checkout the latest version of ffmpeg's code
> (i.e., "trunk") into a directory "ffmpeg" below your current directory.
>
> Once the code is done downloading, you can follow the standard build
> routine:
>
> ./configure (you may tweak this command by appending --enable-*** for
> each feature you need in your custom build of ffmpeg)
> make
> make install (run this last step as root or using sudo)
>
> As an example, to get all the features I want, I run ./configure with
> the following parameters:
>
> ./configure --enable-gpl --enable-version3 --enable-nonfree
> --enable-postproc --enable-avfilter --enable-avfilter-lavf
> --enable-x11grab --enable-runtime-cpudetect --enable-libdc1394
> --enable-libdirac --enable-libfaac --enable-libfaad --enable-libgsm
> --enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger
> --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264
> --enable-libxvid --extra-cflags="-I/usr/local/include"
> --extra-ldflags="-L/usr/local/lib"
>
> To find out what each step is, just run ./configure --help and it will
> give you a listing explaining each parameter.
>
> Note: You may have to install development packages for each feature if
> they're not already available on your system.  For example, to enable
> MP3 support, you'll need the LAME development packages (I don't know
> what the name for that is on Ubuntu - on Fedora it's lame-devel).
>
>  
Thanks Basil for the information, and sure enough it was easy to do.
I ran configure with default settings (temporarily) then make and make
install without any problem, i was quite surprised!

Unfortunately  it did not make any difference to my problem and ffmpeg
still hangs when it's trying to write to fifo....
Interestingly if i tell ffmpeg to send to standard output and then
redirect that to the fifo it works ok for video or audio on it's own.

This seems to work:
mkfifo /tmp/video.es

ffmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
-bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
1024k - > /tmp/video.es


But this will not let me output both audio and video streams seperately
at the same time as there's only one standard output right?

Rob
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Jan Stary
> Unfortunately  it did not make any difference to my problem and ffmpeg  
> still hangs when it's trying to write to fifo....

I think ffmpeg doesn't "hang", it just has nowhere to write,
because nobody is reading from the other end of the pipe.

> Interestingly if i tell ffmpeg to send to standard output and then  
> redirect that to the fifo it works ok for video or audio on it's own.

Again (and always): give us the exact commandline and
the exact response, preferably with script(1).

> This seems to work:
> mkfifo /tmp/video.es
>
> ffmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
> -bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
> 1024k - > /tmp/video.es

Speculation: here ffmpeg is writing to stdout and nothing can stop it;
the fact that no-one is reading from the other end of the pipe (and the
data has to be stored somewhere until somebody does) is someone else's
(kernel's?) problem now. Right?

> But this will not let me output both audio and video streams seperately  
> at the same time as there's only one standard output right?

You can duplicate the data with tee(1):

$ whatis tee
tee (1) - pipe fitting

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Rob, M0DTS
On Sun, 2010-01-03 at 13:09 +0100, Jan Stary wrote:

> > Unfortunately  it did not make any difference to my problem and ffmpeg  
> > still hangs when it's trying to write to fifo....
>
> I think ffmpeg doesn't "hang", it just has nowhere to write,
> because nobody is reading from the other end of the pipe.
>
> > Interestingly if i tell ffmpeg to send to standard output and then  
> > redirect that to the fifo it works ok for video or audio on it's own.
>
> Again (and always): give us the exact commandline and
> the exact response, preferably with script(1).
Now i have figured out how to end script i have done this but to get the
command prompt back up after running the commands i have to ctrl-c to
stop it running before i can exit script. See the end of email for the
script log.
The commands are the same as the earlier described 'test' shell script.

>
> > This seems to work:
> > mkfifo /tmp/video.es
> >
> > ffmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
> > -bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
> > 1024k - > /tmp/video.es
>
> Speculation: here ffmpeg is writing to stdout and nothing can stop it;
> the fact that no-one is reading from the other end of the pipe (and the
> data has to be stored somewhere until somebody does) is someone else's
> (kernel's?) problem now. Right?
getting a little too complicated now!
If i use other programs to write to the same fifo and use the
esvideo2pes program to read from the fifo it works no problem.
It's only when ffmpeg writes to the fifo that nothing happens, that's
what had led me to think it's a problem with ffmpeg output and not the
other program that i'm using.


>
> > But this will not let me output both audio and video streams seperately  
> > at the same time as there's only one standard output right?
>
> You can duplicate the data with tee(1):
>
> $ whatis tee
> tee (1) - pipe fitting

Ok that maybe useful, i'll read up on that tool.
>
> _______________________________________________


Here's the latest script log....

Script started on Sun 03 Jan 2010 12:42:23 GMT
]0;rob@DATV: ~/datvrob@DATV:~/datv$ ./test
ioctl: VIDIOC_S_FMT
Video input set to 2 (Composite 1)

Status Log:

   [ 3628.372549] ivtv0: =================  START STATUS CARD #0
=================
   [ 3628.372559] ivtv0: Version: 1.1.0 Card: Hauppauge WinTV PVR-350
   [ 3628.412778] tveeprom 2-0050: Hauppauge model 48135, rev J324,
serial# 6815344
   [ 3628.412782] tveeprom 2-0050: tuner model is Philips FM1246 (idx
24, type 1)
   [ 3628.412786] tveeprom 2-0050: TV standards PAL(I) (eeprom 0x10)
   [ 3628.412788] tveeprom 2-0050: audio processor is MSP4418 (idx 25)
   [ 3628.412791] tveeprom 2-0050: decoder processor is SAA7115 (idx
19)
   [ 3628.412794] tveeprom 2-0050: has radio, has IR receiver, has no IR
transmitter
   [ 3628.416996] tuner 2-0061: Tuner mode:      analog TV
   [ 3628.417005] tuner 2-0061: Frequency:       567.00 MHz
   [ 3628.417007] tuner 2-0061: Standard:        0x0000000f
   [ 3628.417416] saa7115 2-0021: Audio frequency: 48000 Hz
   [ 3628.418867] saa7115 2-0021: Input:           Composite 0
   [ 3628.418869] saa7115 2-0021: Video signal:    bad
   [ 3628.418871] saa7115 2-0021: Frequency:       50 Hz
   [ 3628.418873] saa7115 2-0021: Detected format: BW/No color
   [ 3628.418874] saa7115 2-0021: Width, Height:   704, 576
   [ 3628.419411] saa7127 2-0044: Standard: 50 Hz
   [ 3628.419413] saa7127 2-0044: Input:    normal
   [ 3628.419415] saa7127 2-0044: Output:   S-Video + Composite
   [ 3628.419416] saa7127 2-0044: WSS:      disabled
   [ 3628.419418] saa7127 2-0044: VPS:      disabled
   [ 3628.419419] saa7127 2-0044: CC:       disabled
   [ 3628.421017] msp3400 2-0040: MSP4418G-A2 rev1 = 0x0117 rev2 =
0x1242
   [ 3628.421020] msp3400 2-0040: Audio:    volume 58880
   [ 3628.421022] msp3400 2-0040: Mode:     External input
   [ 3628.421023] msp3400 2-0040: Audmode:  0x0001
   [ 3628.421025] msp3400 2-0040: Routing:  0x00222220 (input)
0x00000044 (output)
   [ 3628.421027] msp3400 2-0040: ACB:      0x0c00
   [ 3628.421504] ivtv0: Video Input:  Composite 1
   [ 3628.421507] ivtv0: Audio Input:  Line In 1
   [ 3628.421508] ivtv0: Video Output: S-Video + Composite
   [ 3628.421510] ivtv0: Audio Output: A/V Audio Out (Stereo/Bilingual:
Stereo/Left)
   [ 3628.421512] ivtv0: Output Mode:  None
   [ 3628.421626] ivtv0: Overlay:      Off, Alpha: Global, Pixel Format:
ARGB 8:8:8:8
   [ 3628.421648] ivtv0: Tuner:  TV
   [ 3628.421650] ivtv0: Stream: MPEG-2 Program Stream
   [ 3628.421652] ivtv0: VBI Format: No VBI
   [ 3628.421654] ivtv0: Video:  704x576, 25 fps
   [ 3628.421656] ivtv0: Video:  MPEG-2, 4x3, Constant Bitrate,
15000000
   [ 3628.421658] ivtv0: Video:  GOP Size 12, 2 B-Frames, GOP Closure
   [ 3628.421660] ivtv0: Audio:  48 kHz, Layer II, 192 kbps, Stereo, No
Emphasis, No CRC
   [ 3628.421663] ivtv0: Spatial Filter:  Manual, Luma 1D Horizontal,
Chroma 1D Horizontal, 0
   [ 3628.421665] ivtv0: Temporal Filter: Manual, 0
   [ 3628.421667] ivtv0: Median Filter:   Off, Luma [0, 255], Chroma [0,
255]
   [ 3628.421669] ivtv0: Status flags:    0x00200080
   [ 3628.421671] ivtv0: Stream encoder MPG: status 0x0000, 0% of 4096
KiB (128 buffers) in use
   [ 3628.421673] ivtv0: Stream encoder YUV: status 0x0000, 0% of 2050
KiB (162 buffers) in use
   [ 3628.421676] ivtv0: Stream encoder VBI: status 0x0000, 0% of 1049
KiB (41 buffers) in use
   [ 3628.421678] ivtv0: Stream encoder PCM: status 0x0000, 0% of 324
KiB (72 buffers) in use
   [ 3628.421681] ivtv0: Stream decoder MPG: status 0x0000, 0% of 1024
KiB (16 buffers) in use
   [ 3628.421683] ivtv0: Stream decoder VBI: status 0x0000, 0% of 65 KiB
(29 buffers) in use
   [ 3628.421685] ivtv0: Stream decoder YUV: status 0x0000, 0% of 1063
KiB (21 buffers) in use
   [ 3628.421688] ivtv0: Read MPG/VBI: 5242880/0 bytes
   [ 3628.421689] ivtv0: ==================  END STATUS CARD #0
==================
FFmpeg version SVN-r21004, Copyright (c) 2000-2010 Fabrice Bellard, et
al.
  built on Jan  3 2010 10:54:58 with gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
  configuration:
  libavutil     50. 7. 0 / 50. 7. 0
  libavcodec    52.45. 0 / 52.45. 0
  libavformat   52.46. 0 / 52.46. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 2 /  0. 7. 2
[mpeg @ 0xfe33d0]MAX_READ_SIZE:5000000 reached
[mpeg @ 0xfe33d0]Estimating duration from bitrate, this may be
inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 50.00
(50/1) -> 25.00 (25/1)
Input #0, mpeg, from '/dev/video0':
  Duration: N/A, start: 0.276622, bitrate: 15192 kb/s
    Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 704x576 [PAR 12:11
DAR 4:3], 15000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, 2 channels, s16, 192 kb/s

]0;rob@DATV: ~/datvrob@DATV:~/datv$ exit
exit

Script done on Sun 03 Jan 2010 12:42:37 GMT

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Jan Stary
> > > This seems to work:
> > > mkfifo /tmp/video.es
> > >
> > > ffmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
> > > -bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
> > > 1024k - > /tmp/video.es
> >
> > Speculation: here ffmpeg is writing to stdout and nothing can stop it;
> > the fact that no-one is reading from the other end of the pipe (and the
> > data has to be stored somewhere until somebody does) is someone else's
> > (kernel's?) problem now. Right?
> getting a little too complicated now!
> If i use other programs to write to the same fifo and use the
> esvideo2pes program to read from the fifo it works no problem.
> It's only when ffmpeg writes to the fifo that nothing happens, that's
> what had led me to think it's a problem with ffmpeg output and not the
> other program that i'm using.

Does this also happen with ffmpeg writing to -, being redirected
to the fifo, and your other program (esvideo2pes) reading from the pipe?

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ffmpeg and pipe output

Rob, M0DTS
Jan Stary wrote:

>>>> This seems to work:
>>>> mkfifo /tmp/video.es
>>>>
>>>> ffmpeg -i /dev/video0 -deinterlace  -an -vcodec mpeg2video -f mpeg2video
>>>> -bf 2 -b 1450k -maxrate 1450k -minrate 1450k  -bufsize
>>>> 1024k - > /tmp/video.es
>>>>        
>>> Speculation: here ffmpeg is writing to stdout and nothing can stop it;
>>> the fact that no-one is reading from the other end of the pipe (and the
>>> data has to be stored somewhere until somebody does) is someone else's
>>> (kernel's?) problem now. Right?
>>>      
>> getting a little too complicated now!
>> If i use other programs to write to the same fifo and use the
>> esvideo2pes program to read from the fifo it works no problem.
>> It's only when ffmpeg writes to the fifo that nothing happens, that's
>> what had led me to think it's a problem with ffmpeg output and not the
>> other program that i'm using.
>>    
>
> Does this also happen with ffmpeg writing to -, being redirected
> to the fifo, and your other program (esvideo2pes) reading from the pipe?
>  
No, it starts encoding fine when the standard output is used into the
fifo and then to the other program.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
12345
Loading...