duanyao / codecbox.js

video and audio codecs for javascript based on ffmpeg and asm.js
Other
28 stars 12 forks source link

How to control video start time and end time #9

Open JenishaDalin opened 4 years ago

JenishaDalin commented 4 years ago

Hi @duanyao

Is there any possibility to control video properties like video start time or end time from worker js.

duanyao commented 4 years ago

Do you mean seeking in a video? It is not implemented yet.

JenishaDalin commented 4 years ago

Thanks @duanyao , Yes, is there any possibilities to add seek time functionality myself or will it be available in next release?

duanyao commented 4 years ago

It is possible to implement seeking by calling ffmpeg API. e.g. http://dranger.com/ffmpeg/tutorial07.html You need some C/C++ skills.

This is a hobby project and has been out of my radar for a while. If people do need a new release, I'll consider it.

JenishaDalin commented 4 years ago

Hi @duanyao ,

Yes we understand it is hobby project for you. but we need your help to complete this issue so even if you need any requirement from us we will do it and we are ready to pay for your time.

duanyao commented 4 years ago

So I will try to implement seeking this weekend.

duanyao commented 4 years ago

I found a similar project and it does support seeking:

https://github.com/sonysuqin/WasmVideoPlayer/ https://roblin.cn/wasm/

Is it enough for you?

JenishaDalin commented 4 years ago

Hi @duanyao ,

Happy New year!!

Thanks for your reference.We will try to implement your reference. meanwhile, We built the codec-box successfully but I just have beginner level experience in c++.so if in case you have time kindly implement the start and end time option like trim.This is enough for our project requirement.

JenishaDalin commented 4 years ago

Hi @duanyao ,

The reference which you give above link for decode the video is not suitable for our project.

Reason

  1. They support the h265 also called (High Efficient Video Coding) type of video to decode.

  2. Other types of video format is not supported in that.

    If it is possible try to complete this issue within this weekend .

    Is it Possible to contact you directy ?

duanyao commented 4 years ago

It is relatively easy to add support of other video formats (what formats do you need to support?). Just edit this file: https://github.com/sonysuqin/WasmVideoPlayer/blob/master/build_decoder.sh

--enable-decoder=hevc --enable-decoder=h264 --enable-decoder=aac # decoders
--enable-demuxer=mov # container formats. mov=.mov, .mp4, .3gp

I could start to implement seeking this weekend, but can't promise completion.

JenishaDalin commented 4 years ago

Hi @duanyao,

I had cloned the github repo which you have mentioned above and build without error. Then am running the demo in my local machine but the demo didn't working.

After I tried the above compilation with --enable-demuxer=mov,mp4 and decoder --enable-decoder=h264 (https://github.com/sonysuqin/WasmVideoPlayer/blob/master/build_decoder.sh)

The build was completed without error. But the demo is not working and also the github demo url which you have mentioned above (https://github.com/duanyao/codecbox.js/issues/9#issuecomment-569915086) not working

This one is not suitable for our project. So i will wait for your compilation.

JenishaDalin commented 4 years ago

Hi @duanyao

Sorry for troubling,

Is there any possibility to contact you personally?

duanyao commented 4 years ago

My time budget on this project is limited. If you are looking for good tech support, I'd suggest you contact the author of https://github.com/sonysuqin/WasmVideoPlayer/ . I don't known this guy, but most Chinese programmers can speak English, so don't worry.

JenishaDalin commented 4 years ago

Hi, @duanyao,

Okay, thank you for spending your valuable time. Your coordination with me in past few days was very useful.

JenishaDalin commented 4 years ago

Hi @duanyao ,

I have tried to implement seek functionalities in codecbxodecoder.cpp file but i can't implement yet. Kindly guide me where do implement seek method called av_seek_frame.