PDA

View Full Version : Help me to record video from vtv livestream source


boygiandi
04-29-2017, 03:45 AM
Hi.

I have a weird situation here. Please check this link http://vtv.vn/truyen-hinh-truc-tuyen/vtv1.htm . I can get their m3u8 link, something like this
http://222.255.27.46/hls/4545780bfa790819/4/1/04f242d546e4e69edb923830060850168f48a239a89924752e 0433458e3e0a73/dnR2MQ==bWFzdGVy.m3u8

I started to capture it with ffmpeg :

ffmpeg -i 'http://123.31.45.179/hls/4545780bfa790819/5/3/08dcefa5f747330afe66810a028a0ec8ca0ee7e9700a6433b1 f44195f2abd7a8/dnR2Mg==bWFzdGVy.m3u8' -c copy -y test.mkv

When I check test.mkv file, I see it's something like lag, delay.. I have no idea why. Any one can help ?

troller12
04-29-2017, 02:42 PM
Hi,

use streamlink so there you get no trouble to play / record the stream.Something is going wrong with ffmpeg and it does give the stream a wrong frame rate of 9.x instread of 25 frames.No idea why.Maybe you have to use any other paramters for ffmpeg in that case.Streamlink works fine with your stream so just try this.

greetz

boygiandi
04-30-2017, 02:35 AM
Tried many times at get the same result. It's like this

https://www.youtube.com/watch?v=68j9N0s5oe4

Video lag, delay. Video and audio not sync. I also tried some other m3u8 sources but they work fine.

troller12
04-30-2017, 01:03 PM
Hi,

so I tried it with ffmpeg (get the trouble you told before) and then I used streamlink (got successfully playing & downloading).

So you can try it again with both tools again and this time just use the player option as output.Here you can also see the diffrent using ffmpeg or ffplay & streamlink for playing.Streamlink works fine and ffmpeg / ffplay do lag all few seconds.Also you can see the info about expired segments from playlist in ffmpeg.
http://i64.tinypic.com/1z2k87r.png
Just try it again with Streamlink...
streamlink.exe -ldebug hlsvariant://***.m3u8 best
greetz

boygiandi
05-01-2017, 06:41 AM
thanks. You're great