View previous topic :: View next topic |
Author |
Message |
dachris n00b
Joined: 17 Aug 2006 Posts: 62
|
Posted: Tue Mar 12, 2013 7:23 am Post subject: play video files to udp stream |
|
|
hi...
after days of messing around, i hope to get some tips here
I have some mpeg files, want to play them in sequence from console and create a udp stream.
1) tried vlc
Code: | vlc playlist.m3u --sout '#std{access=udp,mux=ts,dst=192.168.0.11}' |
problem: plays not smoothly, between files I get "late packet for UDP input" errors
2) play with mplayer and output with vlc
problem: mplayer can't play to stdout and vlc can't read from named pipe
3) use mplayer to write to named pipe, read with ffmpeg to stdout and grab with vlc
Code: | mplayer -vo mpegpes:file mpg1.mpg mpeg2.mpeg mpeg3.mpeg |
Code: | ffmpeg -i file -sameq -aspect 16:9 -f mpegts pipe:1 | vlc - --intf dummy --sout '#std{access=udp,mux=ts,dst=192.168.0.11}' |
runs smooth, no interruptions between files, but I loose the sound
maybe there is an easier way to do this...
thanks
EDIT:
after posting here I tried my next idea
Code: | cat mpg1.mpg mpeg2.mpeg mpeg3.mpeg > file |
Code: | ffmpeg -i file -sameq -aspect 16:9 -f mpegts pipe:1 | vlc - --intf dummy --sout '#std{access=udp,mux=ts,dst=192.168.0.11}' |
works, but still looking for a better solution |
|
Back to top |
|
|
syn0ptik Apprentice
Joined: 09 Jan 2013 Posts: 267
|
Posted: Tue Mar 12, 2013 9:26 am Post subject: |
|
|
Code: | cat mpg1.mpg mpeg2.mpeg mpeg3.mpeg > file |
you wrong here, but you can make it with ffmpeg concat
Code: | ffmpeg -i concat:"a.mpg|b.mpg" -vcodec copy out.mpg |
with ffserver you can make rtsp stream only. |
|
Back to top |
|
|
dachris n00b
Joined: 17 Aug 2006 Posts: 62
|
Posted: Tue Mar 12, 2013 9:41 am Post subject: |
|
|
yeah thanks for this!!
this is my code
Code: | ffmpeg -i concat:"file1.mpg|file2.mpeg|file3.mpeg" -vcodec copy -f mpegts pipe:1 | vlc - --intf dummy --sout '#std{access=udp,mux=ts,dst=192.168.0.11}' |
|
|
Back to top |
|
|
dachris n00b
Joined: 17 Aug 2006 Posts: 62
|
Posted: Tue Mar 12, 2013 9:57 am Post subject: |
|
|
why so complicated "dachris"
prepare a single file
Code: | ffmpeg -i concat:"file1.mpg|file2.mpeg|file3.mpeg" -vcodec copy out.mpg |
then play
Code: | cvlc -vvv out.mpg --sout '#std{access=udp,mux=ts,dst=192.168.0.11}' |
|
|
Back to top |
|
|
syn0ptik Apprentice
Joined: 09 Jan 2013 Posts: 267
|
Posted: Tue Mar 12, 2013 10:22 am Post subject: |
|
|
yes, but how do you want playing from client side this stream?
also it should support audio or you want video only? |
|
Back to top |
|
|
dachris n00b
Joined: 17 Aug 2006 Posts: 62
|
Posted: Tue Mar 12, 2013 10:40 am Post subject: |
|
|
this is for a regional tv station and to get our program in the local cable network i need this udp stream.
tested the client side on my windows vlc and it seems to work |
|
Back to top |
|
|
syn0ptik Apprentice
Joined: 09 Jan 2013 Posts: 267
|
|
Back to top |
|
|
dachris n00b
Joined: 17 Aug 2006 Posts: 62
|
Posted: Tue Mar 26, 2013 7:32 am Post subject: |
|
|
I always get the message, this protocol is not implemented. maybe there is a use flag to set, but which one? |
|
Back to top |
|
|
syn0ptik Apprentice
Joined: 09 Jan 2013 Posts: 267
|
Posted: Wed Mar 27, 2013 6:22 am Post subject: |
|
|
no that works for me. |
|
Back to top |
|
|
dachris n00b
Joined: 17 Aug 2006 Posts: 62
|
Posted: Wed Mar 27, 2013 8:03 am Post subject: |
|
|
i always tried without buffer size
Code: | udp://230.1.0.1:5000?pkt_size=188: Protocol not found |
with "pkt_size=188&buffer_size=65535" it works
thanks! |
|
Back to top |
|
|
dachris n00b
Joined: 17 Aug 2006 Posts: 62
|
Posted: Wed Mar 27, 2013 10:31 am Post subject: |
|
|
oh no I'm wrong, it doesnt work, it goes into the background because auf the &
Code: | ffmpeg -i out22.ts -f mpegts "udp://230.1.0.1:5000?pkt_size=188&buffer_size=65535" |
Code: | ffmpeg -i out22.ts -f mpegts udp://230.1.0.1:5000?pkt_size=188\&buffer_size=65535" |
Code: | udp://230.1.0.1:5000?pkt_size=188&buffer_size=65535: Protocol not found |
|
|
Back to top |
|
|
dachris n00b
Joined: 17 Aug 2006 Posts: 62
|
Posted: Wed Mar 27, 2013 4:04 pm Post subject: |
|
|
finally i found it, set the "network" use flag |
|
Back to top |
|
|
|