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

Rai without audio #27830

Open
avagraha opened this issue Jan 15, 2021 · 10 comments
Open

Rai without audio #27830

avagraha opened this issue Jan 15, 2021 · 10 comments
Labels

Comments

@avagraha
Copy link

Checklist

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

Question

WRITE QUESTION HERE

1 of 3)

C:\Users\andrea>y https://www.raiplay.it/video/2021/01/Che-Dio-ci-aiuti-S6E6
-Deja-vu-383bca47-d8a1-49c0-876c-f20a2d56d4c1.html -F
[RaiPlay] 383bca47-d8a1-49c0-876c-f20a2d56d4c1: Downloading video JSON
[RaiPlay] 383bca47-d8a1-49c0-876c-f20a2d56d4c1: Downloading XML metadata fo
r platform mon
[RaiPlay] 383bca47-d8a1-49c0-876c-f20a2d56d4c1: Downloading m3u8 informatio
n
[RaiPlay] 383bca47-d8a1-49c0-876c-f20a2d56d4c1: Downloading XML metadata fo
r platform flash
[RaiPlay] 383bca47-d8a1-49c0-876c-f20a2d56d4c1: Downloading XML metadata fo
r platform native
[info] Available formats for 383bca47-d8a1-49c0-876c-f20a2d56d4c1:
format code               extension  resolution note
hls-aac-Audiodescrizione  mp4        audio only [Audiodescrizione]
hls-aac-Italiano          mp4        audio only [Italiano]
hls-1200                  mp4        704x396    1172k
hls-1800                  mp4        928x522    1758k
hls-2400                  mp4        1024x576   2100k  (best)

2 of 3)

C:\Users\andrea>y https://www.raiplay.it/video/2021/01/Che-Dio-ci-aiuti-S6E
-Obbligo-o-verita-027f044e-836d-4a3b-b1da-8eaa81715e3d.html
[RaiPlay] 027f044e-836d-4a3b-b1da-8eaa81715e3d: Downloading video JSON
[RaiPlay] 027f044e-836d-4a3b-b1da-8eaa81715e3d: Downloading XML metadata f
r platform mon
[RaiPlay] 027f044e-836d-4a3b-b1da-8eaa81715e3d: Downloading m3u8 informati
n
[RaiPlay] 027f044e-836d-4a3b-b1da-8eaa81715e3d: Downloading XML metadata f
r platform flash
[RaiPlay] 027f044e-836d-4a3b-b1da-8eaa81715e3d: Downloading XML metadata f
r platform native
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 251
[download] Destination: Che Dio ci aiuti S6E6 - Obbligo o verità-027f044e-
36d-4a3b-b1da-8eaa81715e3d.mp4
[download] 100% of 875.83MiB in 19:06

3 of 3)
where is the audio (not downloaded for unknown reasons)??

@414n
Copy link

414n commented Jan 17, 2021

I had this too on some raiplay streams in the past.
I worked around it by:

  1. letting it download the video-only stream
  2. downloading the audio-only track by using -f hls-aac-Italiano with the same URL
  3. remuxing the two together in mkv format (mp4 had delay issues) using ffmpeg:
# Convert audio track to wav first. I observed that this removes audio delays after
ffmpeg -i AUDIO_ONLY_FILE.mp4 AUDIO_ONLY_FILE.wav
# Mux the video and audio files together:
ffmpeg -i VIDEO_ONLY_FILE.mp4 -i AUDIO_ONLY_FILE.wav -c:v copy FINAL_VIDEO.mkv

@avagraha
Copy link
Author

avagraha commented Jan 18, 2021 via email

@ghost
Copy link

ghost commented Jan 24, 2021

I have no problems with the following commands:

youtube-dl "https://www.raiplay.it/video/2021/01/Che-Dio-ci-aiuti-S6E6-Deja-vu-383bca47-d8a1-49c0-876c-f20a2d56d4c1.html" -o video.mp4
youtube-dl "https://www.raiplay.it/video/2021/01/Che-Dio-ci-aiuti-S6E6-Deja-vu-383bca47-d8a1-49c0-876c-f20a2d56d4c1.html" -f hls-aac-Italiano -o audio.mp4
ffmpeg -i video.mp4 -i audio.mp4 -c copy che-dio-ci-aiuti-s06e06.mp4

@avagraha
Copy link
Author

avagraha commented Jan 25, 2021 via email

@pjammo
Copy link

pjammo commented Feb 18, 2021

In this case hls-1200, hls-1800 and hls-2400 have no audio, they should be marked as video only formats.
Temporary workaround: -f best+bestaudio.

@christian-0s
Copy link

In this case hls-1200, hls-1800 and hls-2400 have no audio, they should be marked as video only formats.
Temporary workaround: -f best+bestaudio.

Unfortunately this doesn't work for me, audio is ok only for first 7 minutes, then it's muted.

@audetto
Copy link

audetto commented Oct 28, 2021

You don't need to use ffmpeg, just do

-f "hls-2400+hls-aac-Italiano"

@audetto
Copy link

audetto commented Oct 28, 2021

It is possible to fix it, but requires a small code change:

if audio_group_id and codecs and f.get('vcodec') != 'none':

if you remove and codecs then the format is marked as video only and audio is downloaded automatically.

If you read the comment just above that line, I think the code is trying to be defensive about audio+video formats that look like video only, so reducing the cases of video only.

If RAI added CODECS='' as per spec, it would work out of the box.

format code               extension  resolution note
hls-aac-Audiodescrizione  mp4        audio only [Audiodescrizione] 
hls-aac-Italiano          mp4        audio only [Italiano] 
hls-1200                  mp4        736x414    1288k , video only
hls-1800                  mp4        1024x576   1758k , video only
hls-2400                  mp4        1280x720   2344k , video only (best)

@fabzzap
Copy link

fabzzap commented Jan 4, 2022

Found more examples of this. Could the suggested fix by @audetto be implemented?

@thePanz
Copy link

thePanz commented Jan 21, 2022

The solution from @audetto works for me.

Sidenote: the download speed of the RaiPlay videos/streams are way faster when ffmpeg is used, instead of the native method.

Try with: -f 'hls-2400+hls-aac-Italiano' --hls-prefer-ffmpeg (download went from 10mins to 2mins for a ~50min episode)

nixxo added a commit to nixxo/yt-dlp that referenced this issue Jan 1, 2023
…anifest

- fixes yt-dlp#887
A+V stream getting recognized as only V

- fixes yt-dlp#2918 and ytdl-org/youtube-dl#27830
only V stream getting recognized as A+V

- added tests in test_InfoExtractor with the 2 manifest from the issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants