0

Is it possible to create new mp4 file(which will be just one small video segment of full length mp4 file) from mp4 http stream without downloading the whole mp4 file to disk and feeding it to mp4Parser. If any other stable java library exist which could do the sam job please point me to it.

I know it can be done with ffmpeg as explained in this post but i want to avoid using full feature heavy library(cutting the mp4 file doesn't involve transcoding the video, this operation just repacks the mp4 file) for just cutting the mp4 file.

ffmpeg -ss 00:01:00.000 -i "http://myfile.mp4" -t 00:02:00.000 -c:a copy -c:v copy output.mp4

Community
  • 1
  • 1
xyman
  • 399
  • 3
  • 10

1 Answers1

1

Try to encode new video on the fly by using MediaExtractor, MediaCodec, MediaMuxer classes. See Google's app grafika for more samples.

danik
  • 796
  • 9
  • 17