Menu

Technical Support

Home / Technology

Download TS Video from the Web

Testing
  • Open Firefox / chrome
  • open page the video
  • Play Video
  • click F12 on keyboard -> network
  • in Filter URLs ts
  • copy link of ts
  • remove index and ts extension from link

for example:

http://vid.com/vod/mp4:vod/PRV/Yg0WGN_6.mp4/media_b180000_454.ts

will be copied as

 http://vid.com/vod/mp4:vod/PRV/Yg0WGN_6.mp4/media_b180000

insert in below script under LINK

#!/bin/bash

 

# insert here urls

LINK=(

 

'http://vid.com/vod/mp4:vod/PRV/Yg0WGN_6.mp4/media_b180000' # replace this with your url

 

)

 

mkdir my-videos

cd mkdir my-videos

 

CNT=0

 

for URL in ${LINK[@]}

do

  # create folder for streaming media

  CNT=$((CNT + 1))

  mkdir $CNT

  cd $CNT

 

  (

 

   DIR="${URL##*/}"

 

   # download all videos

   wget $URL'_'{0..1200}.ts

 

   # link videos

   echo $DIR'_'{0..1200}.ts | tr " " "\n" > tslist

   while read line; do cat $line >> $CNT.mp4; done < tslist

 

   rm -rf media* tslist

   ) &

   cd ..

 

done

 

wait

Alternatively,

Stream Video Dowloader extension allows to download m3u8 streams seamlessly. Install and press play on video it will identify the stream.

Addition to @aalhanane and @Micheal Espinola Jr

As m3u8x is only available for windows. Once you have identified the m3u8 url you can also use Jdownloader2 or VLC Media Player to download and concatenate the stream.

Jdownloader2: Just copy the m3u8 url when it the Jdownloader is open. It will recognize the stream in Linkgrabber tab.

VLC 3:

Open Network -> Paste m3u8 url -> Checkmark Streamoutput -> Select Settings. Choose output file, container , video and audio encoding. (e.g output.mp4, container: mpeg4, video: h264, audio: mp4a) Start Stream. It will not play the video, but encode it, showing the encoding progress by moving the video play back progress bar.

Using the Video DownloadHelper Firefox extension and it's Companion App. It allowed to download both m3u8 playlists with TS chunks lists and actual video and audio streams into mp4 files via a click of button while correctly preserving authentication headers.

The resulting separate video and audio files can be merged with ffmpeg:

ffmpeg -i video.mp4 -i audio.mp4 -acodec copy -vcodec copy video-and-audio.mp4

or with mp4box:

mp4box -add audio.mp4#audio video.mp4 -out video-and-audio.mp4

 

source: https://stackoverflow.com/questions/22188332/download-ts-files-from-video-stream

 

Share

project title

Creative & Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliter enim nosmet ipsos nosse non possumus. Inscite autem medicinae et gubernationis ultimum cum ultimo sapientiae comparatur. Tecum optime, deinde etiam cum mediocri amico. Et nemo nimium beatus est; Ac ne plura complectar-sunt enim innumerabilia-, bene laudata virtus voluptatis aditus ultimum cum ultimo sapientiae Et nemo nimium beatus est

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliter enim nosmet ipsos nosse non possumus. Inscite autem medicinae et gubernationis ultimum cum ultimo sapientiae comparatur. Tecum optime, deinde etiam cum mediocri amico. Et nemo nimium beatus est; Ac ne plura complectar-sunt enim innumerabilia

Share