Pmmlabs / OpenPeriscope

Unofficial Periscope client
GNU General Public License v2.0
74 stars 30 forks source link

Invalid DTS and Invalid timestamps #107

Open DivineDivan opened 6 years ago

DivineDivan commented 6 years ago

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

[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

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

Pmmlabs commented 6 years ago

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

paulescobar commented 6 years ago

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 commented 6 years ago

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).

gitnew2018 commented 6 years ago

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_MODv5.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 commented 6 years ago

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:

cons:

KaMyKaSii commented 6 years ago

@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!