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

Please constrain "-F" ("--list-formats") format list output to 80 columns maximum #20018

Closed
jaimet opened this issue Feb 26, 2019 · 1 comment
Closed
Labels

Comments

@jaimet
Copy link

@jaimet jaimet commented Feb 26, 2019

  • I've verified and I assure that I'm running youtube-dl 2019.02.18
  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

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

(I can't work out whether this is a bug report or an enhancement request. Perhaps it's both!)

youtube-dl -F (youtube-dl --list-formats) output is often wider than 80 characters. For example (hard wrapping the output at column 80):

$ youtube-dl -F upyrWwstEMY
[youtube] upyrWwstEMY: Downloading webpage
[youtube] upyrWwstEMY: Downloading video info webpage
[info] Available formats for upyrWwstEMY:
format code  extension  resolution note
249          webm       audio only DASH audio   53k , opus @ 50k, 1.46MiB
250          webm       audio only DASH audio   70k , opus @ 70k, 1.94MiB
171          webm       audio only DASH audio  128k , vorbis@128k, 3.75MiB
140          m4a        audio only DASH audio  130k , m4a_dash container, mp4a.4
0.2@128k, 4.00MiB
251          webm       audio only DASH audio  139k , opus @160k, 4.02MiB
394          mp4        192x144    144p   69k , av01.0.05M.08, 25fps, video only
, 1.80MiB
278          webm       192x144    144p   73k , webm container, vp9, 25fps, vide
o only, 2.03MiB
160          mp4        192x144    144p   86k , avc1.4d400b, 25fps, video only, 
1.93MiB
395          mp4        320x240    240p  156k , av01.0.05M.08, 25fps, video only
, 3.72MiB
242          webm       320x240    240p  170k , vp9, 25fps, video only, 4.00MiB
133          mp4        320x240    240p  185k , avc1.4d400d, 25fps, video only, 
3.46MiB
396          mp4        480x360    360p  273k , av01.0.05M.08, 25fps, video only
, 6.29MiB
243          webm       480x360    360p  308k , vp9, 25fps, video only, 6.77MiB
134          mp4        480x360    360p  413k , avc1.4d4015, 25fps, video only, 
7.89MiB
17           3gp        176x144    small   81k , mp4v.20.3, mp4a.40.2@ 24k (2205
0Hz), 2.52MiB
36           3gp        320x240    small  221k , mp4v.20.3, mp4a.40.2 (22050Hz),
 6.84MiB
18           mp4        480x360    medium  456k , avc1.42001E, mp4a.40.2@ 96k (4
4100Hz), 14.12MiB (best)

Also, to confirm the maximum line length of the output:

$ youtube-dl -F upyrWwstEMY | awk '{if(length>max)max=length}END{print max}'
104

Could you please either provide an alternative output format for -F/--list-format which is constrained to a maximum of 80 characters wide, or change the default output format to be constrained to 80 characters.

Thank you!

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 26, 2019

You can build whatever output you need based on --dump-json.

@dstftw dstftw closed this Feb 26, 2019
@dstftw dstftw added the out-of-scope label Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.