Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple feature requests for Periscope, Sometimes it does not merge ts segments #9261

Closed
6 of 8 tasks
dandidondi opened this issue Apr 20, 2016 · 3 comments
Closed
6 of 8 tasks

Comments

@dandidondi
Copy link

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.04.19. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2016.04.19

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Description of your issue, suggested solution and other information

1) Questions (general)
1.1) How i can set default output template for a specific site. For example when i download a video from youtube, i want it as "%(uploader)s %(uploader_id)s/%(upload_date)s %(id)s %(title)s.%(ext)s". Because it is hard to type every time.

1.2) Is there a program or script that uses youtube-dl in background to automatically download new videos from the selected channels with selected Itag's? Currently i use youtube-dl to download an entire channel, but in every run it checks already downloaded videos and this takes too much time.

1.3) When we download a replay from periscope, youtube-dl uses ffmpeg to convert multiple ts segments to one single mp4 file. Is this conversion lossless? And what about live streams, why it has to use ffmpeg while downloading? Why not using it to merge segments just at the end of the download?

1.4) When we download from periscope, is there a quality difference between live streams and replays? (assuming our connection with periscope servers are %100 healthy)

2) Bug Reports (for periscope)
2.1) Sometimes, when i download a replay from periscope there happens an error and it doesnt merge downloaded segments. I dont know exactly when this happens but it happens rarely and very annoying. So i cant provide you a console output, but i guess it is happening when the streamer deletes that stream while i downloading.

3) Feature Requests (for periscope)
3.1) Just as we can download an entire youtube channel, can you make possible to download all replays of a given periscope user?

3.2) Can you add a command for downloading comments and hearts in a txt file? katch.tv already does more than this, but it archives only your streams not others.
Example format: [TIME] [Username] [Color] [Comment]

3.3) Sometimes i like a live periscope stream and want it to download its replay as soon as the stream ends. Can you add a command that checks the stream every X seconds until it ends, then starts to download?
Example: youtube-dl --only-replay https://www.periscope.tv/w/1OdJrQMEazqGX
//waits until the stream ends then starts downloading replay
Example: youtube-dl --live-and-replay https://www.periscope.tv/w/1OdJrQMEazqGX
//records the live stream until it ends then starts downloading replay, and if it can completely download replay, it will automatically deletes the live record which is not necessary anymore.

@Vrihub
Copy link
Contributor

Vrihub commented May 9, 2016

I'm not a developer, but you raised some interesting points, so I'll try to get the discussion started...

1.1) How i can set default output template for a specific site

You can write a small shell script that calls youtube-dl with your preferred template options, and run it when you want to download from that specific site.

1.3) When we download a replay from periscope, youtube-dl uses ffmpeg to convert multiple ts segments to one single mp4 file. Is this conversion lossless? And what about live streams, why it has to use ffmpeg while downloading? Why not using it to merge segments just at the end of the download?

Yes, that conversion is lossless (.ts segments are just chunks of a .mp4 stream). About live streams: that's exactly what happens in the background, segments are merged into a single file, and ffmpeg is used because it's quite good at that job :)

1.4) When we download from periscope, is there a quality difference between live streams and replays?

In principle no. But as you mentioned, connection problems (either on your side, or on the side of the broadcast author) can cause problems in the recorded video (e.g. image gets stuck for a while, some parts of the broadcast are missing, audio/video out of sync). When the connection problem is on your side, you can download the replay file to get a good recording; but if there's a connection problem on their side (bad mobile network coverage) the replay file will have the same problems too.

2.1) Sometimes, when i download a replay from periscope there happens an error and it doesnt merge downloaded segments.

Yes, it happens. Maybe an option could be added to automatically delete .mp4.part-Frag files when the ffmpeg process fails because the replay has disappeared (but be sure to only delete the Frag files, NOT the mp4.part file, which is a playable, though partial, video file)

3.1)
...
3.2)

These features sound interesting, I suggest you open a ticket for each of them, so that they can be discussed (BTW 3.1 is feasible, I have a bash script that implements it, but unfortunately I'm not that good at python)

3.3) Sometimes i like a live periscope stream and want it to download its replay as soon as the stream ends.

You can run youtube-dl URL && youtube-dl URL and you will get both the live recording and the replay.

@yan12125
Copy link
Collaborator

yan12125 commented May 9, 2016

Thanks @Vrihub for these answers. Here are some extra points:

1.1) How i can set default output template for a specific site

Another option: using a configuration file.

1.2) Currently i use youtube-dl to download an entire channel, but in every run it checks already downloaded videos and this takes too much time.

--download-archive should help.

1.3) And what about live streams, why it has to use ffmpeg while downloading?

The reason is ffmpeg is currently the only one that can do that. youtube-dl's downloader is incomplete and unable to handle live streams. In fact, ffmpeg is not perfect, either. (#9349)


For bug reports, it's almost impossible to fix it without a verbose log. You may want to add -v to youtube-dl every time to get a valid copy of console outputs.

For feature requests, please open an issue for each one. It's difficult to track multiple features in a single issue.

@yan12125 yan12125 closed this as completed May 9, 2016
@Vrihub
Copy link
Contributor

Vrihub commented May 10, 2016

BTW 3.1) is now implemented, see #9388

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants