VLC m3u8 stream recording stops at timestamp rollover

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
Shadow0013
Blank Cone
Blank Cone
Posts: 17
Joined: 03 Jun 2021 15:15

VLC m3u8 stream recording stops at timestamp rollover

Postby Shadow0013 » 03 Jun 2021 15:20

Hi there,

I am facing an issue, where I am recording an external source m3u8 stream and converting it to mp4 with VLC, however, the stream is set up in such a way, that the timestamp of the video chunk is 24H format, and rolls over at 22:00:00 CEST, and that timestamp is in the middle of the window I want to record. So when the stream hits timestamp 00:00:00:000 (again, =22:00 CEST), the recording stops, and that's bad for me, because the programme is getting cut there, and I am missing the remaining part of the programme.

How can I tell VLC to not stop recording at timestamp 00:00:00:000? I tried setting up some bogus numbers at the stop and start times in the media stream menu, but it didn't work, it either just records 1 second, then stops, or it will still just stop recording at timestamp 00:00:00:000.

I think my question is clear, however don't be afraid to ask for clarification. Looking forward to your answers guys. :)

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Hitchhiker » 07 Jun 2021 16:52

I haven't tried this myself so I can't vouch for it, but it should work.

  • Hit Ctrl + P to open prefs and then click "All" at the bottom to take you to the Advanced menu.
  • Type "timestamp" in the Search field top left and then click "Input / Codecs".
  • Scroll down to "Clock synchronization" near the bottom and set it to "Disable".
  • Save, exit and restart vlc.
If you're unlucky and it doesn't work you could conceivably change your OS time zone so that it synchronizes with the location of the stream you want to record from. Click the clock on the Windows taskbar and then click "Change time and date settings". In the next menu click "Change time zone" which will give you a list to choose from.

EDIT:

Just found another option which might work better.

  • In the same Advanced menu type "Network sync" in the Search field and select it when it appears below.
  • Add the stream's IP address to the field shown on the right.
  • If you don't know what that is open the location in whatever browser you use and hit F12.
  • Click the Network tab and then click an XHR stream. On the right hand box which appears it'll show the IP address.
  • Alternatively, download IPNetInfo from Nirsoft's site: https://www.nirsoft.net/utils/ipnetinfo.html
  • Type the URL into the Search field and checkmark "Resolve IP addresses" and get it that way.
Pix of the vlc menu.

Image
(click to enlage)

Shadow0013
Blank Cone
Blank Cone
Posts: 17
Joined: 03 Jun 2021 15:15

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Shadow0013 » 08 Jun 2021 08:37

Well the 1st method doesn't seem to do anything visible.

The 2nd method has also another problem. The m3u8 file contains this link, which directly leads to the same m3u8 file downloaded. And when I open this stream in chrome where you can watch in chrome (https://onlinestream.live/rtl-klub/videoplayer/6141-1), I have copied the shown IP address (185.92.118.13:443) into that field, but still nothing changes.

This is the m3u8 file:

Code: Select all

#EXTM3U https://stream.y5.hu:443/stream/stream_rtlklub/hls1/stream.m3u8
But then still, even if I could sync the clocks, the root problem is still existent, right? Because midnight timestamp still gonna occur. It's just the matter of when.

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Hitchhiker » 08 Jun 2021 10:15

It should continue recording since the "Network Master clock" setting synchronizes the stream for listening clients (assuming you checkmarked it). Should look like this:

Image

Vlc's settings can be found at this location in the vlcrc file: C:\Users\{Username}\AppData\Roaming\vlc

In the Advanced menu type Clock and then in the right hand pane go to Clock source which have a number of settings via the dropdown menu. Might be of some use.

Shadow0013
Blank Cone
Blank Cone
Posts: 17
Joined: 03 Jun 2021 15:15

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Shadow0013 » 08 Jun 2021 10:55

Alright, I will check it tonight whether or not it still stops recording at timestamp midnight.
I'll come back to you after that.

Shadow0013
Blank Cone
Blank Cone
Posts: 17
Joined: 03 Jun 2021 15:15

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Shadow0013 » 08 Jun 2021 22:42

Okay, I tried it with setting up network sync just as it is on your picture. Still, at timestamp 00:00, (which for me is 22:00, even though both the stream and me are in Hungary) recording stopped, and VLC continued to just play the stream, and not convert it to mp4 for recording.

Also, when 00:00 hits, the stream gets choppy, the last packet gets played again, then only playing the stream resumes. From this my guess would be, that the time rolls over, and VLC gets confused as to why the stream went back in time an entire day, and thinks something went wrong, and just end recording here to recover. But ofc that's just my guess as to what happens :)

My VLCRC file (Note: I had to put .txt at the end there to upload it, so ofc that's not there) https://www.transfernow.net/dl/20210608mBJC4m48

Any ideas?

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Hitchhiker » 09 Jun 2021 09:02

What time are you starting the stream?

I want to try it myself tonight to see what happens come midnight. I've just checked the setup and the mp4 is created and plays properly, but checkmarking "Display locally" only provides audio and a picture: not the actual stream. Without that all I see is the counter to indicate that recording is in progress.

We're both in the same timezone by the way: I'm located in the Netherlands.

EDIT:

No file found in the link to your vlcrc file according to their server. Try Zippyshare. https://zippyshare.com/

Shadow0013
Blank Cone
Blank Cone
Posts: 17
Joined: 03 Jun 2021 15:15

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Shadow0013 » 09 Jun 2021 09:20

Okay I reuploaded the file to zippy. https://www29.zippyshare.com/v/cjxaSItt/file.html

So I write every step I do when I record:

- Open VLC, click Media -> Convert/Save
- Click Network tab, select the proper link for network URL. (https://stream.y5.hu:443/stream/stream_ ... tream.m3u8)
- Caching is set to default 1000ms, start and end times to 00:00, MRL is the same as network URL.
NOTE: I have tried previously setting up different start and end times, that doesn't solve the issue either, and every time it does something completely different. I was not able to find ANY consistency related to those 2 settings.
- Click Convert/ Save, new window opens
- Stream is the same as the network URL from prev. page
- Select Convert, I checkmark Display Output (so that I can also watch it in the meantime), and I choose custom MP4 profile.
NOTE: I have created an MP4 profile, that has video and audio codecs set to original feed, because I don't care about file size, I only care about quality to be max, or as close to original as it's humanly possible. Plus, I will have to do some post processing cuts with Sony Vegas Pro 18 anyway.
- I select an output file, remove the extension (.xspf or m3u8 in some cases) it puts at the end of the file name, because it corrupts the output file.
- Click Start.

So I start recording at 20:10 CEST, because programme starts at 20:13 CEST and I like to have a couple of minutes of leeway, and it ends at roughly 22:45 CEST. Which, because the stream is for some goddamn reason has a timestamp with +2 hours, we hit 00:00 at 22:00 CEST.

BTW: Up until midnight recording, the output mp4 file plays properly, it just gets cut there.

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Hitchhiker » 09 Jun 2021 12:16

Okay I reuploaded the file to zippy. https://www29.zippyshare.com/v/cjxaSItt/file.html

So I write every step I do when I record:

- Open VLC, click Media -> Convert/Save
- Click Network tab, select the proper link for network URL. (https://stream.y5.hu:443/stream/stream_ ... tream.m3u8)
- Caching is set to default 1000ms, start and end times to 00:00, MRL is the same as network URL.
NOTE: I have tried previously setting up different start and end times, that doesn't solve the issue either, and every time it does something completely different. I was not able to find ANY consistency related to those 2 settings.
- Click Convert/ Save, new window opens
- Stream is the same as the network URL from prev. page
- Select Convert, I checkmark Display Output (so that I can also watch it in the meantime), and I choose custom MP4 profile.
NOTE: I have created an MP4 profile, that has video and audio codecs set to original feed, because I don't care about file size, I only care about quality to be max, or as close to original as it's humanly possible. Plus, I will have to do some post processing cuts with Sony Vegas Pro 18 anyway.
- I select an output file, remove the extension (.xspf or m3u8 in some cases) it puts at the end of the file name, because it corrupts the output file.
- Click Start.

So I start recording at 20:10 CEST, because programme starts at 20:13 CEST and I like to have a couple of minutes of leeway, and it ends at roughly 22:45 CEST. Which, because the stream is for some goddamn reason has a timestamp with +2 hours, we hit 00:00 at 22:00 CEST.

BTW: Up until midnight recording, the output mp4 file plays properly, it just gets cut there.

This isn't the correct way to record a stream. Here's how it should be done.

  1. Open vlc and hit Ctrl + N to open the Network URL field and paste the streaming link.
  2. Click Stream (instead of Convert) and then click Next. You can also hit Alt + S which does the same thing.
  3. Leave it as "File" and click Add.
  4. Browse to where you want to save the stream to and give it a name.
  5. Click "Save" which adds the path to the file name you chose into the next menu.
  6. Click Next and for the Profile select "Video - H.265 + MP3 (MP4)" and make sure "Activate transcoding" is checkmarked.
  7. Finally, click Stream.
In this scenario nothing will appear on screen and neither will you hear the audio. However, you'll notice that the counter will increase as the stream is transcoded and saved. Click the Stop button on the bottom toolbar to terminate the recording.

Don't be confused by the fact that if you check the folder where you've chosen to save the stream to and it shows 0 KB. This is normal and will only show the full file size when you run the file to play it.

If you want to listen to the audio while it's recording checkmark the option "Display locally" in step 3 (File + Add menu).

Shadow0013
Blank Cone
Blank Cone
Posts: 17
Joined: 03 Jun 2021 15:15

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Shadow0013 » 09 Jun 2021 12:40

Hmm, and how is this method different to how I've been doing it since? Because I fail to see that.
Could you give me some explanation? XD

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Hitchhiker » 09 Jun 2021 15:03

Convert / Save is usually intended for a file which has already been created whereas transcoding a stream performs that function while receiving constantly changing content. It also allows you to add additional options via the Stream Output menu.

The method I suggested creates a larger file size as per the image and may affect the quality (beneficially). Top file in the image was created using Convert / Save.

Image
(click to enlarge)

Whether or not it affects the timeout issue is yet to be determined (tonight).

Shadow0013
Blank Cone
Blank Cone
Posts: 17
Joined: 03 Jun 2021 15:15

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Shadow0013 » 09 Jun 2021 22:38

Aaaand again, it got cut at exactly when stream reached timestamp 00:00. After repeating the last packet a couple of times, the stream continued to play, but did not record. I did your method. Did it stop recording for you too?

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Hitchhiker » 10 Jun 2021 09:16

Yes, I regret to say. Maybe some kind of copyright control i.e. it's free to watch, but they don't want you recording it.

Can you try again, but create a log file. To do that hit Ctrl + M as soon as you launch vlc and set Verbosity to 2 at the bottom. Leave it open in the background and then record the stream again. You can watch what's happening with the log via the Windows taskbar if you want to, but it's usually too fast to discern anything.

When you're done save the log and upload it to https://pastebin.com/ No need to create an account there. Just give the log a name and post the link to it into you next message. A log can help the devs understand what's happening and possibly address the issue.

Shadow0013
Blank Cone
Blank Cone
Posts: 17
Joined: 03 Jun 2021 15:15

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Shadow0013 » 12 Jun 2021 00:29

Well pastebin lacks file size, so I had to choose WeTransfer, and in a week, file will be deleted. I was thinking about deleting some lines, but then it wouldn't be a proper log file.
URL to the created log with descriptiveness of 2. https://we.tl/t-sVtpjtZhoK

There are some error messages in there, and most of them come from timestamp 00:00. There is 1 error message at a later point, where Intel HD Graphics 4600 driver crashed, but that is unrelated. If I search for "error" in the file, I see a couple of problems arise.

The main error message that arose at 00:00, is when VLC replayed the last chunk of the stream 3 times( the couple seconds long bit). Error message is the following, however you should also take a look at before and after lines, because the events themselves are longer than these 2 lines, that can be found at lines 162.363, 162.389, 163.263, 163.300:
main error: cannot add a new stream (unsupported while muxing to this format). You can try increasing sout-mux-caching value
duplicate debug: - failed for output 0
The other error message in the log, is unrelated, they are due to ASUS being jerks, and not releasing proper intel chipset drivers for Windows 10 for a 2015 laptop, and the reason I will NEVER, EVER, buy a laptop again. The Intel HD Graphics 4600 crashed. That error message is:
main error: buffer deadlock prevented
So, here is the results, I would love if I could know if someone actual dev read it, and help me, or I help them, fix this issue.

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Hitchhiker » 12 Jun 2021 08:31

You should create a new ticket at https://code.videolan.org/videolan/vlc/-/issues

Provide the link to your thread and also to the log file you uploaded to WeTransfer. Keep a copy of the latter yourself in case the link expires.

Shadow0013
Blank Cone
Blank Cone
Posts: 17
Joined: 03 Jun 2021 15:15

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Shadow0013 » 12 Jun 2021 09:05

Okay. But when I registered to that website, it forces me to use 2FA, and I don't want to download another spy and bloatware on my phone. How can I get around this issue?

Lotesdelere
Cone Master
Cone Master
Posts: 9961
Joined: 08 Sep 2006 04:39
Location: Europe

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Lotesdelere » 12 Jun 2021 11:24

Okay. But when I registered to that website, it forces me to use 2FA, and I don't want to download another spy and bloatware on my phone. How can I get around this issue?

https://forum.videolan.org/viewtopic.ph ... 40#p515540
There are many people who thinks like us but we got no answer from the devs and the site managers yet.
Sooner or later they'll have to realize that we do NOT want to deal with any kind of tracking just for helping VideoLAN.

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Hitchhiker » 12 Jun 2021 14:27

Okay. But when I registered to that website, it forces me to use 2FA, and I don't want to download another spy and bloatware on my phone. How can I get around this issue?

As I understand it from a user on this forum you can create an account on Gitlab.com and then login with that without having to use 2FA.

EDIT:

The user who suggested creating an account on Gitlab to get around 2FA was Vampiros. Here's the relevant post:
https://forum.videolan.org/viewtopic.ph ... 22#p516222

Shadow0013
Blank Cone
Blank Cone
Posts: 17
Joined: 03 Jun 2021 15:15

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Shadow0013 » 13 Jun 2021 08:17

You cannot login with GitHub account, you are still forced to download a shitty 2FA program to your phone. I tried it. But whatever, I downloaded the 3rd party made by unknown developer software, used the key, and immediately deleted it. And I can only hope it didn't do anything else on my phone.

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Hitchhiker » 13 Jun 2021 08:49

You cannot login with GitHub account, you are still forced to download a shitty 2FA program to your phone. I tried it. But whatever, I downloaded the 3rd party made by unknown developer software, used the key, and immediately deleted it. And I can only hope it didn't do anything else on my phone.

Sorry to hear Gitlab didn't work. Maybe it did before, but they regarded the option as a workaround and removed it. I don't like 2FA either and refuse to use it although Google was unavoidable.

As regards the 3rd party app you used I assume you mean Authy. If so, I don't think you have anything to worry about since it's mentioned on Ghacks.net and they're a bona fide site for just about everything IT related.

Shadow0013
Blank Cone
Blank Cone
Posts: 17
Joined: 03 Jun 2021 15:15

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Shadow0013 » 13 Jun 2021 10:29

No I didn't use Authy, they required my phone number, so F*** that, I used something called Duo Mobile, from some company called Duo Security LLC. But whatever, it's over, I instantly deleted if from my phone, then I reported this bug with an angry tone, and shat on the devs, and from there on in, I will just not use VLC for anything related to streams, because it's incapable to do so. :)

So, yeah, thanks for the help man :)

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Hitchhiker » 13 Jun 2021 13:57

No I didn't use Authy, they required my phone number, so F*** that, I used something called Duo Mobile, from some company called Duo Security LLC. But whatever, it's over, I instantly deleted if from my phone, then I reported this bug with an angry tone, and shat on the devs, and from there on in, I will just not use VLC for anything related to streams, because it's incapable to do so. :)

So, yeah, thanks for the help man :)

I don't think it's fair to blame vlc since it can handle most streams I've come across so far. If there was an alternative I'm sure somebody would have responded to your post on StackOverflow by now. I came across that while searching the Web to see if the same problem had cropped up elsewhere initially.

Also, it's only fair to give the devs an opportunity to address the issue I would have thought.

Stef_An
Blank Cone
Blank Cone
Posts: 38
Joined: 13 Apr 2018 23:50

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Stef_An » 23 Jun 2021 00:02

No I didn't use Authy, they required my phone number, so F*** that, I used something called Duo Mobile, from some company called Duo Security LLC.
I know, that this is a workaround, but it works: I successfully used oathtool in Linux to create a 6 digit PIN from the long code on the 2FA setup page. The whole article about it is here:

https://www.cyberciti.biz/faq/use-oatht ... ation-2fa/

At the end, all you need is a command like oathtool -b --totp 'N3V3R G0nn4 G1v3 Y0u Up' and it generates your PIN. The only problem - it works just for the current session. So after logoff, on the next logon, one have to repeat the PIN generation. But on the bright side: one don't have to install some extra software on the phone or somewhere else.

On Windows, WinAuth should do the trick.

Stef_An
Blank Cone
Blank Cone
Posts: 38
Joined: 13 Apr 2018 23:50

Re: VLC m3u8 stream recording stops at timestamp rollover

Postby Stef_An » 06 Jul 2021 14:36

I know, that this is a workaround, but it works:
Afterwards, I found this solution on the wiki.

So now one has 3 possibilities:
  1. As in the wiki, just save the long code from the right of the QR code and use it with oathtool to manually generate the PIN every time one needs it.
  2. Use some full-GUI solution like OTPClient on Linux or WinAuth on Windows or Linux (here with wine). One can create a local saved database and let the PIN be generated every time one needs it. There is no need to install some extra software on the PC or smartphone and sign-up for another account on another service. And the data is saved locally, not in some cloud. One has to, on the other side, setup such database on every device, where one likes to log in into the GitLab of the VLC.
  3. As a deviation from the both other scenarios: one just deactivates 2FA every time before one logs off on the GitLab. This way, next time after the log-in, one would be asked to set up the 2FA again and would be once again shown the long code to create a PIN. There is no need to save any information locally. One just uses some program, GUI or not, to generate the PIN as in the set-up step. But: don't forget to deactivate the 2FA, if you don't save the code(s)!
In any scenario: save the recovery codes, for the case you lose the code or need them otherwise. And: either save the code right to the QR code in some file/program database or on the paper, or don't forget to deactivate the 2FA before logout.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 21 guests