phoboslab / jsmpeg

MPEG1 Video Decoder in JavaScript
MIT License
6.35k stars 1.43k forks source link

mepg1video and mp2 audio support brings lots of work/difficulty to backend streaming service, possible to support any more current codec ? #201

Closed c1ngular closed 6 years ago

c1ngular commented 6 years ago

first of all ,wonderful project , working good even on mobile browsers !

i have several RTMP streams with h264/aac/mp3 codec, http-flv and hls service enabled , for better control of the video player's UI and lower latency , i am trying jsmpeg to play my streams on mobile browsers, user could switch between different streams from browser, but it brings lots work to my backend service .

i found no many tools/libraries to help me convert h264/aac/mp3 into mepg1video and mp2 these days, ffmpeg seems the only option ? in order to convert these streams i have to run same amount of ffmpeg processes at same time , it is exhausting my server , and bring some engineering challenges to my knowledge level .

it would be great if i could found some light-weight tools/libs to do the conversion , so i could use it in my code to feed the converted result directly to websocket conncetions without starting ffmpeg processes and piping the results , do you happen to know any ?

or is it doable to support any "modern" codec ? if i am understanding correctly , mpeg1/mp2 would cost more bandwidth for same video quality compare the modern ones ? my streams will be mainly played from mobile browsers , so i concern about this as well !

i am using https://github.com/runner365/livego as my streaming server , it is working pretty good ! i have zero knowledge of video/audio encoding/decoding, so i don't have any idea if i am doing anything sensible or not, any advise would be really appreciated !

THANK YOU !

hexray-newbee commented 6 years ago

i found no many tools/libraries to help me convert h264/aac/mp3 into mepg1video and mp2 these days, ffmpeg seems the only option ?

maybe, you can have a look at GStreamer