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

How to map audio and video #23138

Closed
campones opened this issue Nov 18, 2019 · 14 comments
Closed

How to map audio and video #23138

campones opened this issue Nov 18, 2019 · 14 comments
Labels

Comments

@campones
Copy link

@campones campones commented Nov 18, 2019

hello

here is my master playlist

[generic] master: Requesting header
[generic] master: Downloading m3u8 information
[info] Available formats for master:
format code                  extension  resolution note
audio-mp4a.40.2-mp4        audio only [fr]
audio-mp4a.40.2-mp4        audio only [qaa]
audio-mp4a.40.2-mp4        audio only [qad]
192                          mp4        400x224     192k , , 5.0fps, video only
400                          mp4        400x224     400k , , 12.5fps, video only
602                          mp4        512x288     602k , , 25.0fps, video only
900                          mp4        512x288     900k , , 25.0fps, video only
1500                         mp4        768x432    1500k , , 25.0fps, video only
3000                         mp4        1280x720   3000k , , 25.0fps, video only
5000                         mp4        1280x720   5000k , , 50.0fps, video only (best)

Is there a way to map the video and the audio needed. Or is it a problem with the "ç" . streamlink isn't able to read the playlist because of that character, livestreamer is old and grab only the video, same with ytdl actually, and only a complex mapping with ffmpeg allow me to grab both needed tracks

@campones
Copy link
Author

@campones campones commented Nov 18, 2019

it's not working obviously

I wouldn't need to use -f bestvideo+bestaudio if ytdl was able to actually find the audio track on his own. and using this flag doesn't resolve anything, just tried

@campones
Copy link
Author

@campones campones commented Nov 18, 2019

  Duration: N/A, start: 47768.000000, bitrate: N/A
  Program 0
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc
    Metadata:
      variant_bitrate : 0
Output #0, mp4, to 'file:-.f5000.part':
  Metadata:
    encoder         : Lavf57.82.102
    Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 50 fps, 50 tbr, 90k tbn, 90k tbc
    Metadata:
      variant_bitrate : 0
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
@remitamine
Copy link
Collaborator

@remitamine remitamine commented Nov 18, 2019

you have to post the URL you're trying to download from.

@campones
Copy link
Author

@campones campones commented Nov 18, 2019

you need swiss ip

tried this, same thing, it doesn't grab any audio track (which I shouldn't need to request manually anyway)

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Nov 18, 2019

i can't help you if you're not providing the information needed.

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Nov 18, 2019

this is an m3u8 manifest for a Livestream with separate audio and video, youtube-dl currently does not support this type of videos, instead, you can directly use FFmpeg until this is supported.

@campones
Copy link
Author

@campones campones commented Nov 18, 2019

well I show you the format available right in the first post.

@campones
Copy link
Author

@campones campones commented Nov 18, 2019

I think you should support this asap as also I saw francetv is doing independant audio/videos segments, that ffmpeg has to remux but it doesn't do it quite well, lot's of time, it's non sync and the ffmpeg pid freeze.. without exiting which is the worst.

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Nov 18, 2019

it's not supported because youtube-dl starts to download the video only format first until it finishes then it will proceed to the audio only format, this would work only for VOD manifests not for Live manifests.

@campones
Copy link
Author

@campones campones commented Nov 18, 2019

I think they did it on purpose actually.. if you want my opinion :))

@campones
Copy link
Author

@campones campones commented Nov 18, 2019

example for france tv

root@server:~# youtube-dl https://www.france.tv/france-2/direct.html -F
[FranceTVSite] direct: Downloading webpage
[FranceTV] 006194ea-117d-4bcf-94a9-153d999c59ae: Downloading video JSON
[FranceTV] 006194ea-117d-4bcf-94a9-153d999c59ae: Downloading signed hls manifest URL
[FranceTV] 006194ea-117d-4bcf-94a9-153d999c59ae: Downloading m3u8 information
[info] Available formats for 006194ea-117d-4bcf-94a9-153d999c59ae:
format code                          extension  resolution note
hls-audio-aacl-98-Audio_Description  mp4        audio only [qad]
hls-audio-aacl-98-Francais           mp4        audio only [fra]
hls-audio-aacl-98-Version_Originale  mp4        audio only [qaa]
hls-235                              mp4        256x144     235k , avc1.42C01E, 25.0fps, video only
hls-534                              mp4        384x216     534k , avc1.42C01E, 25.0fps, video only
hls-1117                             mp4        640x360    1117k , avc1.42C01E, 25.0fps, video only
hls-1594                             mp4        960x540    1594k , avc1.4D401F, 25.0fps, video only
hls-2866                             mp4        1280x720   2866k , avc1.4D401F, 25.0fps, video only (best)
@campones
Copy link
Author

@campones campones commented Nov 18, 2019

so yea, basically france tv isn't supported anymore for like 6 months for live mode, only vod

@campones
Copy link
Author

@campones campones commented Nov 18, 2019

youtube-dl -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.11.05
[debug] Python version 2.7.15+ (CPython) - Linux-4.15.0-65-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg N-95098-gb9f8ab3, ffprobe N-95098-gb9f8ab3, phantomjs ., rtmpdump 2.4
[debug] Proxy map: {}
Usage: youtube-dl [OPTIONS] URL [URL...]

youtube-dl: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.
root@sd-xxx:~# youtube-dl https://www.france.tv/france-2/direct.html
[FranceTVSite] direct: Downloading webpage
[FranceTV] 006194ea-117d-4bcf-94a9-153d999c59ae: Downloading video JSON
[FranceTV] 006194ea-117d-4bcf-94a9-153d999c59ae: Downloading signed hls manifest URL
[FranceTV] 006194ea-117d-4bcf-94a9-153d999c59ae: Downloading m3u8 information
[download] Destination: France 2 en direct 2019-11-19 02_19-006194ea-117d-4bcf-94a9-153d999c59ae.fhls-2866.mp4
ffmpeg version N-95098-gb9f8ab3 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
  configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-libfdk_aac --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx --enable-libass --enable-libfreetype --extra-libs=-ldl --enable-openssl
  libavutil      56. 35.100 / 56. 35.100
  libavcodec     58. 59.100 / 58. 59.100
  libavformat    58. 33.100 / 58. 33.100
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 59.100 /  7. 59.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[hls @ 0x55f6b94efc40] Skip ('#EXT-X-VERSION:5')
[hls @ 0x55f6b94efc40] Skip ('#EXT-X-INDEPENDENT-SEGMENTS')
[hls @ 0x55f6b94efc40] Skip ('#EXT-X-PROGRAM-DATE-TIME:2019-11-18T17:18:30.398Z')
[hls @ 0x55f6b94efc40] Opening 'https://livefrancetv.akamaized.net/keys/hls.key' for reading
[hls @ 0x55f6b94efc40] Opening 'crypto+https://livefrancetv.akamaized.net/simulcast/France_2/hls/ZXhwPTE1NzQxMTkxNzJ+YWNsPSUyZnNpbXVsY2FzdCUyZkZyYW5jZV8yJTJmaGxzKn5obWFjPTM0YWZmMmYxM2Y2YWU2MTUyMjU2OWVlNTQyMGZkZjc5NTk0YTMyZjg4OTc4NDg3ZDYyMDVhYTIyZTNhODBiMjI=/France_2-video=2600000-15404876.ts' for reading
Input #0, hls, from 'https://livefrancetv.akamaized.net/simulcast/France_2/hls/ZXhwPTE1NzQxMTkxNzJ+YWNsPSUyZnNpbXVsY2FzdCUyZkZyYW5jZV8yJTJmaGxzKn5obWFjPTM0YWZmMmYxM2Y2YWU2MTUyMjU2OWVlNTQyMGZkZjc5NTk0YTMyZjg4OTc4NDg3ZDYyMDVhYTIyZTNhODBiMjI=/France_2-video=2600000.m3u8':
  Duration: N/A, start: 76423.766511, bitrate: N/A
  Program 0
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 0
Output #0, mp4, to 'file:France 2 en direct 2019-11-19 02_19-006194ea-117d-4bcf-94a9-153d999c59ae.fhls-2866.mp4.part':
  Metadata:
    encoder         : Lavf58.33.100
    Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
    Metadata:
      variant_bitrate : 0
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
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.