using multiple named pipes with ffmpeg and vlc

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

using multiple named pipes with ffmpeg and vlc

Henti Smith-3
Hi all,

I have a small setup I'm having trouble with and I'm hoping somebody can
help me.

What I'm trying to achieve is the following :

Machine with Haupaugge WinTV PVR  150MCE
Grab video from WinTV
Convert to 3gp format (ffmpeg is compiled with libs)
Broadcast 3gp using VLC.

The script i wrote to do this is simple :

mkfifo /tmp/video
mkfifo /tmp/encode

cat /dev/video0 > /tmp/video &
$FFMPEG -i /tmp/video -vcodec h263 -s 176x108 -b 40k -r 10 -padtop 18
-padbottom 18 -padcolor 000000 -acodec amr_nb  -ar 8000 -ab 12.2k -ac 1
-f 3gp -aspect 4:3 /tmp/encode &
vlc /tmp/encode --sout udp:239.255.12.42 --ttl 12

This however does not work as planned.

I've tried doing this manually and nothing happens.
I can cat the feed to the first named pipe fine. I can get ffmpeg to
convert the pipe and write to a file fine but as soon as I try writing
to another named pipe nothing happens.

Does anybody have any ideas why it doens't work, or a better way of
doing this ?

Thanks in advance.

--
Henti Smith
R&D, System and Network Administrator
Tel : +27 11 327 3377
Fax : +27 11 327 3373
http://www.tbm.co.za

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

Re: using multiple named pipes with ffmpeg and vlc

Dennis Geldhof
----- Original Message -----
From: "Henti Smith" <[hidden email]>
To: <[hidden email]>
Sent: Monday, February 11, 2008 9:24 AM
Subject: [Ffmpeg-user] using multiple named pipes with ffmpeg and vlc


> Hi all,
>
> I have a small setup I'm having trouble with and I'm hoping somebody can
> help me.
>
> What I'm trying to achieve is the following :
>
> Machine with Haupaugge WinTV PVR  150MCE
> Grab video from WinTV
> Convert to 3gp format (ffmpeg is compiled with libs)
> Broadcast 3gp using VLC.
>
> The script i wrote to do this is simple :
>
> mkfifo /tmp/video
> mkfifo /tmp/encode
>
> cat /dev/video0 > /tmp/video &
> $FFMPEG -i /tmp/video -vcodec h263 -s 176x108 -b 40k -r 10 -padtop 18
> -padbottom 18 -padcolor 000000 -acodec amr_nb  -ar 8000 -ab 12.2k -ac 1
> -f 3gp -aspect 4:3 /tmp/encode &
> vlc /tmp/encode --sout udp:239.255.12.42 --ttl 12
>
> This however does not work as planned.
>
> I've tried doing this manually and nothing happens.
> I can cat the feed to the first named pipe fine. I can get ffmpeg to
> convert the pipe and write to a file fine but as soon as I try writing
> to another named pipe nothing happens.
>
> Does anybody have any ideas why it doens't work, or a better way of
> doing this ?
>
> Thanks in advance.
>
> --
> Henti Smith
> R&D, System and Network Administrator
> Tel : +27 11 327 3377
> Fax : +27 11 327 3373
> http://www.tbm.co.za
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user


Hey Henti,

I believe that something like this should work;

cat /dev/video0 > /tmp/video &
$FFMPEG -i /tmp/video -vcodec h263 -s 176x108 -b 40k -r 10 -padtop 18
-padbottom 18 -padcolor 000000 -acodec amr_nb  -ar 8000 -ab 12.2k -ac 1
-f 3gp -aspect 4:3 - | vlc - --sout udp:239.255.12.42 --ttl 12

Pipe the standard out of ffmpeg into the standard in of VLC. Dont know for
sure, but got it working with  -f  mpeg.

You can also look in the wiki of VLC
(http://www.videolan.org/doc/streaming-howto/en/ch04.html). VLC can convert
movies too while streaming.

Greets,
Dennis

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

Re: using multiple named pipes with ffmpeg and vlc

Henti Smith-3

> Hey Henti,
>
> I believe that something like this should work;
>
> cat /dev/video0 > /tmp/video &
> $FFMPEG -i /tmp/video -vcodec h263 -s 176x108 -b 40k -r 10 -padtop 18
> -padbottom 18 -padcolor 000000 -acodec amr_nb  -ar 8000 -ab 12.2k -ac 1
> -f 3gp -aspect 4:3 - | vlc - --sout udp:239.255.12.42 --ttl 12
>
> Pipe the standard out of ffmpeg into the standard in of VLC. Dont know for
> sure, but got it working with  -f  mpeg.
>
> You can also look in the wiki of VLC
> (http://www.videolan.org/doc/streaming-howto/en/ch04.html). VLC can convert
> movies too while streaming.
>
> Greets,
> Dennis
>  

Hi Dennis,

thanks for the reply.

I spent most of yesterday on freenode on the channel and it appears that
3gp format does not allow piping due to tmie shifting in the codec or
something like that :P

The concept was correct but the format does not allow it. Thank again.

--
Henti Smith
R&D, System and Network Administrator
Tel : +27 11 327 3377
Fax : +27 11 327 3373
http://www.tbm.co.za

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user