True's beaked whale.jpg

Western spotted skunk

Hooded skunk

Yellow-throated Marten

Wolverine

Downloading a video from an ebay listing

Using Firefox, go to the item page, open the Firefox Web Developer Tools (Menu -> More tools -> Web Developer Tools). Click on the Network tab in the Tools section, then on the web page click on the video and play it.

In the Network tab, requests for audio_128kb-0.m4s to audio_128kb-16.m4s appeared, and video_720p-0.m4s to video_720p-16.m4s. I copied the URL for the video and audio requests (all the same but with a different -0 to -16 segment), and used wget to download the files. Each was 1-2 MB:

wget https://video.ebaycdn.net/videos/v1/8f1e79501860a64d9e245434ffffec91/5/video_720p-0.m4s

After 32 wget commands, the entire video was present. I downloaded segments from 0 up until after number 16, I got a ‘not found’ message letting me know I had the last segment.

Then I concatenated the pieces together:

cat video_720p-0.m4s >> video_720p.m4s
cat video_720p-1.m4s >> video_720p.m4s
...
cat video_720p-16.m4s >> video_720p.m4s

And the same for the audio segments. I put the cat commands into a batch file “cat.txt” and ran them using “bash cat.txt”.
Then ffmpeg was used to combine them and convert to mp4 format:

ffmpeg -i video_720p.m4s -i audio_128kb.m4s -c copy ebay_720p.mp4

One Response to “Downloading a video from an ebay listing”

  1. amy h Says:

    Thank you for the write-up, this allowed me to save a couple of interesting videos from ebay listings.
    A more efficient way to get the m4s segments is to use the Developer Tools > Network tab, but filter for “Media” and watch the video to list all the different segments, then do ‘Save all as HAR’.
    Then you can use harextract.html to make them into a zip file, rename the zip file with a meaningful name and extract that to get the segments.

    For concatenating the resulting segments and I’m mostly using Windows at the moment, I’ve found that HxD’s concatenate functionality was able to put the files together in place of the ‘cat’ command.
    Then your ffmpeg example works great for putting the audio and video files together.

Leave a Reply