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

Works only in Debugger Mode? #23

Open
fazeez007 opened this issue Jul 25, 2024 · 6 comments
Open

Works only in Debugger Mode? #23

fazeez007 opened this issue Jul 25, 2024 · 6 comments

Comments

@fazeez007
Copy link

fazeez007 commented Jul 25, 2024

Hi, Im using the YouTube-dl library for ios. However the download of the m3u8 is only happening in the debugger mode in xcode.
Any sugestions why we are not able to run without debugger.

Below is the only log i was able to fetch while not running in debugger mode:

["[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8 (No ANSI), error utf-8 (No ANSI), screen utf-8 (No ANSI)", "[debug] yt-dlp version [email protected] from yt-dlp/yt-dlp [f10589e34] (zip) API", "[debug] params: {\'usenetrc\': False, \'netrc_location\': None, \'netrc_cmd\': None, \'username\': None, \'password\': None, \'twofactor\': None, \'videopassword\': None, \'ap_mso\': None, \'ap_username\': None, \'ap_password\': None, \'client_certificate\': None, \'client_certificate_key\': None, \'client_certificate_password\': None, \'quiet\': False, \'no_warnings\': False, \'forceurl\': False, \'forcetitle\': False, \'forceid\': False, \'forcethumbnail\': False, \'forcedescription\': False, \'forceduration\': False, \'forcefilename\': False, \'forceformat\': False, \'forceprint\': {}, \'print_to_file\': {}, \'forcejson\': False, \'dump_single_json\': False, \'force_write_download_archive\': False, \'simulate\': None, \'skip_download\': False, \'format\': None, \'allow_unplayable_formats\': False, \'ignore_no_formats_error\': False, \'format_sort\': [\'vcodec:h264\', \'res\', \'acodec:m4a\'], \'format_sort_force\': False, \'allow_multiple_video_streams\': False, \'allow_multiple_audio_streams\': False, \'check_formats\': None, \'listformats\': None, \'listformats_table\': True, \'outtmpl\': {\'default\': \'%(id)s.%(ext)s\'}, \'outtmpl_na_placeholder\': \'NA\', \'paths\': {}, \'autonumber_size\': None, \'autonumber_start\': 1, \'restrictfilenames\': False, \'windowsfilenames\': False, \'ignoreerrors\': True, \'force_generic_extractor\': False, \'allowed_extractors\': [\'default\'], \'ratelimit\': None, \'throttledratelimit\': None, \'overwrites\': None, \'retries\': 10, \'file_access_retries\': 3, \'fragment_retries\': 10, \'extractor_retries\': 3, \'retry_sleep_functions\': {}, \'skip_unavailable_fragments\': True, \'keep_fragments\': False, \'concurrent_fragment_downloads\': 1, \'buffersize\': 1024, \'noresizebuffer\': False, \'http_chunk_size\': None, \'continuedl\': True, \'noprogress\': False, \'progress_with_newline\': False, \'progress_template\': {}, \'playliststart\': 1, \'playlistend\': None, \'playlistreverse\': None, \'playlistrandom\': None, \'lazy_playlist\': None, \'noplaylist\': False, \'logtostderr\': False, \'consoletitle\': False, \'nopart\': False, \'updatetime\': True, \'writedescription\': False, \'writeannotations\': False, \'writeinfojson\': None, \'allow_playlist_files\': True, \'clean_infojson\': True, \'getcomments\': False, \'writethumbnail\': False, \'write_all_thumbnails\': False, \'writelink\': False, \'writeurllink\': False, \'writewebloclink\': False, \'writedesktoplink\': False, \'writesubtitles\': False, \'writeautomaticsub\': False, \'allsubtitles\': False, \'listsubtitles\': False, \'subtitlesformat\': \'best\', \'subtitleslangs\': [], \'matchtitle\': None, \'rejecttitle\': None, \'max_downloads\': None, \'prefer_free_formats\': False, \'trim_file_name\': 0, \'verbose\': True, \'dump_intermediate_pages\': False, \'write_pages\': False, \'load_pages\': False, \'test\': False, \'keepvideo\': False, \'min_filesize\': None, \'max_filesize\': None, \'min_views\': None, \'max_views\': None, \'daterange\': yt_dlp.utils.DateRange(\'0001-01-01\', \'9999-12-31\'), \'cachedir\': None, \'youtube_print_sig_code\': False, \'age_limit\': None, \'download_archive\': None, \'break_on_existing\': False, \'break_on_reject\': False, \'break_per_url\': False, \'skip_playlist_after_errors\': None, \'cookiefile\': None, \'cookiesfrombrowser\': None, \'legacyserverconnect\': False, \'nocheckcertificate\': True, \'prefer_insecure\': None, \'enable_file_urls\': False, \'http_headers\': {\'User-Agent\': \'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36\', \'Accept\': \'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\', \'Accept-Language\': \'en-us,en;q=0.5\', \'Sec-Fetch-Mode\': \'navigate\'}, \'proxy\': None, \'socket_timeout\': None, \'bidi_workaround\': None, \'debug_printtraffic\': False, \'prefer_ffmpeg\': True, \'include_ads\': None, \'default_search\': None, \'dynamic_mpd\': True, \'extractor_args\': {}, \'youtube_include_dash_manifest\': True, \'youtube_include_hls_manifest\': True, \'encoding\': None, \'extract_flat\': \'discard_in_playlist\', \'live_from_start\': None, \'wait_for_video\': None, \'mark_watched\': False, \'merge_output_format\': \'mp4\', \'final_ext\': None, \'postprocessors\': [{\'key\': \'FFmpegConcat\', \'only_multi_video\': True, \'when\': \'playlist\'}], \'fixup\': None, \'source_address\': None, \'call_home\': False, \'sleep_interval_requests\': None, \'sleep_interval\': None, \'max_sleep_interval\': None, \'sleep_interval_subtitles\': 0, \'external_downloader\': {}, \'download_ranges\': yt_dlp.utils.download_range_func([], []), \'force_keyframes_at_cuts\': False, \'list_thumbnails\': False, \'playlist_items\': None, \'xattr_set_filesize\': None, \'match_filter\': None, \'color\': {}, \'ffmpeg_location\': None, \'hls_prefer_native\': None, \'hls_use_mpegts\': None, \'hls_split_discontinuity\': False, \'external_downloader_args\': {}, \'postprocessor_args\': {}, \'cn_verification_proxy\': None, \'geo_verification_proxy\': None, \'geo_bypass\': True, \'geo_bypass_country\': None, \'geo_bypass_ip_block\': None, \'_warnings\': [], \'_deprecation_warnings\': [], \'compat_opts\': set(), \'logger\': <MyLogger object at 0x1390438e0>, \'progress_hooks\': [<built-in method pythonkit_swift_function of PyCapsule object at 0x139042a60>]}", "[debug] Python 3.10.10 (CPython iPhone16,1 64bit) - macOS-17.5.1-iPhone16,1-64bit (OpenSSL 1.1.1l 24 Aug 2021)"]

So what I noticed is that the log after the above in debugger mode continue like below

Popen.__init__: <yt_dlp.utils.Popen object at 0x125e2feb0> (['ffmpeg', '-bsfs'],)
Popen.communicate: <yt_dlp.utils.Popen object at 0x125e2feb0> () {'timeout': None}
popenHandler [<yt_dlp.utils.Popen object at 0x125e2feb0>, (['ffmpeg', '-bsfs'],)]
@fazeez007 fazeez007 changed the title Works on in Debugger Mode? Works only in Debugger Mode? Jul 25, 2024
@nasircsms
Copy link

facing same issue.. as soon as debugger is detached it stops working.

@fazeez007
Copy link
Author

fazeez007 commented Aug 29, 2024

@nasircsms Any progress on the issue?

@nasircsms
Copy link

@nasircsms Any progress on the issue?

Nope.. no progress so far.

@nasircsms
Copy link

@fazeez007 did you manage to resolve it ?

@kewlbear any guidance on it ??

@willsmillie
Copy link

+1

I'm also encountering this. I'll also poke around if there's some recommendations on where to look. It's hard to debug when you can't use the debugger 🥴. I tried using os_log but it won't let me log variables without making the log private.

Seems like it's something to do with calling ffmpeg via python. I know what's pretty vague tho....

@willsmillie
Copy link

I managed to mitigate the issue by disabling stdout/err redirection in the popenHandler.

I'm not totally certain of what/if implications this may have, so hoping @kewlbear can maybe shed some light here.

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