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

Downloading the audio with the language tag #26816

Closed
astrid79 opened this issue Oct 6, 2020 · 9 comments · May be fixed by #26910
Closed

Downloading the audio with the language tag #26816

astrid79 opened this issue Oct 6, 2020 · 9 comments · May be fixed by #26910
Labels

Comments

@astrid79
Copy link

@astrid79 astrid79 commented Oct 6, 2020

Checklist

  • I'm asking a question
  • I've looked through the README and FAQ for similar questions
  • I've searched the bugtracker for similar questions including closed ones

Question

I do not know if it is possible to download it with the language tag selected from the list, I decided to ask here because I cannot handle this.

here I want to download the audio file with the language tag (like [de]) instead of the format code.

format code  extension  resolution note
1            m4a        audio only [en] DASH audio  128k , m4a_dash container, mp4a.40.2 (44100Hz)
3            m4a        audio only [fr] DASH audio  128k , m4a_dash container, mp4a.40.2 (44100Hz)
2            m4a        audio only [de] DASH audio  128k , m4a_dash container, mp4a.40.2 (44100Hz)
4            mp4        512x288    DASH video  763k , mp4_dash container, avc1.4d4015, video only
5            mp4        768x432    DASH video 1863k , mp4_dash container, avc1.4d401e, video only
6            mp4        1280x720   DASH video 3312k , mp4_dash container, avc1.4d401f, video only
7            mp4        1280x720   DASH video 4277k , mp4_dash container, avc1.64001f, video only
8            mp4        1920x1080  DASH video 5756k , mp4_dash container, avc1.640028, video only (best)
@astrid79 astrid79 added the question label Oct 6, 2020
@Fetchinator7
Copy link

@Fetchinator7 Fetchinator7 commented Oct 11, 2020

Will you please post the link to the video? (I've never seen that on a video before.)

@astrid79
Copy link
Author

@astrid79 astrid79 commented Oct 12, 2020

Will you please post the link to the video? (I've never seen that on a video before.)

I prepared the above output as an example.

You can check the "Angel One" video on this page as an example demo.
https://shaka-player-demo.appspot.com/demo/
https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd

@pukkandan
Copy link

@pukkandan pukkandan commented Oct 17, 2020

The language information is stored with the key "language". So I expected -f bestaudio[language=en] to work, but sadly it doesn't . The issue is that the fields available for filtering is hard-coded in. You can use your own version with language added as filterable field. Or, you can try writing a bash script to get the format id from the -F. I doubt there is any other way.

@pukkandan
Copy link

@pukkandan pukkandan commented Oct 17, 2020

I have created a pull request that solves this issue.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 17, 2020

Promoting any 3rd party forks/apps is considered spam. Do this privately if needed.

@pukkandan
Copy link

@pukkandan pukkandan commented Oct 17, 2020

@dstftw I'm only trying to help. But your repo, your rules. I will make sure not to do this again.

@astrid79
Copy link
Author

@astrid79 astrid79 commented Oct 17, 2020

The language information is stored with the key "language". So I expected -f bestaudio[language=en] to work, but sadly it doesn't . The issue is that the fields available for filtering is hard-coded in. You can use your own version with language added as filterable field. Or, you can try writing a bash script to get the format id from the -F. I doubt there is any other way.

@pukkandan Thank you for your interest, It is enough to add language to line 1076,
like \s*(?P<key>ext|acodec|vcodec|container|protocol|format_id|language)
@dstftw It would be great if you could do some update for that.

@astrid79 astrid79 closed this Oct 17, 2020
@pukkandan
Copy link

@pukkandan pukkandan commented Oct 18, 2020

@astrid79 Yes, it would be enough to add language to the regex to solve this specific issue. However, my method (relaxing the regex to accept any field) has the advantage that the user can filter by any key that the extractor makes available - filesize, or format_note for example.

@astrid79
Copy link
Author

@astrid79 astrid79 commented Oct 18, 2020

@astrid79 Yes, it would be enough to add language to the regex to solve this specific issue. However, my method (relaxing the regex to accept any field) has the advantage that the user can filter by any key that the extractor makes available - filesize, or format_note for example.

Thank you for your explanatory answers, I'm grateful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.