1

I'm trying to stream using a ffmpeg stream from a windows box. Here is the command I'm running on the windows box

ffmpeg -f dshow -i audio=”Wave In 2 32130101 (Orban Optim” -acodec libmp3lame -ab 64k -f mpegts udp://172.30.16.181:2222?pkt_size=188?buffer_size=128000

This part works and I'm able to listen to it on my mac via VLC and I'm streaming it out from VLC to port 20103

but when I use mediasegmenter mediastreamsegmenter -s 3 -f /Users/vickkrish/ 127.0.0.1:2222

This is what happens Mar 6 2014 04:11:02.926: audio pid set at 44 Mar 6 2014 04:11:03.165: audio pid change to 44 Mar 6 2014 04:11:03.328: audio pid change to 44 Mar 6 2014 04:11:03.583: audio pid change to 44 Mar 6 2014 04:11:03.745: audio pid change to 44 Mar 6 2014 04:11:03.989: audio pid change to 44 Mar 6 2014 04:11:04.151: audio pid change to 44 Mar 6 2014 04:11:04.316: audio pid change to 44 Mar 6 2014 04:11:04.492: audio pid change to 44 Mar 6 2014 04:11:04.740: audio pid change to 44 Mar 6 2014 04:11:04.887: audio pid change to 44 Mar 6 2014 04:11:05.175: audio pid change to 44 Mar 6 2014 04:11:05.338: audio pid change to 44 Mar 6 2014 04:11:05.582: audio pid change to 44

and no .ts files are created.

2 Answers2

1

Try to pipe FFmpeg's output to mediastreamsegmenter instead of making mediastreamsegmenter listen to a UDP port.

Something along the lines of

ffmpeg -i {video} -b:a {audio_bitrate} -b:v {video_bitrate} -vcodec libx264 -acodec aac -strict -2 - | mediastreamsegmenter -b {url_for_manifest} -f {directory_to_dump_ts} -D
Joe
  • 2,386
  • 1
  • 22
  • 33
-1

Wouldn't it be easier to use VLC for transcoding AND segmenting? Something along lines of

ip=$1
port=$2
name=$3
host=$4
mkdir -p /wwwroot/$name
rm /wwwroot/$name/$name*.*
voptions="threads=4,width=720,height=576,fps=25,vcodec=h264,vb=2048,venc=x264{aud,profile=baseline,level=30,keyint=25,bframes=0,ref=1,nocabac},acodec=mp4a,ab=192,channels=2" # 2 mpbs Full D1
index="/wwwroot/$name/$name.m3u8"
idxurl="http://$host/$name/$name-########.ts"
dst="/wwwroot/$name/$name-########.ts"
vlc-wrapper -I dummy udp://@$ip:$port vlc://quit --sout="#transcode{$voptions}:duplicate{dst=std{access=livehttp{seglen=60,numsegs=60,index=$index,index-url=$idxurl},mux=ts{use-key-frames},dst=$dst}}" -vvv
David Jashi
  • 4,490
  • 1
  • 21
  • 26