14

I have downloaded the MPDs "http://dash.edgesuite.net/adobe/hdworld_dash/HDWorld.mpd" and all related .m4s files. I tried running it on VLC player. But the format is not recognized by VLC player.

I have downloaded this media segment using wget (1 to 14 segments are available) http://dash.edgesuite.net/adobe/hdworld_dash/hdworld_seg_hdworld_0696kbps_ffmpeg.mp4.video_temp2.m4s.

Can anybody tell me solution how to run .m4s format file on player?

System: Ubuntu 11.10

Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
mojkaro1988
  • 203
  • 1
  • 2
  • 8

4 Answers4

39

You need the initialization segment. It is often named "00" or "init" or doesn't have a sequence number like the other files, and often ends in ".mp4" rather than ".m4s". Then you just concatenate the files together. You can start anywhere in the sequence so long as you begin with the initialization segment.

For example

cat init.mp4 *.m4s > output.mp4

Then you have a playable mp4 file with content, assuming there is no encryption (DRM) applied to it.

T Percival
  • 8,526
  • 3
  • 43
  • 43
  • Similar problem here http://askubuntu.com/q/803234/25388 but did not work with .m4s. How can you get the initialisation segment? Can you post one? – Léo Léopold Hertz 준영 Jul 26 '16 at 18:24
  • I did what you suggest with cp command and cat all files all along the init one. But I'm experiencing two different behaviours: if I play the "output.mp4" with vlc, it is lagging and it doesn't skip frames correctly (i.e. if I play from beginning and then skip to half of the video, I get the next frame from the last one saw, and not the "central frame", the one I'm expecting... simply put, video continues as my skip never happened)... But, if I play it on web browser (say Chrome) it's working correctly, skipping works again, and is smooth as the original video saw on the web. Why? – pippo Feb 11 '18 at 09:01
  • I tried also quicktime, but no different results ... I have vlc 3.0.0 and I noticed that if I convert the mp4 file to ".ts" format it's not lagging anymore (using vlc or quicktime), instead mp4 original one does. Maybe some bugs in reading coding info or something like that? I can't explain why chrome plays well mp4 video file – pippo Feb 11 '18 at 10:14
  • what the windows equivalent of `cat init.mp4 *.m4s > output.mp4` ? – ilw Jun 04 '21 at 08:09
5

.m4s file format is ISO Base Media File. i.e. MPEG-4 Part 14. read specs for more info you may get m4s player for windows. As far as I know on Linux platform GPAC will help. You can create your own MPD from any media source using MP4Box a GPAC tool.

You can use MP4Client for playing your DASHed Media from MPD. Actually .m4s's separate segment is not able to play by its own bcoz player should know Codec and mime type to play any media and m4s is not supported by any player, i.e. it has its own header and data (moof & mdat).

For playing MPD which contains many m4s segment (you can make your own MPD or download each audio and video segment separately from any MPD & put it in to a same folder):

  1. install GPAC.
  2. $MP4Client MYWorld.mpd will open Osmo4 player and you can see your video is playing. Enjoy..

FYI, local streaming server can also play this video:

$MP4Client http://localhost/MYWorld.mpd

if not working change segmentAlignment flag, i.e. <AdaptationSet segmentAlignment="true" subsegmentAlignment="true">.

K Z
  • 29,661
  • 8
  • 73
  • 78
mojkaro1988
  • 203
  • 1
  • 2
  • 8
1

you can play it using GPAC player, installing it with all the third party codecs also - http://gpac.wp.mines-telecom.fr/player/

some ppl claim that they are able use vlc, i have not tested it.

rajneesh
  • 1,709
  • 1
  • 13
  • 13
  • @rajneesh..it is not playing .m4s format, I seen both .mp4 file and .m4s in HexEditor. .mp4 file starts with "ftypmp42" but .m4s file starts with "stypmsdh".. – mojkaro1988 Dec 05 '12 at 09:59
-1

Try this in the OSX terminal:

open -a Osmo4 example.mpd

It works for me.

meskobalazs
  • 15,741
  • 2
  • 40
  • 63