OpenPeriscope icon indicating copy to clipboard operation
OpenPeriscope copied to clipboard

Invalid DTS and Invalid timestamps

Open DivineDivan opened this issue 8 years ago • 6 comments

При попытке скачать частную трансляцию возникает ошибки вида:

[mp4 @ 03640a40] Invalid DTS: 78750 PTS: 75060 in output stream 0:0, replacing by guess [mpegts @ 00bd3980] Invalid timestamps stream=1, pts=13690530, dts=13694220, size=893 [hls,applehttp @ 00c2ea40] Invalid timestamps stream=1, pts=13690530, dts=13694220, size=834

При этом видио скачивается, но с искажениями к конце трансляции: зависание картинки, наложение звука

DivineDivan avatar Nov 09 '17 21:11 DivineDivan

Это не зависит от того, частная трансляция или нет. Скорее, это проблемы ведущего - звука улетело больше. чем картинки. Если в состоянии, попробуй добавить -fflags +genpts к команде вызова ffmpeg и проверь ту же трансляцию

Pmmlabs avatar Nov 13 '17 20:11 Pmmlabs

Hi, please look at "Scope Downloader 1.9 - by jamsandwich". Whenever I notice problem Periscope video that does not download correctly from OpenPeriscope...I put link into that program. "Scope Downloader" can download these videos correctly with proper length & no errors.

Maybe you can look at those "Scope Downloader" FFMpeg settings & apply them to OpenPeriscope?

paulescobar avatar Nov 22 '17 19:11 paulescobar

Another program that downloads problematic Periscope videos properly: "YouTube-DL". Like "Scope Downloader", it downloads the videos "OpenPeriscope" has trouble with (without time/length errors).

paulescobar avatar Nov 24 '17 17:11 paulescobar

After investigating how to solve issues with recording, my conclusion is you cannot do it with ffmpeg commands alone(i might be wrong :P). Paulescobar's suggestion about Scope Downloader 1.9 was really helpful because while searching for it i found another program Downloader_MOD_v5.6_(32-64bit), it is batch script and works very similarly to scope downloader. So even though i don't know batch language, this script is short and simple enough that i managed to understand all the key elements.

replays: It's very easy, download all video chunks then do this copy /b "*.ts" "one.ts" then convert to mp4 with ffmpeg. This will give you perfect replay videos.

lives: Start downloading with ffmpeg but every 2 seconds check if filesize has changed, if not changed for 40s or (ErrorLevel != 0) kill this ffmpeg task. check if state == RUNNING ? restart recording to another .ts : copy /b recorded parts and convert to mp4. That's the gist of it. There is some overlap of stitched live videos. So it's not perfect.

None of the programs I've found was able to record all live broadcasts correctly ^^.

Now i have to figure out how to implement it here. It's time to learn some NODE.

gitnew2018 avatar Apr 01 '18 11:04 gitnew2018

I have made new video downloader in nodejs. It solves most problems related to ffmpeg. If you @Pmmlabs want to take a look and tell me what would i have to do, for you to consider taking it, then check out my fork.

pros:

  • Recorded lives are identical to replays downloaded in other programs mentioned above.(except .ts not .mp4)
  • Records some broadcasts that lagged at the beginning and ffmpeg skipped them.
  • You can download very long vods now, ffmpeg usually failed at downloading vods that were couple of hours long(at least for me).
  • It's should be easier now to make Download manager, progress bar etc.
  • Overall much more control over every aspect of downloading.

cons:

  • Only .ts format.
  • Maintenance, it's by far the most complex thing I've ever done.
  • I don't really know what I'm doing, it might blow up your pc ;)

gitnew2018 avatar May 11 '18 18:05 gitnew2018

@gitnew2018 could you integrate the latest Pmmlabs commits into your fork? I would like to test your version, but it is not functional as userscript (you need the latest commits for this). Thank you!

KaMyKaSii avatar May 31 '18 22:05 KaMyKaSii