{"action":"closed","issue":{"url":"https://api.github.com/repos/rg3/youtube-dl/issues/8017","labels_url":"https://api.github.com/repos/rg3/youtube-dl/issues/8017/labels{/name}","comments_url":"https://api.github.com/repos/rg3/youtube-dl/issues/8017/comments","events_url":"https://api.github.com/repos/rg3/youtube-dl/issues/8017/events","html_url":"https://github.com/rg3/youtube-dl/issues/8017","id":123960013,"number":8017,"title":"Question about format selection: DASH video only","user":{"login":"zmwangx","id":4149852,"avatar_url":"https://avatars.githubusercontent.com/u/4149852?v=3","gravatar_id":"","url":"https://api.github.com/users/zmwangx","html_url":"https://github.com/zmwangx","followers_url":"https://api.github.com/users/zmwangx/followers","following_url":"https://api.github.com/users/zmwangx/following{/other_user}","gists_url":"https://api.github.com/users/zmwangx/gists{/gist_id}","starred_url":"https://api.github.com/users/zmwangx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmwangx/subscriptions","organizations_url":"https://api.github.com/users/zmwangx/orgs","repos_url":"https://api.github.com/users/zmwangx/repos","events_url":"https://api.github.com/users/zmwangx/events{/privacy}","received_events_url":"https://api.github.com/users/zmwangx/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-27T04:48:50Z","updated_at":"2015-12-27T05:41:36Z","closed_at":"2015-12-27T05:41:36Z","body":"I was considering a one-stop configuration for downloading YouTube videos for native playback on iOS, which means I need the highest quality H.264+AAC, so I need to select the highest quality `mp4` video (usually DASH) plus the highest quality `m4a` audio. `bestvideo` is no good since it could easily be VP9 in WebM these days. `mp4` also doesn't work in most cases, since 720p non-DASH all-in-one stream is preferred (see example at the bottom).\r\n\r\nCurrently I'm hard coding format codes\r\n\r\n    -f \"((299/138/266/264/137/298/136)+(141/140))/best\"\r\n\r\nwhich works but is certainly not ideal.\r\n\r\nTherefore, my question is: **Is it possible to filter out non-DASH streams?** I glanced at how selectors and especially filters are built in [`YoutubeDl.py`](https://github.com/rg3/youtube-dl/blob/master/youtube_dl/YoutubeDL.py), but there seems to be nothing about DASH. Even filtering out certain format ids doesn't seem to be possible. **If I'm right that this is indeed not possible right now, I'll convert this to a feature request: either add an `id` filter (so that we can possibly write `[id > 22]`), or better yet, a possibly boolean filter specifically for DASH.**\r\n\r\n---\r\n\r\nExample of `mp4` selecting 720p non-DASH (`22`):\r\n\r\n```\r\n> youtube-dl -vF q7o7R5BgWDY\r\n[debug] System config: []\r\n[debug] User config: [u'--format=((315/308/299/303/138/266/313/264/271/137/248/136/247/bestvideo)+(141/251/171/140/bestaudio))/best', u'--output=%(upload_date)s-%(title)s-%(id)s.%(ext)s', u'--write-sub', u'--sub-format=(ass,srt)/best', u'--sub-lang=en,zh-Hans,zh-Hant']\r\n[debug] Command-line args: [u'-vF', u'q7o7R5BgWDY']\r\n[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8\r\n[debug] youtube-dl version 2015.12.23\r\n[debug] Python version 2.7.11 - Darwin-15.2.0-x86_64-i386-64bit\r\n[debug] exe versions: ffmpeg 2.8.4, ffprobe 2.8.4, rtmpdump 2.4\r\n[debug] Proxy map: {}\r\n[youtube] q7o7R5BgWDY: Downloading webpage\r\n[youtube] q7o7R5BgWDY: Downloading video info webpage\r\n[youtube] q7o7R5BgWDY: Extracting video information\r\n[youtube] q7o7R5BgWDY: Downloading DASH manifest\r\n[youtube] q7o7R5BgWDY: Downloading DASH manifest\r\n[info] Available formats for q7o7R5BgWDY:\r\nformat code  extension  resolution note\r\n249          webm       audio only DASH audio   57k , opus @ 50k, 732.68KiB\r\n250          webm       audio only DASH audio   80k , opus @ 70k, 966.71KiB\r\n140          m4a        audio only DASH audio  127k , m4a_dash container, aac  @128k (44100Hz), 1.82MiB\r\n171          webm       audio only DASH audio  132k , vorbis@128k (44100Hz), 1.70MiB\r\n251          webm       audio only DASH audio  163k , opus @160k, 1.87MiB\r\n160          mp4        256x144    DASH video  109k , avc1.42c00c, 12fps, video only, 1.51MiB\r\n278          webm       256x144    DASH video  125k , webm container, vp9, 12fps, video only, 1.37MiB\r\n133          mp4        426x240    DASH video  248k , avc1.4d4015, 24fps, video only, 3.41MiB\r\n242          webm       426x240    DASH video  258k , vp9, 24fps, video only, 2.92MiB\r\n243          webm       640x360    DASH video  490k , vp9, 24fps, video only, 5.39MiB\r\n134          mp4        640x360    DASH video  609k , avc1.4d401e, 24fps, video only, 5.98MiB\r\n244          webm       854x480    DASH video  881k , vp9, 24fps, video only, 9.63MiB\r\n135          mp4        854x480    DASH video 1134k , avc1.4d401e, 24fps, video only, 11.22MiB\r\n247          webm       1280x720   DASH video 1704k , vp9, 24fps, video only, 18.48MiB\r\n136          mp4        1280x720   DASH video 2245k , avc1.4d401f, 24fps, video only, 21.40MiB\r\n248          webm       1920x1080  DASH video 3042k , vp9, 24fps, video only, 32.88MiB\r\n137          mp4        1920x1080  DASH video 4188k , avc1.640028, 24fps, video only, 38.99MiB\r\n17           3gp        176x144    small ,  mp4a.40.2, mp4v.20.3\r\n36           3gp        320x240    small ,  mp4a.40.2, mp4v.20.3\r\n5            flv        400x240    small\r\n43           webm       640x360    medium ,  vorbis, vp8.0\r\n18           mp4        640x360    medium ,  mp4a.40.2, avc1.42001E\r\n22           mp4        1280x720   hd720 ,  mp4a.40.2, avc1.64001F (best)\r\n```\r\n```\r\n> youtube-dl -vf mp4+m4a q7o7R5BgWDY\r\n[debug] System config: []\r\n[debug] User config: [u'--format=((315/308/299/303/138/266/313/264/271/137/248/136/247/bestvideo)+(141/251/171/140/bestaudio))/best', u'--output=%(upload_date)s-%(title)s-%(id)s.%(ext)s', u'--write-sub', u'--sub-format=(ass,srt)/best', u'--sub-lang=en,zh-Hans,zh-Hant']\r\n[debug] Command-line args: [u'-vf', u'mp4+m4a', u'q7o7R5BgWDY']\r\n[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8\r\n[debug] youtube-dl version 2015.12.23\r\n[debug] Python version 2.7.11 - Darwin-15.2.0-x86_64-i386-64bit\r\n[debug] exe versions: ffmpeg 2.8.4, ffprobe 2.8.4, rtmpdump 2.4\r\n[debug] Proxy map: {}\r\n[youtube] q7o7R5BgWDY: Downloading webpage\r\n[youtube] q7o7R5BgWDY: Downloading video info webpage\r\n[youtube] q7o7R5BgWDY: Extracting video information\r\n[youtube] q7o7R5BgWDY: Downloading DASH manifest\r\n[youtube] q7o7R5BgWDY: Downloading DASH manifest\r\n[info] Writing video subtitles to: 20151215-Google - Year In Search 2015-q7o7R5BgWDY.zh-Hans.srt\r\n[info] Writing video subtitles to: 20151215-Google - Year In Search 2015-q7o7R5BgWDY.en.srt\r\n[info] Writing video subtitles to: 20151215-Google - Year In Search 2015-q7o7R5BgWDY.zh-Hant.srt\r\n[debug] Invoking downloader on u'https://r5---sn-o097znek.googlevideo.com/videoplayback?itag=22&signature=BA4BFB0E369C5747E5A7B8606F11C01B45A6AA7B.497201D6EE7951D3B7376DA14BE3CCC24558C55C&ipbits=0&mime=video%2Fmp4&pl=16&dur=120.186&expire=1451212686&sver=3&nh=IgpwcjAxLnBhbzAzKgkxMjcuMC4wLjE&ratebypass=yes&initcwndbps=1927500&id=o-AO0G8nTC7chlNEeDszf76kzV52VabV5V0ncAouK8QepW&upn=K-WSih51ovM&lmt=1450365890973199&ip=73.231.187.11&sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cnh%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&fexp=9408941%2C9415556%2C9416126%2C9417055%2C9419452%2C9419458%2C9420452%2C9421249%2C9422596%2C9422779%2C9423038%2C9423662%2C9423923%2C9423939%2C9424712%2C9425308%2C9425346%2C9425620%2C9426035%2C9426471%2C9426492&mt=1451191014&mv=m&ms=au&source=youtube&key=yt6&requiressl=yes&mm=31&mn=sn-o097znek'\r\n[download] Destination: 20151215-Google - Year In Search 2015-q7o7R5BgWDY.f22.mp4\r\n[download] 100% of 35.53MiB in 00:05\r\n[debug] Invoking downloader on u'https://r5---sn-o097znek.googlevideo.com/videoplayback?id=abba3b4790605836&itag=140&source=youtube&requiressl=yes&mm=31&mn=sn-o097znek&mv=m&ms=au&nh=IgpwcjAxLnBhbzAzKgkxMjcuMC4wLjE&pl=16&ratebypass=yes&mime=audio/mp4&gir=yes&clen=1909551&lmt=1450365955162166&dur=120.186&signature=9211F3F71F613D44FD1AAEAFCF643E9793129B5D.30CF073773CECB3BD57B508113AD4E93E39A8B07&key=dg_yt0&sver=3&mt=1451191014&fexp=9408941,9415556,9416126,9417055,9419452,9419458,9420452,9421249,9422596,9422779,9423038,9423662,9423923,9423939,9424712,9425308,9425346,9425620,9426035,9426471,9426492&upn=bszWGfvPIhk&ip=73.231.187.11&ipbits=0&expire=1451212686&sparams=ip,ipbits,expire,id,itag,source,requiressl,mm,mn,mv,ms,nh,pl,ratebypass,mime,gir,clen,lmt,dur'\r\n[download] Destination: 20151215-Google - Year In Search 2015-q7o7R5BgWDY.f140.m4a\r\n[download] 100% of 1.82MiB in 00:01\r\n[ffmpeg] Merging formats into \"20151215-Google - Year In Search 2015-q7o7R5BgWDY.mp4\"\r\n[debug] ffmpeg command line: ffmpeg -y -i 'file:20151215-Google - Year In Search 2015-q7o7R5BgWDY.f22.mp4' -i 'file:20151215-Google - Year In Search 2015-q7o7R5BgWDY.f140.m4a' -c copy -map 0:v:0 -map 1:a:0 'file:20151215-Google - Year In Search 2015-q7o7R5BgWDY.temp.mp4'\r\nDeleting original file 20151215-Google - Year In Search 2015-q7o7R5BgWDY.f22.mp4 (pass -k to keep)\r\nDeleting original file 20151215-Google - Year In Search 2015-q7o7R5BgWDY.f140.m4a (pass -k to keep)\r\n```"}}