mbebenita / Broadway

A JavaScript H.264 decoder.
Other
2.73k stars 424 forks source link

broadway html cannot play the video that encoded by ffmpeg #158

Closed baozeyanggithub closed 6 years ago

baozeyanggithub commented 7 years ago

I use the order which is ffmpeg -y -i /dev/video0 -r 30000/1001 -b:a 2M -bt 4M -vcodec libx264 -pass 1 -coder 0 -bf 0 -flags -loop -wpredp 0 -an targetFile.mp4 ,and then use storyDemo.html to play targetFile.mp4, and the result is the html cannot play the video. so i want to ask for some suggestion,please help me. thank you very mush .

soliton4 commented 7 years ago

try passing

-profile:v baseline

as well

baozeyanggithub commented 7 years ago

can you write the detailed commend? I use ./ffmpeg -i /dev/video0 -r 30000/1001 -vcodec libx264 -pass 1 -coder 0 -bf 0 -flags -loop -wpredp 0 -an output.mp4 -profile:v baseline, but storyDemo.html cannot play mp4 file, the ffmpeg i use is ffmpeg-3.3.3. thank you very much!

soliton4 commented 6 years ago

https://github.com/soliton4/BroadwayStream uses ffmpeg to encode any sort of video for broadway. you can copy the command fromt here