Skip to content

youtube continue detect #6583

Closed
Closed

Description

@alicera

Search before asking

Question

python detect.py --source youtube_url
I cant detect the 24 hours with youtube link. It will happen the message about xx hours.

[https @ 0x7fca34619e40] Cannot reuse HTTP connection for different host: rr4---sn-npoeen7d.googlevideo.com:-1 != rr1---sn-ipoxu-un5y.googlevideo.com:-1
[https @ 0x7fca1462d000] Cannot reuse HTTP connection for different host: rr5---sn-un57en7e.googlevideo.com:-1 != rr5---sn-ipoxu-un5d.googlevideo.com:-1
[https @ 0x7fc9f45d4040] Cannot reuse HTTP connection for different host: rr5---sn-un57sn7y.googlevideo.com:-1 != rr5---sn-ipoxu-un5ez.googlevideo.com:-1
[https @ 0x7fc9d45f0280] Cannot reuse HTTP connection for different host: rr4---sn-npoeenee.googlevideo.com:-1 != rr1---sn-ipoxu-un5y.googlevideo.com:-1
[https @ 0x7fca3461db00] Cannot reuse HTTP connection for different host: rr4---sn-npoeen7d.googlevideo.com:-1 != rr1---sn-ipoxu-un5y.googlevideo.com:-1
[https @ 0x7fca14624800] Cannot reuse HTTP connection for different host: rr5---sn-un57en7e.googlevideo.com:-1 != rr5---sn-ipoxu-un5d.googlevideo.com:-1
[https @ 0x7fca3463abc0] Cannot reuse HTTP connection for different host: rr4---sn-npoeen7d.googlevideo.com:-1 != rr1---sn-ipoxu-un5y.googlevideo.com:-1
WARNING: Video stream unresponsive, please check your IP camera connection.
WARNING: Video stream unresponsive, please check your IP camera connection.
WARNING: Video stream unresponsive, please check your IP camera connection.
[ERROR:0@21606.796] global /io/opencv/modules/videoio/src/cap.cpp (164) open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.5.5) /io/opencv/modules/videoio/src/cap_images.cpp:235: error: (-5:Bad argument) CAP_IMAGES: error, expected '0?[1-9][du]' pattern, got: https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1644251250/ei/EvQAYq-EEvCGvcAP87OzaA/ip/1.164.221.42/id/LqOpCr-_XjY.1/itag/96/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D137/hls_chunk_host/rr3---sn-ipoxu-un5ez.googlevideo.com/playlist_duration/30/manifest_duration/30/vprv/1/playlist_type/DVR/initcwndbps/6470/mh/8J/mm/44/mn/sn-ipoxu-un5ez/ms/lva/mv/m/mvi/3/pl/25/dover/11/keepalive/yes/fexp/24001373,24007246/mt/1644229235/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,sgoap,sgovp,playlist_duration,manifest_duration,vprv,playlist_type/sig/AOq0QJ8wRgIhAIQq2S8xMJXmycwrjWrRjJFMYJTTYwi2URt7lQ_75qr5AiEA3F3f_RTc-ytBxMSMkS6jGoAOrdzBK_arGnk3AF-mnOw%3D/lsparams/hls_chunk_host,initcwndbps,mh,mm,mn,ms,mv,mvi,pl/lsig/AG3C_xAwRgIhAKkKkyuEubiQpMA4Ra8w0jgRHHi8Vdn7iE8nNrMTyuNIAiEAsNg6q5bUVigvkcKXd7LlOx6z5ZL_L004pajItMl5Kb4%3D/playlist/index.m3u8 in function 'icvExtractPattern'


WARNING: Video stream unresponsive, please check your IP camera connection.
[ERROR:1@21610.601] global /io/opencv/modules/videoio/src/cap.cpp (164) open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.5.5) /io/opencv/modules/videoio/src/cap_images.cpp:235: error: (-5:Bad argument) CAP_IMAGES: error, expected '0?[1-9][du]' pattern, got: https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1644251257/ei/GfQAYpzNJfGds8IP3ZuG-Ao/ip/1.164.221.42/id/-7cADyjUH_E.1/itag/96/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D137/hls_chunk_host/rr8---sn-ipoxu-un56.googlevideo.com/playlist_duration/30/manifest_duration/30/vprv/1/playlist_type/DVR/initcwndbps/8120/mh/DN/mm/44/mn/sn-ipoxu-un56/ms/lva/mv/m/mvi/8/pcm2cms/yes/pl/25/dover/11/keepalive/yes/fexp/24001373,24007246/mt/1644229235/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,sgoap,sgovp,playlist_duration,manifest_duration,vprv,playlist_type/sig/AOq0QJ8wRQIhAL5e5k3JXZ8x-ypCfwXOdhu23f22mHFvAG4RwVcLI6mVAiAcG2UldLUvVBl3bhAjHQUXiGd4bDLPULIVpW89PspFYQ%3D%3D/lsparams/hls_chunk_host,initcwndbps,mh,mm,mn,ms,mv,mvi,pcm2cms,pl/lsig/AG3C_xAwRQIhAJferyknQgMWAMw1yh8vZURMg7PQYSf3P4vpQqumFzGiAiBCTjYvSOsiTh-Wj8IF0lTfQgQzUw7bxxy-MnfEQoMK9g%3D%3D/playlist/index.m3u8 in function 'icvExtractPattern'


WARNING: Video stream unresponsive, please check your IP camera connection.
[ERROR:2@21618.649] global /io/opencv/modules/videoio/src/cap.cpp (164) open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.5.5) /io/opencv/modules/videoio/src/cap_images.cpp:235: error: (-5:Bad argument) CAP_IMAGES: error, expected '0?[1-9][du]' pattern, got: https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1644251267/ei/I_QAYsnABM3lgQOL14iwCw/ip/1.164.221.42/id/pTcdr5grL2o.1/itag/96/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D137/hls_chunk_host/rr1---sn-ipoxu-un5y.googlevideo.com/playlist_duration/30/manifest_duration/30/vprv/1/playlist_type/DVR/initcwndbps/7530/mh/c4/mm/44/mn/sn-ipoxu-un5y/ms/lva/mv/m/mvi/1/pl/25/dover/11/pacing/0/keepalive/yes/fexp/24001373,24007246/mt/1644229235/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,sgoap,sgovp,playlist_duration,manifest_duration,vprv,playlist_type/sig/AOq0QJ8wRQIgbDod3CB3a6l89z-fmpd79j80NV8Xk7F4P3vnNvRC9G0CIQDKo0Qv5quepzmCLVDfLSYFAn7GhXSH49RG0HYr6kffcA%3D%3D/lsparams/hls_chunk_host,initcwndbps,mh,mm,mn,ms,mv,mvi,pl/lsig/AG3C_xAwRQIhALPBjboqH1MIqnlaqpdCUqqe6T_ccpYAvbX7T3N4epHCAiBe2mBir4iQsCoOXOn3qlAktaHW1OgtAoG_IBdcbMXfvA%3D%3D/playlist/index.m3u8 in function 'icvExtractPattern'

Additional

No response

Activity

  1. glenn-jocher commented on Feb 9, 2022

    @glenn-jocher
    Member

    @alicera 👋 hi, thanks for letting us know about this possible problem with YOLOv5 🚀. We've created a few short guidelines below to help users provide what we need in order to get started investigating a possible problem.

    How to create a Minimal, Reproducible Example

    When asking a question, people will be better able to provide help if you provide code that they can easily understand and use to reproduce the problem. This is referred to by community members as creating a minimum reproducible example. Your code that reproduces the problem should be:

    • ✅ Minimal – Use as little code as possible to produce the problem
    • ✅ Complete – Provide all parts someone else needs to reproduce the problem
    • ✅ Reproducible – Test the code you're about to provide to make sure it reproduces the problem

    For Ultralytics to provide assistance your code should also be:

    • ✅ Current – Verify that your code is up-to-date with GitHub master, and if necessary git pull or git clone a new copy to ensure your problem has not already been solved in master.
    • ✅ Unmodified – Your problem must be reproducible using official YOLOv5 code without changes. Ultralytics does not provide support for custom code ⚠️.

    If you believe your problem meets all the above criteria, please close this issue and raise a new one using the 🐛 Bug Report template with a minimum reproducible example to help us better understand and diagnose your problem.

    Thank you! 😃

  2. alicera commented on Feb 9, 2022

    @alicera
    Author

    I just command and use live

    python detect.py --source 'https://www.youtube.com/watch?v=oHci2QFaRZs'
    
  3. glenn-jocher commented on Feb 9, 2022

    @glenn-jocher
    Member

    @alicera I still get KeyError: 'dislike_count' due to a known issue in pafy and youtube_dl packages related to removal of YouTube dislike button.

  4. alicera commented on Feb 10, 2022

    @alicera
    Author

    If you meet the error " KeyError: 'dislike_count' "
    I use the command to solve it.

    pip install --upgrade youtube-dl
    pip install pafy
    pip uninstall -y pafy
    pip install git+https://github.com/Cupcakus/pafy
    
  5. glenn-jocher commented on Feb 10, 2022

    @glenn-jocher
    Member

    @alicera oh awesome! Is there a way to update requirements.txt for this fix?

  6. alicera commented on Feb 11, 2022

    @alicera
    Author

    @ glenn-jocher Thanks for your help

    I still meet the problem. If I run the command for xx hours (continue).
    I can get the youtube images with the command, but it seem to unstable.
    I run the program about 12 hours, it will happen the error message

    python detect.py --source 'https://www.youtube.com/watch?v=oHci2QFaRZs'
    
    [ERROR:0@21603.088] global /io/opencv/modules/videoio/src/cap.cpp (164) open VIDEOIO(CV_IMAGES): raised OpenCV exception:
    
    OpenCV(4.5.5) /io/opencv/modules/videoio/src/cap_images.cpp:235: error: (-5:Bad argument) CAP_IMAGES: error, expected '0?[1-9][du]' pattern, got: https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1644527793/ei/USwFYt3ACf2H2roPxYmg6Ac/ip/1.164.221.42/id/KisDDKE5av4.1/itag/96/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D137/hls_chunk_host/rr3---sn-ipoxu-un5e7.googlevideo.com/playlist_duration/30/manifest_duration/30/vprv/1/playlist_type/DVR/initcwndbps/5900/mh/Jb/mm/44/mn/sn-ipoxu-un5e7/ms/lva/mv/m/mvi/3/pl/25/dover/11/pacing/0/keepalive/yes/fexp/24001373,24007246/mt/1644505739/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,sgoap,sgovp,playlist_duration,manifest_duration,vprv,playlist_type/sig/AOq0QJ8wRQIhAJdTi3-VySc8wia2p-YjkACjlhWDLRmT2JR8w1Pf4JG7AiBpIHcNNSbLWCXXohJhZPpbyelJaCBSx8OE753q5d5E5Q%3D%3D/lsparams/hls_chunk_host,initcwndbps,mh,mm,mn,ms,mv,mvi,pl/lsig/AG3C_xAwRgIhALomjq-hiRMkZHLO4vp2gSh6pvtPUg2kvXtH090t_oveAiEA3HORvSyEWpPaEf1834e5XvppYXgWi7_GNBp_-NlBRF0%3D/playlist/index.m3u8 in function 'icvExtractPattern'
    
    
  7. glenn-jocher commented on Feb 11, 2022

    @glenn-jocher
    Member

    @alicera I'm not sure, but 12 hours of YouTube streaming sounds like a lot. Maybe you need to embed your code in a more robust structure that reinitializes on error. You can't reasonably expect an internet connection to never go down or encounter issues.

  8. uberlumi commented on Oct 13, 2022

    @uberlumi

    The limit is currently 6 Hours, so you will have to find a solution to restart the command before this.

  9. glenn-jocher commented on Nov 15, 2023

    @glenn-jocher
    Member

    @uberlumi understood! You can programmatically handle this limitation by building in logic to restart the command after a certain period of time or upon encountering the error. This can help ensure uninterrupted processing within the specified time limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions