Skip to content

Instantly share code, notes, and snippets.

@heyalexej
Created February 24, 2025 14:02
Show Gist options
  • Save heyalexej/9312530ae54870e7041f0c87f5aaf465 to your computer and use it in GitHub Desktop.
Save heyalexej/9312530ae54870e7041f0c87f5aaf465 to your computer and use it in GitHub Desktop.
eBay Video Download using yt-dlp

eBay Video Download using yt-dlp

eBay uses Shaka Player. In the network request tab look for playlist.mpd (example: https://video.ebaycdn.net/videos/v1/3bf030c01940a60dda114d36ffffc522/playlist.mpd)

<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediaPresentationDuration="PT30.062S" minBufferTime="PT6S">
<ProgramInformation/>
<Period id="0" start="PT0S">
<AdaptationSet id="0" contentType="video" segmentAlignment="true" bitstreamSwitching="true" lang="und">
<Representation id="0" mimeType="video/mp4" codecs="avc1.64001e" bandwidth="2400000" width="1280" height="605" frameRate="81180000/2705609">
<SegmentList timescale="1000000" duration="3000000" startNumber="1">
<Initialization sourceURL="5/video_720p-0.m4s"/>
<SegmentURL media="5/video_720p-1.m4s"/>
<SegmentURL media="5/video_720p-2.m4s"/>
<SegmentURL media="5/video_720p-3.m4s"/>
<SegmentURL media="5/video_720p-4.m4s"/>
<SegmentURL media="5/video_720p-5.m4s"/>
<SegmentURL media="5/video_720p-6.m4s"/>
<SegmentURL media="5/video_720p-7.m4s"/>
<SegmentURL media="5/video_720p-8.m4s"/>
<SegmentURL media="5/video_720p-9.m4s"/>
<SegmentURL media="5/video_720p-10.m4s"/>
<SegmentURL media="5/video_720p-11.m4s"/>
</SegmentList>
</Representation>
<Representation id="1" mimeType="video/mp4" codecs="avc1.4d401e" bandwidth="1200000" width="854" height="404" frameRate="81180000/2705609">
<SegmentList timescale="1000000" duration="3000000" startNumber="1">
<Initialization sourceURL="4/video_480p-0.m4s"/>
<SegmentURL media="4/video_480p-1.m4s"/>
<SegmentURL media="4/video_480p-2.m4s"/>
<SegmentURL media="4/video_480p-3.m4s"/>
<SegmentURL media="4/video_480p-4.m4s"/>
<SegmentURL media="4/video_480p-5.m4s"/>
<SegmentURL media="4/video_480p-6.m4s"/>
<SegmentURL media="4/video_480p-7.m4s"/>
<SegmentURL media="4/video_480p-8.m4s"/>
<SegmentURL media="4/video_480p-9.m4s"/>
<SegmentURL media="4/video_480p-10.m4s"/>
<SegmentURL media="4/video_480p-11.m4s"/>
</SegmentList>
</Representation>
<Representation id="2" mimeType="video/mp4" codecs="avc1.42c01e" bandwidth="800000" width="640" height="303" frameRate="81180000/2705609">
<SegmentList timescale="1000000" duration="3000000" startNumber="1">
<Initialization sourceURL="3/video_360p-0.m4s"/>
<SegmentURL media="3/video_360p-1.m4s"/>
<SegmentURL media="3/video_360p-2.m4s"/>
<SegmentURL media="3/video_360p-3.m4s"/>
<SegmentURL media="3/video_360p-4.m4s"/>
<SegmentURL media="3/video_360p-5.m4s"/>
<SegmentURL media="3/video_360p-6.m4s"/>
<SegmentURL media="3/video_360p-7.m4s"/>
<SegmentURL media="3/video_360p-8.m4s"/>
<SegmentURL media="3/video_360p-9.m4s"/>
<SegmentURL media="3/video_360p-10.m4s"/>
<SegmentURL media="3/video_360p-11.m4s"/>
</SegmentList>
</Representation>
<Representation id="3" mimeType="video/mp4" codecs="avc1.42c01e" bandwidth="400000" width="426" height="202" frameRate="81180000/2705609">
<SegmentList timescale="1000000" duration="3000000" startNumber="1">
<Initialization sourceURL="2/video_240p-0.m4s"/>
<SegmentURL media="2/video_240p-1.m4s"/>
<SegmentURL media="2/video_240p-2.m4s"/>
<SegmentURL media="2/video_240p-3.m4s"/>
<SegmentURL media="2/video_240p-4.m4s"/>
<SegmentURL media="2/video_240p-5.m4s"/>
<SegmentURL media="2/video_240p-6.m4s"/>
<SegmentURL media="2/video_240p-7.m4s"/>
<SegmentURL media="2/video_240p-8.m4s"/>
<SegmentURL media="2/video_240p-9.m4s"/>
<SegmentURL media="2/video_240p-10.m4s"/>
<SegmentURL media="2/video_240p-11.m4s"/>
</SegmentList>
</Representation>
</AdaptationSet>
<AdaptationSet id="1" contentType="audio" segmentAlignment="true" bitstreamSwitching="true" lang="und">
<Representation id="4" mimeType="audio/mp4" codecs="mp4a.40.2" bandwidth="128000" audioSamplingRate="48000">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<SegmentList timescale="1000000" duration="3000000" startNumber="1">
<Initialization sourceURL="8/audio_128kb-0.m4s"/>
<SegmentURL media="8/audio_128kb-1.m4s"/>
<SegmentURL media="8/audio_128kb-2.m4s"/>
<SegmentURL media="8/audio_128kb-3.m4s"/>
<SegmentURL media="8/audio_128kb-4.m4s"/>
<SegmentURL media="8/audio_128kb-5.m4s"/>
<SegmentURL media="8/audio_128kb-6.m4s"/>
<SegmentURL media="8/audio_128kb-7.m4s"/>
<SegmentURL media="8/audio_128kb-8.m4s"/>
<SegmentURL media="8/audio_128kb-9.m4s"/>
<SegmentURL media="8/audio_128kb-10.m4s"/>
</SegmentList>
</Representation>
</AdaptationSet>
</Period>
</MPD>

Now we can list formats:

$ yt-dlp --list-formats "https://video.ebaycdn.net/videos/v1/3bf030c01940a60dda114d36ffffc522/playlist.mpd"
[generic] Extracting URL: https://video.ebaycdn.net/videos/v1/3bf030c01940a60dda114d36ffffc522/playlist.mpd
[generic] playlist: Downloading webpage
WARNING: [generic] Falling back on generic information extractor
[generic] playlist: Extracting information
[info] Available formats for playlist:
ID EXT RESOLUTION │   TBR PROTO │ VCODEC        VBR ACODEC      ABR ASR MORE INFO
────────────────────────────────────────────────────────────────────────────────────────────
4  m4a audio only │  128k dash  │ audio only        mp4a.40.2  128k 48k DASH audio, m4a_dash
3  mp4 426x202    │  400k dash  │ avc1.42c01e  400k video only          DASH video, mp4_dash
2  mp4 640x303    │  800k dash  │ avc1.42c01e  800k video only          DASH video, mp4_dash
1  mp4 854x404    │ 1200k dash  │ avc1.4d401e 1200k video only          DASH video, mp4_dash
0  mp4 1280x605   │ 2400k dash  │ avc1.64001e 2400k video only          DASH video, mp4_dash

and combine video + audio source based on ID like so:

$ yt-dlp -f "0+4" "https://video.ebaycdn.net/videos/v1/3bf030c01940a60dda114d36ffffc522/playlist.mpd" -o output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment