sannies / mp4parser

A Java API to read, write and create MP4 files
Apache License 2.0
2.76k stars 567 forks source link

how can clips video online? #117

Closed chentengming closed 8 years ago

sannies commented 8 years ago

I don't understand your question und I don't believe it has anything to do with the mp4parser.

chentengming commented 8 years ago

Thank you reply to me, is that I want to achieve is that the client load the network video can then be cropped, and the cropped video download

sannies commented 8 years ago

I still don't get it. What do you mean by "crop"? Do you want to shorten a video (crop on time axis)? Or do you want to only show parts of the video (crop on x/y axis)? What is the process? Describe it! Example:

  1. A user recorded a video
  2. the user crops the video
  3. the user uploads the video

and which problem do you want to solve with the mp4parser? The cropping? What has that to do with your initial request "how can clips video online?"?

Try to pose a question in a way someone else has the chance to understand it without having additional information.

Best Regards, Sebastian

2015-10-16 11:51 GMT+02:00 chentengming notifications@github.com:

Thank you reply to me, is that I want to achieve is that the client load the network video can then be cropped, and the cropped video download

— Reply to this email directly or view it on GitHub https://github.com/sannies/mp4parser/issues/117#issuecomment-148670502.

chentengming commented 8 years ago

sorry, I may not have a clear description of the question, mp4parser only in the local video clips, if you need the client side of the video clip in the service, how to do. I know a little difficult to implement, but useful

sannies commented 8 years ago

I'm terribly sorry but I don't understand you. Would you perhaps ask someone to translate for you?

Just one thing: The mp4parser cannot crop videos (x/y-axis). It can only cut video (time-axis).

2015-10-16 12:18 GMT+02:00 chentengming notifications@github.com:

sorry, I may not have a clear description of the question, mp4parser only in the local video clips, if you need the client side of the video clip in the service, how to do. I know a little difficult to implement, but useful

— Reply to this email directly or view it on GitHub https://github.com/sannies/mp4parser/issues/117#issuecomment-148676052.

chentengming commented 8 years ago

We have some videos on line like below URL.We want cut some seconds video from this URL.To save time and network resource,Can Mp4parser shorten the video from url and download the extract part of what we want?

http://netdisk.foream.com:80/netdisk/iface/downloadOpen?fileId=159644&isDownload=flase&quality=0

flieks commented 8 years ago

@chentengming you cannot expect mp4parser to run on android and be able to download only a part of an online video via cropping. mp4Parser will have to download the whole video.

I just tried with a url in MovieCreator.build("http://somurl/audio.m4a"); but it doesn't work (file not found) so we have to download and store the file locally first and then "Build" the movie

sannies commented 8 years ago

Well you could work with range requests. It's not working out of the box but you could:

(1) Look at the beginning of the file and search for moov box (2) read complete moov box, extract appropriate offsets and only download the data you really need.

MovieCreator does only work if you have random access on the datasource - so it only works for files. The approach I described would require to read parts of the file with the more 'low-level' API that deals with boxes.

2015-12-02 0:14 GMT+01:00 De Lille Felix notifications@github.com:

@chentengming https://github.com/chentengming you cannot expect mp4parser to run on android and be able to download only a part of an online video via cropping. mp4Parser will have to download the whole video.

I just tried with a url in MovieCreator.build("http://somurl/audio.m4a"); but it doesn't work (file not found)

— Reply to this email directly or view it on GitHub https://github.com/sannies/mp4parser/issues/117#issuecomment-161127623.

mateusgrb commented 8 years ago

Hi @sannies , can I implement this approach you described with mp4parser? I'm very interested in cutting a video file accessible by a URL without having to download it entirely. Just in case you have any tips for this scenario, the video would be in a DLNA server, in the same network of my android device, which would be the client.

mateusgrb commented 8 years ago

Hey @chentengming, were you able to download only part of the video?