livehttp stream audio lag
Posted: 18 Mar 2019 10:31
Hello,
For few weeks im trying to fix this issue, but i cant and i really would appreciate your help.
It works fine in the beginning, but after few videos the audio de-sync for more than 5 seconds, sometimes even more than 10.
Since the server is also mine, this is the command im running it:
Is the issue with the server running vlc or the "client" vlc ? I do understand that i can do this with one VLC, but im doing tests for now.
The server MUST be with mpga audio since my provider requires it like this and the "client" vlc must be with AAC or any audio codec (tried few, same issue) that would work in HTML5 browser. Currently im using videojs. Could it be some wrong caching, could it be the fragmentation ? This occurred as problem when i changed the server codec to mpga.
Thank you in advance!
For few weeks im trying to fix this issue, but i cant and i really would appreciate your help.
Code: Select all
vlc http://xxxxxxxxxxxxxxx:8181/video.mp4 -vvv --sout '#gather:transcode{acodec=aac,vcodec=h264,vb=1000,scale=1,audio-sync,venc=x264{aud,profile=high,level=60,keyint=15,bframes=0,ref=1,nocabac}}:duplicate{dst=std{access=livehttp{seglen=10,delsegs=true,numsegs=10,index=/var/www/html/live/xxxxx.m3u8,index-url=http://xxxxxxxxxxxxx/live/xxxxx-########.ts},mux=ts{use-key-frames},dst=/var/www/html/live/xxxxx-########.ts}}' --sout-avcodec-strict -2 --sout-all --sout-keep
Since the server is also mine, this is the command im running it:
Code: Select all
vlc mp4/*.mp4 --sout '#gather:transcode{vcodec=h264,acodec=mpga,vb=2750,ab=128,channels=2,samplerate=48000,scale=1,audio-sync,venc=x264{aud,profile=high,level=60,keyint=15,bframes=0,ref=1,nocabac}}:duplicate{dst="transcode{acodec=aac,ab=128,channels=2,samplerate=48000,audio-sync}:std{access=livehttp{seglen=10,delsegs=true,numsegs=10,index=/var/www/html/live/mystream.m3u8,index-url=http://xx.xx.xx.xx/live/mystream-########.ts},mux=ts{use-key-frames},dst=/var/www/html/live/mystream-########.ts}",dst=std{access=http,mux=ts,dst=:8181/video.mp4}}' --sout-avcodec-strict -2 --sout-all --sout-keep --ipv4-timeout=100 --http-reconnect --sout-livehttp-caching --loop --random --file-caching=1000 --live-caching=1000 --disc-caching=1000 --network-caching=1000 --intf http --http-host xx.xx.xx.xx --http-port 9090 --http-password xxxxxxx
Is the issue with the server running vlc or the "client" vlc ? I do understand that i can do this with one VLC, but im doing tests for now.
The server MUST be with mpga audio since my provider requires it like this and the "client" vlc must be with AAC or any audio codec (tried few, same issue) that would work in HTML5 browser. Currently im using videojs. Could it be some wrong caching, could it be the fragmentation ? This occurred as problem when i changed the server codec to mpga.
Thank you in advance!