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

Print JSON and conversion progress command? #7056

Closed
danvass opened this issue Oct 3, 2015 · 16 comments
Closed

Print JSON and conversion progress command? #7056

danvass opened this issue Oct 3, 2015 · 16 comments

Comments

@danvass
Copy link

@danvass danvass commented Oct 3, 2015

Hello,

Is it possible to make a request with the following arguments "--extract-audio" and then get the app to return some JSON with details about the media (such as title, description and thumbnail) and the format of the audio (for example, the extension and quality and whatnot) before proceeding to display the regular conversion progress?

If it's not, could this be implemented as it would be a useful to get a summary in JSON form of the metadata of the format that is about to be downloaded.

Thanks,
Daniel

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 3, 2015

You can dump metadata to file with --write-info-json. I don't see much sense mixing metadata and progress output in a single stream.

@dstftw dstftw closed this Oct 3, 2015
@danvass
Copy link
Author

@danvass danvass commented Oct 3, 2015

@dstftw Does dumping it to --write-info-json give information just for the specific audio it downloaded or for the entire video? Because I would need the information specific for what was downloaded. And in addition, it can be quite useful to output both things to many people. Would be nice to have as an option instead of only being able to do it with the conversion progress being silent.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 3, 2015

It dumps metadata for the file being downloaded in outer dict as well as all others formats under formats key. When JSON metadata and non-metadata are mixed together you down know exactly where one finishes and another starts.

@danvass
Copy link
Author

@danvass danvass commented Oct 3, 2015

@dstftw I'll take a look but I'm sure some indicator could be added. Sure it may not be useful to everyone but having the option is always better than not. Is there some other command I could run that doesn't download it but would give me the metadata plus audio format as per required above? I suppose I could pslit them up in two commands.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 3, 2015

-j, --dump-json                  Simulate, quiet but print JSON information. See --output for a description of available keys.
-J, --dump-single-json           Simulate, quiet but print JSON information for each command-line argument. If the URL refers to a playlist, dump the whole playlist
                                 information in a single line.
@danvass
Copy link
Author

@danvass danvass commented Oct 3, 2015

@dstftw Thank you, but I would appreciate if you would add my suggestion as an enhancement in case someone decides to implement it.

@danvass
Copy link
Author

@danvass danvass commented Oct 3, 2015

@dstftw I do not understand what the difference between the two args is though.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 3, 2015

I would prefer avoiding any kind of options that require some obscure indicators or introduce nondeterminism.
The difference is this:

If the URL refers to a playlist, dump the whole playlist information in a single line.

@danvass
Copy link
Author

@danvass danvass commented Oct 3, 2015

@dstftw Hmm ok, up to you. Is it at least possible to specify that if it a playlist is sent through to only download the first video or at most one video?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 3, 2015

Any of these:

--playlist-end NUMBER            Playlist video to end at (default is last)
--playlist-items ITEM_SPEC       Playlist video items to download. Specify indices of the videos in the playlist separated by commas like: "--playlist-items 1,2,5,8"
                                 if you want to download videos indexed 1, 2, 5, 8 in the playlist. You can specify range: "--playlist-items 1-3,7,10-13", it will
                                 download the videos at index 1, 2, 3, 7, 10, 11, 12 and 13.
--max-downloads NUMBER           Abort after downloading NUMBER files
@danvass
Copy link
Author

@danvass danvass commented Oct 3, 2015

@dstftw Is it possible to specify a non-DASH audio format by default without having to check the formats of each one? And thank you for the above post.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 3, 2015

Yes, -f best. Note, there are no audio-only non-DASH formats.

@danvass
Copy link
Author

@danvass danvass commented Oct 3, 2015

@dstftw Hmm because I have issues wiht some of the audio files downloaded and struggle to play them - is there perhaps a recommended encoding setting or something to help eliminate problems?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 3, 2015

Too ambiguous to suggest anything.

@danvass
Copy link
Author

@danvass danvass commented Oct 3, 2015

@dstftw Is it possible to set a duration limit where if the media is above a certain duration to not download it or alternatively just download up to the limit?

And for the previous question I'm wondering if perhaps I need to change some encoding settings to make the audio playable.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 3, 2015

--match-filter "duration < 100". It's not possible to download up to the limit.
Until you provide --verbose log nothing can be suggested. If you decide to do that open a new issue.

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.