WWBN / AVideo-Encoder

Encoder Server for AVideo Platform Open-Source
https://platform.avideo.com
GNU Affero General Public License v3.0
151 stars 188 forks source link

Video not playing on streamer site after encoding #440

Open nikstream opened 2 years ago

nikstream commented 2 years ago

Hi Daniel,

After update of encoder can not play videos in streamer site
i am getting this error in encoder log

[18-Jun-2022 08:54:13 Europe/Berlin] AVideo-Encoder Format::exec Start Encoder [ffmpeg -i /var/www/html/AVideo/Encoder/videos/33_tmpFile.mp4 -max_muxing_queue_size 9999 -c:v h264 -vf scale=-2:360 -r 24 -g 48 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -minrate 300k -crf 23 -maxrate 900k -bufsize 1200k -c:a aac -b:a 128k -f hls -hls_time 6 -hls_list_size 0 -hls_key_info_file /var/www/html/AVideo/Encoder/videos/avideoTmpFile_33_streamers_id1/keyinfo /var/www/html/AVideo/Encoder/videos/avideoTmpFile_33_streamers_id1/res360/index.m3u8 -c:v h264 -vf scale=-2:480 -r 24 -g 48 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -minrate 500k -crf 23 -maxrate 1500k -bufsize 2000k -c:a aac -b:a 128k -f hls -hls_time 6 -hls_list_size 0 -hls_key_info_file /var/www/html/AVideo/Encoder/videos/avideoTmpFile_33_streamers_id1/keyinfo /var/www/html/AVideo/Encoder/videos/avideoTmpFile_33_streamers_id1/res480/index.m3u8 -c:v h264 -vf scale=-2:720 -r 24 -g 48 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -minrate 1000k -crf 23 -maxrate 3000k -bufsize 4000k -c:a aac -b:a 192k -f hls -hls_time 6 -hls_list_size 0 -hls_key_info_file /var/www/html/AVideo/Encoder/videos/avideoTmpFile_33_streamers_id1/keyinfo /var/www/html/AVideo/Encoder/videos/avideoTmpFile_33_streamers_id1/res720/index.m3u8 -c:v h264 -vf scale=-2:1080 -r 24 -g 48 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -minrate 2000k -crf 23 -maxrate 6000k -bufsize 8000k -c:a aac -b:a 192k -f hls -hls_time 6 -hls_list_size 0 -hls_key_info_file /var/www/html/AVideo/Encoder/videos/avideoTmpFile_33_streamers_id1/keyinfo /var/www/html/AVideo/Encoder/videos/avideoTmpFile_33_streamers_id1/res1080/index.m3u8 -c:v h264 -vf scale=-2:2160 -r 24 -g 48 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -minrate 2000k -crf 23 -maxrate 6000k -bufsize 8000k -c:a aac -b:a 192k -f hls -hls_time 6 -hls_list_size 0 -hls_key_info_file /var/www/html/AVideo/Encoder/videos/avideoTmpFile_33_streamers_id1/keyinfo /var/www/html/AVideo/Encoder/videos/avideoTmpFile_33_streamers_id1/res2160/index.m3u8] [18-Jun-2022 08:54:24 Europe/Berlin] progressFileHasVideosWithErrors: we could not detect files on the progress log, we will ignore errors ffmpeg version N-106738-g3946cb02fc-patrickz Copyright (c) 2000-2022 the FFmpeg developers built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) configuration: --enable-libwebp --disable-shared --enable-static --enable-pthreads --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-filters --enable-openssl --enable-runtime-cpudetect --extra-version=patrickz libavutil 57. 24.101 / 57. 24.101 libavcodec 59. 27.100 / 59. 27.100 libavformat 59. 23.100 / 59. 23.100 libavdevice 59. 6.100 / 59. 6.100 libavfilter 8. 37.100 / 8. 37.100 libswscale 6. 6.100 / 6. 6.100 libswresample 4. 6.100 / 4. 6.100 libpostproc 56. 5.100 / 56. 5.100 [av1 @ 0x56001460fac0] Your platform doesn't suppport hardware accelerated AV1 decoding. [av1 @ 0x56001460fac0] Failed to get pixel format. [av1 @ 0x56001460fac0] Missing Sequence Header. Last message repeated 262 times [av1 @ 0x56001460fac0] Your platform doesn't suppport hardware accelerated AV1 decoding. [av1 @ 0x56001460fac0] Failed to get pixel format. [av1 @ 0x56001460fac0] Missing Sequence Header. Last message repeated 35 times [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56001460e5c0] decoding for stream 0 failed [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56001460e5c0] Could not find codec parameters for stream 0 (Video: av1 (Main) (av01 / 0x31307661), none(tv, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 10798 kb/s): unspecified pixel format Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/html/AVideo/Encoder/videos/33_tmpFile.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomav01iso2mp41 encoder : Lavf59.23.100 Duration: 00:00:49.60, start: 0.000000, bitrate: 10925 kb/s Stream #0:00x1: Video: av1 (Main) (av01 / 0x31307661), none(tv, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 10798 kb/s, 60 fps, 60 tbr, 15360 tbn (default) Metadata: handler_name : ISO Media file produced by Google Inc. vendor_id : [0][0][0][0] Stream #0:10x2: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default) Metadata: handler_name : ISO Media file produced by Google Inc. vendor_id : [0][0][0][0] Stream mapping: Stream #0:0 -> #0:0 (av1 (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Stream #0:0 -> #1:0 (av1 (native) -> h264 (libx264)) Stream #0:1 -> #1:1 (aac (native) -> aac (native)) Stream #0:0 -> #2:0 (av1 (native) -> h264 (libx264)) Stream #0:1 -> #2:1 (aac (native) -> aac (native)) Stream #0:0 -> #3:0 (av1 (native) -> h264 (libx264)) Stream #0:1 -> #3:1 (aac (native) -> aac (native)) Stream #0:0 -> #4:0 (av1 (native) -> h264 (libx264)) Stream #0:1 -> #4:1 (aac (native) -> aac (native)) Press [q] to stop, [?] for help [av1 @ 0x560014624c00] Your platform doesn't suppport hardware accelerated AV1 decoding. [av1 @ 0x560014624c00] Failed to get pixel format. Error while decoding stream #0:0: Function not implemented [av1 @ 0x560014624c00] Missing Sequence Header. Error while decoding stream #0:0: Invalid data found when processing input [av1 @ 0x560014624c00] Missing Sequence Header. Error while decoding stream #0:0: Invalid data found when processing input Error while decoding stream #0:0: Resource temporarily unavailable Last message repeated 2969 times [av1 @ 0x560014624c00] Missing Sequence Header. Error while decoding stream #0:0: Invalid data found when processing input [av1 @ 0x560014624c00] Missing Sequence Header. Error while decoding stream #0:0: Invalid data found when processing input [av1 @ 0x560014624c00] Missing Sequence Header. Error while decoding stream #0:0: Invalid data found when processing input Cannot determine format of input stream 0:0 after EOF Error marking filters as finished [aac @ 0x560014676500] Qavg: 3741.907 [aac @ 0x560014676500] 2 frames left in the queue on closing [aac @ 0x5600147748c0] Qavg: 3741.907 [aac @ 0x5600147748c0] 2 frames left in the queue on closing [aac @ 0x56001462ea80] Qavg: 4106.075 [aac @ 0x56001462ea80] 2 frames left in the queue on closing [aac @ 0x560014637780] Qavg: 4106.075 [aac @ 0x560014637780] 2 frames left in the queue on closing [aac @ 0x560014666f00] Qavg: 4106.075 [aac @ 0x560014666f00] 2 frames left in the queue on closing Conversion failed! 18-Jun-2022 08:54:24 Europe/Berlin] posProcessHLS: ZIP start /var/www/html/AVideo/Encoder/videos/avideoTmpFile_33_streamers_id1/ [18-Jun-2022 08:54:24 Europe/Berlin] posProcessHLS: ZIP created /var/www/html/AVideo/Encoder/videos/avideoTmpFile_33_streamers_id1.zip 535 bytes [18-Jun-2022 08:54:24 Europe/Berlin] getReturn_vars {"videos_id":34,"video_id_hash":"NFB3V2NuNUluUEN2cUw0ODlHZDJmQTNaaVppcENpK3Zoalc0V0xOMWxKOD0="} [18-Jun-2022 08:54:24 Europe/Berlin] Encoder::send() order_id=6 [18-Jun-2022 08:54:24 Europe/Berlin] getDurationFromFile try 1, File (/var/www/html/AVideo/Encoder/videos/avideoTmpFile_33_streamers_id1.mp4) Not Found [18-Jun-2022 08:54:24 Europe/Berlin] {"status":"error", "msg":["N\/A"] ,"match_not_found":[] ,"return_val":0, "where":"getDuration", "cmd":"ffprobe -i "/var/www/html/AVideo/Encoder/videos/avideoTmpFile_33_streamers_id1/index.m3u8" -sexagesimal -show_entries format=duration -v quiet -of csv="p=0""} [18-Jun-2022 08:54:24 Europe/Berlin] Duration found: EE:EE:EE

Any problem with FFmpeg

T hank's in advance keep up the good work

DanielnetoDotCom commented 2 years ago

I am not sure what how you have installed your FFMPEG but I can only see this problem

[av1 @ 0x56001460fac0] Your platform doesn't suppport hardware accelerated AV1 decoding. [av1 @ 0x56001460fac0] Failed to get pixel format. [av1 @ 0x56001460fac0] Missing Sequence Header.

I am not sure if the problem is on the video file itself or on the FFmpeg installation.

does this happen on all files?

try to use the public encoder https://encoder3.wwbn.net/

can you please share the original file so I can test it here?

nikstream commented 2 years ago

Hi Daniel,

Below links are from youtube

https://youtu.be/DDAHHPGcLzo https://youtu.be/FwyG7-pisC8

which gave me error, both are 4k and second thing Full Hd links does not give error, It gets published. And it is playable

Thanks,

nikstream commented 2 years ago

Hi, Related to FFmpeg

I have followed wiki of Restream to Compile FFMPEG with OpenSSL support Thanks

DanielnetoDotCom commented 2 years ago

Hi, I just tested both videos

https://demo.avideo.com/video/384/rrr-%7C-tiger-fight-scene---jr-ntr-entry-%7C-netflix

and

https://demo.avideo.com/video/385/marvel-s-spider-man-remastered-%7C-pc-reveal-trailer

both works fine, including the 4k resolution.

I am not sure what is happening on your side. I still suspect something on FFMPEG.

try to install the default Ubuntu ffmpeg (apt-get) instead of compile one

pakirus commented 1 year ago

Encoder Me

I didn't select 1080p, but it still encodes 1080p.