kkdai / youtube

Download Youtube Video in Golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Video plays but no audio

atljoseph opened this issue · comments

On Mac. Installed with brew.

Can you please provide more details about how you download video ?

For me if I set -q '' to get best quality I have no audio, if I don't then I get audio.

When I pass -q '' codecs I get this info:

quality=hd1080 mimeType="video/mp4; codecs="avc1.64002a"

When I don't I get this info, so seems it's not getting the audio stream when hd1080

quality=medium mimeType="video/mp4; codecs="avc1.42001E, mp4a.40.2"

Related to #273

For now I'm downloading 2 videos and combining the audio with ffmpeg as a hack, I only have a few to download so that's fine for me.

I encountered same issued but solved by running command with the tag that has both audio and video.

For example, url of video you want to download is https://www.youtube.com/watch?v=5JberwYl-Zo

  1. Run, youtubedr info https://www.youtube.com/watch?v=5JberwYl-Zo
    you can see ITAG 22 has both video and audio
  2. Run youtubedr download -q 22 https://www.youtube.com/watch?v=5JberwYl-Zo -o happydog.mp4
    pass ITAG 22 to -q flag so you can download video and audio
  3. open happydog.mp4 file