-2

I am trying to split one audio.mp4 into multiple chunks(each of 10 seconds) with file format of .m4s or .mpd and one init.mp4 .

1>I have successfully made chunks of 10 secs with one m3u8 file by this command-

ffmpeg -i song.mp3 -c:a aac -b:a 64k -vn -hls_time 10 -hls_list_size 0 abc.m3u8

2>Tried this command also

MP4Box -dash 10000 -frag 1000 -rap -segment-name myDash -subsegs-per-sidx 5 -url-template test.mp4

But not able to make .m4s chunks with one init.mp4.

szatmary
  • 27,213
  • 7
  • 39
  • 54
Xwin
  • 53
  • 1
  • 13
  • Use ffmpeg or mp4box – szatmary Nov 26 '18 at 14:04
  • @szatmary Thanks for your comment, I know that but can't find the proper command to do that. could you please help to write a proper command to do so. – Xwin Nov 26 '18 at 14:12
  • Please include everything you have tried in the question. Having people sequester think you have already tried wastes every bodies time. Segmenting (dash) a file using mp4box is documented on the gpac website. – szatmary Nov 26 '18 at 14:16
  • @szatmary 1)ffmpeg -i song.mp3 -c:a aac -b:a 64k -vn -hls_time 10 -hls_list_size 0 abc.m3u8 -by this I can make chunks but not m4s and this also 2) MP4Box -dash 10000 -frag 1000 -rap -segment-name myDash -subsegs-per-sidx 5 -url-template test.mp4 – Xwin Nov 26 '18 at 14:28
  • Pleas edit the question to include any new information. Don’t post it in the comments. – szatmary Nov 26 '18 at 14:32
  • Please do not use the comment section for conversations, stack overflow can reorder them. – szatmary Nov 26 '18 at 14:39
  • @szatmary can't convert a mp4 to m4s also...Tried this command-ffmpeg -i input.mov -c:v copy output.m4s. – Xwin Nov 27 '18 at 08:50
  • You don’t need to convert. You can just rename them. – szatmary Nov 27 '18 at 14:36

1 Answers1

0

Now,I can make .m4s segments and one init.mp4 by using below command.

    MP4Box -dash 10000 -out video.mpd -dash-profile live -segment-name mv_ -rap video.mp4

REFERENCE: Calculate .m4s segment file suffix in HTML5 video streaming when user seeks to another time

Xwin
  • 53
  • 1
  • 13