Go Back   Justin.tv Community Help Forums > Community Help > Help!

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-29-2010, 05:52 PM
johnfrank johnfrank is offline
Junior Member
 
Join Date: Jun 2010
Posts: 8
Default [SOLVED] Continuous Play VLC -sout-keep/gather switches not working

Here's the command line I'm using:

Quote:
vlc --playlist-tree "/home/john/movies/" --loop -vvv --sout-keep --sout='#gather:duplicate{dst="transcode{venc=x264{keyint=60,idri nt=2},vcodec=h264,vb=600,acodec=mp4a,ab=64,channel s=2,samplerate=44100, width=320, height=240}:rtp{dst=127.0.0.1,port=1234,sdp=file:///home/john/vlcstream/vlc.sdp}"}'
The first movie in the playlist streams perfectly but once it changes to the next video the output goes blank.

I've read that --sout-keep with #gather:duplicate should allow continuous stream from one track to the next but it doesn't. Any ideas?

Last edited by johnfrank; 07-03-2010 at 10:52 PM.
Reply With Quote
  #2  
Old 07-02-2010, 11:42 AM
johnfrank johnfrank is offline
Junior Member
 
Join Date: Jun 2010
Posts: 8
Default

Changed the line to this:

Quote:
vlc --extraintf http "/seagate15/JTVVLC/playlist.xspf" --loop -vvv --sout-keep --sout='#gather:transcode{venc=x264{keyint=60},vcode c=h264,vb=300,acodec=mp4a,ab=64,channels=2,sampler ate=44100, width=320, height=240}:rtp{dst=127.0.0.1,port=1234, sdp=file:///seagate15/JTVVLC/vlc.sdp}"}' --file-logging --logfile=/seagate15/JTVVLC/jtvlog.log
Still nothing. Once I click next the client stops but the vlc stream continues. If the client reconnects then the stream will be picked up again.

Can anyone verify that the command above is correct?

Last edited by johnfrank; 07-02-2010 at 11:48 AM.
Reply With Quote
  #3  
Old 07-03-2010, 04:45 PM
Wallboy Wallboy is offline
Junior Member
 
Join Date: Aug 2009
Posts: 11
Default

I've had this problem as well and haven't been able to figure it out either.
Reply With Quote
  #4  
Old 07-03-2010, 05:04 PM
johnfrank johnfrank is offline
Junior Member
 
Join Date: Jun 2010
Posts: 8
Default

Quote:
Originally Posted by Wallboy View Post
I've had this problem as well and haven't been able to figure it out either.
Finally had a break through earlier this morning after reading up on the gather switch (Link)

Quote:
Documentation:Modules/gather

Makes it possible to stream a playlist without any noticeable interruption on input change on the client side. The audio and video streams must all have the same characteristics (codecs, bitrate, dimensions, etc.).

% vlc playlist.m3u --sout "#gather:std{access=http,mux=asfh,dst=:8080}" --sout-keep

If your playlist items use different codecs or have different sizes, it is advised to transcode. For example:

% vlc playlist.m3u --sout "#transcode{vcodec=DIV3,vb=512,width=640,height=48 0,acodec=mp3,ab=128,samplerate=44100,channels=2}:gather:std{access=http,mux=asfh,dst=:8080}" --sout-keep
The code below works perfectly:

Quote:
vlc "/home/VLC/playlist.xspf" --loop --sout '#transcode{venc=x264,vcodec=h264,vb=400,acodec=mp 4a,ab=64,channels=2,samplerate=44100, width=320, height=240,sfilter="marq{marquee=$D-$L $t ,position=8,size=30}"}:gather:rtp{dst=127.0.0.1,port=1234,sdp=file:///home/VLC/vlc.sdp}' :sout-mux-caching=5000 :sout-transcode-high-priority :sout-keep
You'll need to adjust the marquee size based on the resolutions of your video. If all of your videos are different resolution sizes then it's best to convert all of them to a single resolution size (a process I'm going through myself at the moment). Next step would be changing the marquee font type. Also you can replace the --loop switch with --random for continuous random play.

I still haven't had the time to go through all of the switches available (vlc -H) but once I do I'll post the final command line I will be using moving forward.

Good luck

Last edited by johnfrank; 07-03-2010 at 05:08 PM.
Reply With Quote
  #5  
Old 07-03-2010, 06:32 PM
Wallboy Wallboy is offline
Junior Member
 
Join Date: Aug 2009
Posts: 11
Default

I have tried gather before and didn't have any luck, but I'll give this a try again. I don't need to use a marquee or any overlay text on my video, so could I just leave the marq part out? Also what version of VLC you using?
Reply With Quote
  #6  
Old 07-03-2010, 07:22 PM
johnfrank johnfrank is offline
Junior Member
 
Join Date: Jun 2010
Posts: 8
Default

Quote:
Originally Posted by Wallboy View Post
I have tried gather before and didn't have any luck, but I'll give this a try again. I don't need to use a marquee or any overlay text on my video, so could I just leave the marq part out? Also what version of VLC you using?
Yes. I was using the following before I added that in:

Quote:
vlc "/home/VLC/playlist.xspf" --loop --sout '#transcode{venc=x264,vcodec=h264,vb=400,acodec=mp 4a,ab=64,channels=2,samplerate=44100, width=320, height=240}:gather:rtp{dst=127.0.0.1,port=1234,sdp =file:///home/VLC/vlc.sdp}' :sout-mux-caching=5000 :sout-transcode-high-priority :sout-keep
Reply With Quote
  #7  
Old 07-03-2010, 08:05 PM
Wallboy Wallboy is offline
Junior Member
 
Join Date: Aug 2009
Posts: 11
Default

So you don't need the marquee? I see that in the gather documentation it states all videos have to have the same characteristics. Won't all the videos have the same characteristics as long as you explicitly define those (width, height, fps, audio sample rate, etc) in the transcode itself?

Edit:

Ok I think I got it working. I first made a playlist and set the first item in the playlist to have a start time of 30 seconds from the end so I could test it without having to watch the whole video. Here's my .bat file which seems to be working even with videos of different resolutions, framerates, etc. I used to omit the explicit width,height tags and just used scale=1 to use the videos native resolution. If you do it like that the video will not goto the next item in the playlist. Another issue I had was when my second video played at 640x480, it played correctly, but the videos native resolution was closer to 16:9. When I changed the resolution to 640x360 the video flipped. Not sure why.

"C:\Program Files (x86)\VideoLAN\VLC2\vlc.exe" -vvv -I rc --loop --sout-keep "file:///C:\jtv\playlist.xspf" --sout="#transcode{venc=x264{keyint=350,idrint=25,sc enecut=30,frameref=5},vcodec=h264,vb=1500,width=64 0,height=480,fps=23.97,deinterlace,audio-sync,acodec=mp4a,ab=128,channels=2,samplerate=4410 0}:gather:rtp{dst=127.0.0.1,port=3407,ttl=10,sdp=f ile://C:\jtv\playlist.sdp}"

Last edited by Wallboy; 07-03-2010 at 08:56 PM.
Reply With Quote
  #8  
Old 07-03-2010, 10:48 PM
johnfrank johnfrank is offline
Junior Member
 
Join Date: Jun 2010
Posts: 8
Default

Quote:
Originally Posted by Wallboy View Post
So you don't need the marquee? I see that in the gather documentation it states all videos have to have the same characteristics. Won't all the videos have the same characteristics as long as you explicitly define those (width, height, fps, audio sample rate, etc) in the transcode itself?
Thats what I assumed once I turned it on but it adds the marquee while transcoding not in the final output. I'm sure theres a way but I've removed it for now and going a different route with the HTTP server.

Quote:
Originally Posted by Wallboy View Post
Ok I think I got it working. I first made a playlist and set the first item in the playlist to have a start time of 30 seconds from the end so I could test it without having to watch the whole video. Here's my .bat file which seems to be working even with videos of different resolutions, framerates, etc. I used to omit the explicit width,height tags and just used scale=1 to use the videos native resolution. If you do it like that the video will not goto the next item in the playlist. Another issue I had was when my second video played at 640x480, it played correctly, but the videos native resolution was closer to 16:9. When I changed the resolution to 640x360 the video flipped. Not sure why.

"C:\Program Files (x86)\VideoLAN\VLC2\vlc.exe" -vvv -I rc --loop --sout-keep "file:///C:\jtv\playlist.xspf" --sout="#transcode{venc=x264{keyint=350,idrint=25,sc enecut=30,frameref=5},vcodec=h264,vb=1500,width=64 0,height=480,fps=23.97,deinterlace,audio-sync,acodec=mp4a,ab=128,channels=2,samplerate=4410 0}:gather:rtp{dst=127.0.0.1,port=3407,ttl=10,sdp=f ile://C:\jtv\playlist.sdp}"
Never attempted it on windows. I'm sure there's an option you can pass it to disable the flipping.

On an unrelated note, I'm shocked at the lack of support on the wiki page. Not having at least one example for both OS's on how to include playlists is ridiculous.

Last edited by johnfrank; 07-03-2010 at 10:51 PM.
Reply With Quote
  #9  
Old 07-04-2010, 02:10 AM
Wallboy Wallboy is offline
Junior Member
 
Join Date: Aug 2009
Posts: 11
Default

Well the flipping seems to be more of an artifacting since there is also green lines and such on the video when it happens. As far as support goes, I'm pretty sure not many people use VLC with JTV or give up as soon as they try and use it since it's so setting dependant. It seems if you have a long playlist of videos you want to play, they all better be encoded the same, with the same resolutions, etc. Not that the playlist switching won't work if you explicitly declare the width and height within the command line script, but the fact that every video that is different in bitrate, resolution, etc needs different x264 keyframe settings and such or else you encounter buffer underflows on some videos or the quality goes really bad while the next video may play just fine. I remember a long time ago I managed to get the codec MP4V to work instead of x264, but can't seem to get any video out of it now.

Also it seems you need quite a bit higher bitrate to get the same quality as opposed to just using a capture driver such as VHScrCap and FME. In fact I've used VLC to stream at a higher bittrate then the video itself and it looks worse then the raw video.

I've been trying to just use WebcamMax or ManyCam since I'm on Win 7 x64, there hasn't been that much support with those programs until lately, but still it's very buggy. If you use WebcamMax and create a playlist in there and then use their capture driver to stream from within Flash Media Encoder, the framerate goes over 300+ regardless of the setting in FME. This has already been a known bug for over half a year, yet they haven't fixed it.

ManyCam had this exact same issue up until around a week ago when they released a new version which fixed it, but with this fix came along another bug. You can only choose a resolution of 160x120 in FME. So that pretty much makes ManyCam useless.

Last edited by Wallboy; 07-04-2010 at 02:16 AM.
Reply With Quote
  #10  
Old 07-04-2010, 05:05 AM
johnfrank johnfrank is offline
Junior Member
 
Join Date: Jun 2010
Posts: 8
Default

Quote:
Originally Posted by Wallboy View Post
Well the flipping seems to be more of an artifacting since there is also green lines and such on the video when it happens. As far as support goes, I'm pretty sure not many people use VLC with JTV or give up as soon as they try and use it since it's so setting dependant. It seems if you have a long playlist of videos you want to play, they all better be encoded the same, with the same resolutions, etc. Not that the playlist switching won't work if you explicitly declare the width and height within the command line script, but the fact that every video that is different in bitrate, resolution, etc needs different x264 keyframe settings and such or else you encounter buffer underflows on some videos or the quality goes really bad while the next video may play just fine. I remember a long time ago I managed to get the codec MP4V to work instead of x264, but can't seem to get any video out of it now.

Also it seems you need quite a bit higher bitrate to get the same quality as opposed to just using a capture driver such as VHScrCap and FME. In fact I've used VLC to stream at a higher bittrate then the video itself and it looks worse then the raw video.

I've been trying to just use WebcamMax or ManyCam since I'm on Win 7 x64, there hasn't been that much support with those programs until lately, but still it's very buggy. If you use WebcamMax and create a playlist in there and then use their capture driver to stream from within Flash Media Encoder, the framerate goes over 300+ regardless of the setting in FME. This has already been a known bug for over half a year, yet they haven't fixed it.

ManyCam had this exact same issue up until around a week ago when they released a new version which fixed it, but with this fix came along another bug. You can only choose a resolution of 160x120 in FME. So that pretty much makes ManyCam useless.
I actually went ahead without encoding any of the videos and so far so good. In terms of quality I have to disagree, there's nothing else (non commercial) out there that even comes close. Especially when you dig deep into the settings and compile the source with the latest ffmpeg, x264 etc.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 05:36 AM.