AVideo-Encoder
AVideo-Encoder copied to clipboard
encoder mp4 (error null )
Everything is well installed when I encode a mp4 videos its always telling me error null

**
/var/www/AVideo/videos/avideo.log
**
[24-Feb-2021 15:05:30 Africa/Abidjan] PHP Warning: mysqli::prepare(): Couldn't fetch mysqli in /var/www/AVideo/objects/mysql_dal.php on line 133 [24-Feb-2021 15:05:30 Africa/Abidjan] PHP Warning: sqlDAL::readSql(): Couldn't fetch mysqli in /var/www/AVideo/objects/mysql_dal.php on line 134 [24-Feb-2021 15:05:30 Africa/Abidjan] PHP Warning: sqlDAL::readSql(): Couldn't fetch mysqli in /var/www/AVideo/objects/mysql_dal.php on line 134 [24-Feb-2021 15:05:30 Africa/Abidjan] AVideoLog::ERROR: MySQL ERROR: [{"file":"/var/www/AVideo/objects/mysql_dal.php","line":134,"function":"log_error","args":["[sqlDAL::readSql] (mysqlnd) Prepare failed: () (SELECT * FROM videos_statistics WHERE videos_id = ? AND users_id = ? ORDER BY modified DESC LIMIT 1 ) - format=(ii) values=[2,1]"]},{"file":"/var/www/AVideo/objects/video_statistic.php","line":105,"function":"readSql","class":"sqlDAL","type":"::","args":["SELECT * FROM videos_statistics WHERE videos_id = ? AND users_id = ? ORDER BY modified DESC LIMIT 1 ","ii",[2,1],true]},{"file":"/var/www/AVideo/objects/video_statistic.php","line":120,"function":"getLastStatistics","class":"VideoStatistic","type":"::","args":[2,1]},{"file":"/var/www/AVideo/objects/video.php","line":3730,"function":"getLastVideoTimeFromVideo","class":"VideoStatistic","type":"::","args":[2,1]},{"file":"/var/www/AVideo/objects/video.php","line":3735,"function":"getVideoPogress","class":"Video","type":"::","args":[2,1]},{"file":"/var/www/AVideo/objects/video.php","line":834,"function":"getVideoPogressPercent","class":"Video","type":"::","args":[2]},{"file":"/var/www/AVideo/objects/video.php","line":962,"function":"getVideo","class":"Video","type":"::","args":[2,"",true,false,false,true]},{"file":"/var/www/AVideo/objects/video.php","line":2496,"function":"getVideoFromCleanTitle","class":"Video","type":"::","args":["baltimora---tarzan-boy"]},{"file":"/var/www/AVideo/objects/video.php","line":1621,"function":"isOwnerFromCleanTitle","class":"Video","type":"::","args":["baltimora---tarzan-boy"]},{"file":"/var/www/AVideo/objects/video.php","line":1478,"function":"getViewableStatus","class":"Video","type":"::","args":[false]},{"file":"/var/www/AVideo/objects/video.php","line":792,"function":"getTotalVideos","class":"Video","type":"::","args":["viewable",false,false,false,true,false]},{"file":"/var/www/AVideo/objects/video.php","line":2560,"function":"getVideo","class":"Video","type":"::","args":[0,"viewable",false,2]},{"file":"/var/www/AVideo/view/modeYoutube.php","line":201,"function":"getRandom","class":"Video","type":"::","args":[2]},{"file":"/var/www/AVideo/view/index.php","line":28,"args":["/var/www/AVideo/view/modeYoutube.php"],"function":"require"}] SCRIPT_NAME: /AVideo/view/index.php [24-Feb-2021 15:05:30 Africa/Abidjan] AVideoLog::ERROR: [sqlDAL::readSql] (mysqlnd) Prepare failed: () (SELECT * FROM videos_statistics WHERE videos_id = ? AND users_id = ? ORDER BY modified DESC LIMIT 1 ) - format=(ii) values=[2,1] SCRIPT_NAME: /AVideo/view/index.php [24-Feb-2021 15:05:30 Africa/Abidjan] AVideoLog::ERROR: MySQL ERROR: [{"file":"/var/www/AVideo/objects/mysql_dal.php","line":135,"function":"log_error","args":["[sqlDAL::readSql] trying close and reconnect"]},{"file":"/var/www/AVideo/objects/video_statistic.php","line":105,"function":"readSql","class":"sqlDAL","type":"::","args":["SELECT * FROM videos_statistics WHERE videos_id = ? AND users_id = ? ORDER BY modified DESC LIMIT 1 ","ii",[2,1],true]},{"file":"/var/www/AVideo/objects/video_statistic.php","line":120,"function":"getLastStatistics","class":"VideoStatistic","type":"::","args":[2,1]},{"file":"/var/www/AVideo/objects/video.php","line":3730,"function":"getLastVideoTimeFromVideo","class":"VideoStatistic","type":"::","args":[2,1]},{"file":"/var/www/AVideo/objects/video.php","line":3735,"function":"getVideoPogress","class":"Video","type":"::","args":[2,1]},{"file":"/var/www/AVideo/objects/video.php","line":834,"function":"getVideoPogressPercent","class":"Video","type":"::","args":[2]},{"file":"/var/www/AVideo/objects/video.php","line":962,"function":"getVideo","class":"Video","type":"::","args":[2,"",true,false,false,true]},{"file":"/var/www/AVideo/objects/video.php","line":2496,"function":"getVideoFromCleanTitle","class":"Video","type":"::","args":["baltimora---tarzan-boy"]},{"file":"/var/www/AVideo/objects/video.php","line":1621,"function":"isOwnerFromCleanTitle","class":"Video","type":"::","args":["baltimora---tarzan-boy"]},{"file":"/var/www/AVideo/objects/video.php","line":1478,"function":"getViewableStatus","class":"Video","type":"::","args":[false]},{"file":"/var/www/AVideo/objects/video.php","line":792,"function":"getTotalVideos","class":"Video","type":"::","args":["viewable",false,false,false,true,false]},{"file":"/var/www/AVideo/objects/video.php","line":2560,"function":"getVideo","class":"Video","type":"::","args":[0,"viewable",false,2]},{"file":"/var/www/AVideo/view/modeYoutube.php","line":201,"function":"getRandom","class":"Video","type":"::","args":[2]},{"file":"/var/www/AVideo/view/index.php","line":28,"args":["/var/www/AVideo/view/modeYoutube.php"],"function":"require"}] SCRIPT_NAME: /AVideo/view/index.php [24-Feb-2021 15:05:30 Africa/Abidjan] AVideoLog::ERROR: [sqlDAL::readSql] trying close and reconnect SCRIPT_NAME: /AVideo/view/index.php
**
/var/www/AVideo/upload/videos/avideo.log
**
24-Feb-2021 10:04:04 America/New_York] AVideo-Encoder Format::getFromOrder(7) [24-Feb-2021 10:04:04 America/New_York] Encoder::sendFile videos_id=0, format=mp4 [24-Feb-2021 10:04:04 America/New_York] Encoder::sendFile sending file to https://blabla.epac.to/AVideo/aVideoEncoder.json [24-Feb-2021 10:04:04 America/New_York] Encoder::sendFile reading file from [24-Feb-2021 10:04:04 America/New_York] AVideo-Streamer answer {"error":false,"video_id":2} [24-Feb-2021 10:04:04 America/New_York] {"error":false,"format":"mp4","file":"","resolution":"","videoDownloadedLink":null,"target":"https://blabla.epac.to/AVideo/aVideoEncoder.json","postFields":15,"response_raw":"{"error":false,"video_id":2}","response":{"error":false,"video_id":2}} [24-Feb-2021 10:04:04 America/New_York] Encoder::save id=() title=(Baltimora - Tarzan Boy) [24-Feb-2021 10:04:04 America/New_York] Encoder::save id=(2) title=(Baltimora - Tarzan Boy) [24-Feb-2021 10:04:05 America/New_York] getReturn_vars {"videos_id":2} [24-Feb-2021 10:04:05 America/New_York] Encoder::save id=(2) title=(Baltimora - Tarzan Boy) 24-Feb-2021 10:04:10 America/New_York] Trying again: [1] => Execute code error "" Code: ffmpeg -i /var/www/AVideo/upload/videos/2_tmpFile.mp4 -vf scale=-2:240 -movflags +faststart -preset veryfast -vcodec h264 -acodec aac -strict -2 -b:a 128k -max_muxing_queue_size 1024 -y /var/www/AVideo/upload/videos/avideoTmpFile_2_streamers_id_1__240.mp4 -c copy -movflags +faststart -preset veryfast -y /var/www/AVideo/upload/videos/avideoTmpFile_2_streamers_id_1__262.mp4 [24-Feb-2021 10:04:10 America/New_York] Encoder::save id=(2) title=(Baltimora - Tarzan Boy)
If your file still there try to run this command and see the output
ffmpeg -i /var/www/AVideo/upload/videos/2_tmpFile.mp4 -vf scale=-2:240 -movflags +faststart -preset veryfast -vcodec h264 -acodec aac -strict -2 -b:a 128k -max_muxing_queue_size 1024 -y /var/www/AVideo/upload/videos/avideoTmpFile_2_streamers_id_1__240.mp4 -c copy -movflags +faststart -preset veryfast -y /var/www/AVideo/upload/videos/avideoTmpFile_2_streamers_id_1__262.mp4

( Webm )
root@BoX1:/var/www/AVideo# ffmpeg -i /var/www/AVideo/upload/videos/4_tmpFile.mp4 -vf scale=-2:240 -movflags +faststart -preset veryfast -f webm -c:v libvpx -b:v 1M -acodec libvorbis -b:a 128k -y /var/www/AVideo/upload/videos/avideoTmpFile_4_streamers_id_1__240.webm -c copy -movflags +faststart -preset veryfast -y /var/www/AVideo/upload/videos/avideoTmpFile_4_streamers_id_1__262.webm ffmpeg version 2.8.17-0ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609 configuration: --prefix=/usr --extra-version=0ubuntu0.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/AVideo/upload/videos/4_tmpFile.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2020-02-21 12:52:35 Duration: 00:03:39.92, start: 0.000000, bitrate: 367 kb/s Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 352x262 [SAR 1:1 DAR 176:131], 269 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default) Metadata: creation_time : 2020-02-21 12:52:35 handler_name : ISO Media file produced by Google Inc. Created on: 02/21/2020. Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s (default) Metadata: creation_time : 2020-02-21 12:52:35 handler_name : ISO Media file produced by Google Inc. Created on: 02/21/2020. Codec AVOption preset (Configuration preset) specified for output file #0 (/var/www/AVideo/upload/videos/avideoTmpFile_4_streamers_id_1__240.webm) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream. [libvpx @ 0x2282ca0] v1.5.0 [webm @ 0x2213480] Codec for stream 0 does not use global headers but container format requires global headers [webm @ 0x2213480] Codec for stream 1 does not use global headers but container format requires global headers [webm @ 0x2213480] Only VP8 or VP9 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM. Output #0, webm, to '/var/www/AVideo/upload/videos/avideoTmpFile_4_streamers_id_1__240.webm': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 encoder : Lavf56.40.101 Stream #0:0(und): Video: vp8 (libvpx), yuv420p, 322x240 [SAR 21120:21091 DAR 176:131], q=-1--1, 1000 kb/s, 29.97 fps, 1k tbn, 29.97 tbc (default) Metadata: creation_time : 2020-02-21 12:52:35 handler_name : ISO Media file produced by Google Inc. Created on: 02/21/2020. encoder : Lavc56.60.100 libvpx Stream #0:1(und): Audio: vorbis (libvorbis), 44100 Hz, stereo, fltp, 128 kb/s (default) Metadata: creation_time : 2020-02-21 12:52:35 handler_name : ISO Media file produced by Google Inc. Created on: 02/21/2020. encoder : Lavc56.60.100 libvorbis Output #1, webm, to '/var/www/AVideo/upload/videos/avideoTmpFile_4_streamers_id_1__262.webm': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 encoder : Lavf56.40.101 Stream #1:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 352x262 [SAR 1:1 DAR 176:131], q=2-31, 269 kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 30k tbc (default) Metadata: creation_time : 2020-02-21 12:52:35 handler_name : ISO Media file produced by Google Inc. Created on: 02/21/2020. Stream #1:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 95 kb/s (default) Metadata: creation_time : 2020-02-21 12:52:35 handler_name : ISO Media file produced by Google Inc. Created on: 02/21/2020. Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> vp8 (libvpx)) Stream #0:1 -> #0:1 (aac (native) -> vorbis (libvorbis)) Stream #0:0 -> #1:0 (copy) Stream #0:1 -> #1:1 (copy) Could not write header for output file #1 (incorrect codec parameters ?): Invalid argument
Model | Intel(R) Core(TM) i5 CPU 650 @ 3.20GHz Disque 1.79 TB OS | Ubuntu 16.04.7 LTS 64-bit PHP 8.0.2 (cli) Apache/2.4.18 (Ubuntu) mysql Ver 14.14 Distrib 5.7.33
First, update your FFmpeg version to version 3 or 4
How do you update ffmpeg?
also how can i install the website to where it doesnt have avideo at the end
@DanielnetoDotCom please can you read above sorry i have being trying to fix it for days now
How do you update ffmpeg?
It depends on your OS, You can find it on google
also how can i install the website to where it doesnt have avideo at the end
Use virtual hosts, google for that
@DanielnetoDotCom for my website im using ubuntu 16 also i looked and tried none seem to update it
also i dont know hwat you mean by virtual hosts i use google cloud vm but i dont know how to make it like your demo website where its just the base domain thanks
I mean Apache virtual host
https://letmegooglethat.com/?q=how+to+setup+apache+virtual+hosts
@DanielnetoDotCom a very big thank you, it works :)