File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed
Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change 11var test = require ( 'tape' )
22var HLSServer = require ( './../src/index' )
33var http = require ( 'http' )
4- var ffmpeg = require ( 'fluent-ffmpeg' )
54var httpAttach = require ( 'http-attach' )
65var request = require ( 'request' )
76
87var PORT = 8000
98var hls
109
11- var ffmpegHLS = function ( inputPath , outputPath , cb ) {
12- return ffmpeg ( inputPath , { timeout : 432000 } ) . addOptions ( [
13- '-profile:v baseline' ,
14- '-level 3.0' ,
15- '-s 640x360' ,
16- '-start_number 0' ,
17- '-hls_time 10' ,
18- '-hls_list_size 0' ,
19- '-f hls'
20- ] ) . output ( outputPath ) . on ( 'end' , cb ) . run ( )
21- }
22-
23- test ( 'ffmpeg' , function ( t ) {
24- t . plan ( 2 )
25-
26- ffmpegHLS ( 'test/files/out.mp4' , 'test/files/output/out.m3u8' , function ( ) {
27- t . pass ( 'mp4 done' )
28- } )
29- ffmpegHLS ( 'test/files/out2.webm' , 'test/files/output/out2.m3u8' , function ( ) {
30- t . pass ( 'webm done' )
31- } )
32- } )
33-
3410test ( 'constructor without http server' , function ( t ) {
3511 t . plan ( 1 )
3612
You can’t perform that action at this time.
0 commit comments