quasarstream / PHP-FFmpeg-video-streaming

📼 Package media content for online streaming(DASH and HLS) using FFmpeg

Home Page:https://www.quasarstream.com/op/php/ffmpeg-streaming?u=php-ff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trascoding problem

Hessu007 opened this issue · comments

HI! i am try test trans-coding *.mp4 to DASH. I am done *.php file what call PHP-FFmpeg-video-streaming process and error message is this:

PHP Fatal error: Uncaught Alchemy\BinaryDriver\Exception\ExecutionFailureException: ffmpeg failed to execute command '/usr/bin/ffmpeg' '-y' '-i' '/var/www/virtualalfa.net/html/media/1.mp4' '-c:v' 'libx264' '-c:a' 'aac' '-bf' '1' '-keyint_min' '25' '-g' '250' '-sc_threshold' '40' '-use_timeline' '1' '-use_template' '1' '-init_seg_name' '1_init_$RepresentationID$.$ext$' '-media_seg_name' '1_chunk_$RepresentationID$_$Number%05d$.$ext$' '-seg_duration' '10' '-hls_playlist' '1' '-f' 'dash' '-adaptation_sets' 'id=0,streams=v id=1,streams=a' '-map' '0' '-s:v:0' '256x144' '-b:v:0' '2602k' '-map' '0' '-s:v:1' '426x240' '-b:v:1' '3035k' '-map' '0' '-s:v:2' '640x360' '-b:v:2' '3642k' '-map' '0' '-s:v:3' '854x480' '-b:v:3' '4553k' '-map' '0' '-s:v:4' '1280x720' '-b:v:4' '6071k' '-map' '0' '-s:v:5' '1920x1080' '-b:v:5' '9107k' '-strict' '-2' '/var/www/virtualalfa.net/html/streamout/1.mpd':

And later these:

[dash @ 0x5636e9b04500] Opening '/var/www/virtualalfa.net/html/streamout/1_init_0.m4s' for writing
[dash @ 0x5636e9b04500] Opening '/var/www/virtualalfa.net/html/streamout/1_init_1.m4s' for writing
[dash @ 0x5636e9b04500] Opening '/var/www/virtualalfa.net/html/streamout/1_init_2.m4s' for writing
[dash @ 0x5636e9b04500] Opening '/var/www/virtualalfa.net/html/streamout/1_init_3.m4s' for writing
[dash @ 0x5636e9b04500] Conflicting stream aspect ratios values in Adaptation Set 1. Please ensure all adaptation sets have the same aspect ratio
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:10 --
[aac @ 0x5636e9b04f40] Qavg: -nan
[aac @ 0x5636e9b04f40] 1 frames left in the queue on closing
[libx264 @ 0x5636e9aeafc0] final ratefactor: 6.15
[aac @ 0x5636e9ad0840] Qavg: -nan
[aac @ 0x5636e9ad0840] 1 frames left in the queue on closing
[libx264 @ 0x5636e9bd0540] final ratefactor: 9.29
[aac @ 0x5636e9ad5740] Qavg: -nan
[aac @ 0x5636e9ad5740] 1 frames left in the queue on closing
[libx264 @ 0x5636e9bb07c0] final ratefactor: 11.27
[aac @ 0x5636e9bb2f00] Qavg: -nan
[aac @ 0x5636e9bb2f00] 1 frames left in the queue on closing
[libx264 @ 0x5636e9b07780] final ratefactor: 11.78
[aac @ 0x5636e9adc440] Qavg: -nan
[aac @ 0x5636e9adc440] 1 frames left in the queue on closing
[libx264 @ 0x5636e9addcc0] final ratefactor: 12.75
[aac @ 0x5636e9be2e00] Qavg: -nan
[libx264 @ 0x5636e9be4840] final ratefactor: 12.78
Conversion failed!
in /var/www/virtualalfa.net/html/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php:95
Stack trace:
#0 /var/www/virtualalfa.net/html/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php(73): Alchemy\BinaryDriver\ProcessRunner->doExecutionFailure()
#1 /var/www/virtualalfa.net/html/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/AbstractBinary.php(207): Alchemy\BinaryDriver\ProcessRunner->run()
#2 /var/www/virtualalfa.net/html/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/AbstractBinary.php(136): Alchemy\BinaryDriver\AbstractBinary->run()
#3 /var/www/virtualalfa.net/html/vendor/aminyazdanpanah/php-ffmpeg-video-streaming/src/Stream.php(128): Alchemy\BinaryDriver\AbstractBinary->command()
#4 /var/www/virtualalfa.net/html/vendor/aminyazdanpanah/php-ffmpeg-video-streaming/src/Stream.php(163): Streaming\Stream->run()
#5 /var/www/virtualalfa.net/html/dash.php(29): Streaming\Stream->save()
#6 {main}
thrown in /var/www/virtualalfa.net/html/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php on line 95

So is any idea what can be problem?

Remove setAdaption() method and let FFMpeg to set this option