-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ffmpeg not starting after video download #479
Comments
I cannot see any issue but try to manually run this command
|
The command, run from command line inside the container, works just fine. The only difference I see is that when running from CLI, the output starts like this: ffmpeg version 4.3.5-0+deb11u1 Copyright (c) 2000-2022 the FFmpeg developers while the log created inside Encoder shows (this is taken from an X_tmpFile_progress.txt): ffmpeg version 4.3.5-0+deb11u1 Copyright (c) 2000-2022 the FFmpeg developers and there is stops. I tried to find some hints on this "user_option" but didn't find anything useful. Could it be something that is wrapped around the command when $encoder->exec($code . " 1> "{$progressFile}" 2>&1", $output, $return_val); is run? Thanks in advance, Regards, Marco |
I am not sure what is happening but looks like a permission thing. maybe php has a memory limit or has no permission to execute ffmpeg commands Are you using Ubuntu? and php as an apache module? |
Actually I'm using a docker image called php:7-apache which is a Debian (from /etc/os-release) PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" It's the default of the Dockerfile to build Encoder image. |
Make sure you are using this docker https://github.com/WWBN/AVideo/wiki/Running-AVideo-with-Docker this is working fine |
@DanielnetoDotCom the php-mod apache module is very insecure you should consider to make things work with fpm and that the script needs root also big security risk .. nothing needs root permissions to encode or do cli stuff over php root access is a very very dangerous thing and leaves the door wide open to hackers please considder that with your next update |
Dear Daniel,
I'm working with AVideo-Encoder inside a container managed by Podman and I'm facing a strange issue (I cloned the last master of the git repo): when I try to upload a video from my laptop or from youtube, it is correctly downloaded, but ffmpeg doesn't start. From the log I see that the program should be correctly called, but it is not and the Encoder uploads only the preview of the video and not the encoded files. Furthermore if I run the command I find in the log directly from the command line inside the container, ffmpeg works correctly, so it seems not a problem with ffmpeg itself
This is the relevant part of the log:
[15-Mar-2023 10:56:02 UTC] Encoder:Format:: getDynamicCommandFromFormat(/var/www/html/videos/6_tmpFile.mp4, 31) [resolutions=[240,360,480,540,720,1080,1440,2160]] [height=720]
[15-Mar-2023 10:56:02 UTC] Encoder:Format:: getDynamicCommandFromFormat resolution 1080 was ignored, your upload file is 720 we wil not up transcode your video
[15-Mar-2023 10:56:02 UTC] Encoder:Format:: getDynamicCommandFromFormat::return(ffmpeg -i "{$pathFileName}" -vf scale=-2:240 -movflags +faststart -preset veryfast -vcodec h264 -acodec aac -b:a 128k -max_muxing_queue_size 1024 -y /var/www/html/videos/avideoTmpFile_6_streamers_id_1_240.mp4 -vf scale=-2:360 -movflags +faststart -preset veryfast -vcodec h264 -acodec aac -b:a 128k -max_muxing_queue_size 1024 -y /var/www/html/videos/avideoTmpFile_6_streamers_id_1_360.mp4 -vf scale=-2:480 -movflags +faststart -preset veryfast -vcodec h264 -acodec aac -b:a 128k -max_muxing_queue_size 1024 -y /var/www/html/videos/avideoTmpFile_6_streamers_id_1_480.mp4 -vf scale=-2:540 -movflags +faststart -preset veryfast -vcodec h264 -acodec aac -b:a 192k -max_muxing_queue_size 1024 -y /var/www/html/videos/avideoTmpFile_6_streamers_id_1_540.mp4 -vf scale=-2:720 -movflags +faststart -preset veryfast -vcodec h264 -acodec aac -b:a 192k -max_muxing_queue_size 1024 -y /var/www/html/videos/avideoTmpFile_6_streamers_id_1_720.mp4)
[15-Mar-2023 10:56:02 UTC] AVideo-Encoder Format::exec Start Encoder [ffmpeg -i "/var/www/html/videos/6_tmpFile.mp4" -vf scale=-2:240 -movflags +faststart -preset veryfast -vcodec h264 -acodec aac -b:a 128k -max_muxing_queue_size 1024 -y /var/www/html/videos/avideoTmpFile_6_streamers_id_1_240.mp4 -vf scale=-2:360 -movflags +faststart -preset veryfast -vcodec h264 -acodec aac -b:a 128k -max_muxing_queue_size 1024 -y /var/www/html/videos/avideoTmpFile_6_streamers_id_1_360.mp4 -vf scale=-2:480 -movflags +faststart -preset veryfast -vcodec h264 -acodec aac -b:a 128k -max_muxing_queue_size 1024 -y /var/www/html/videos/avideoTmpFile_6_streamers_id_1_480.mp4 -vf scale=-2:540 -movflags +faststart -preset veryfast -vcodec h264 -acodec aac -b:a 192k -max_muxing_queue_size 1024 -y /var/www/html/videos/avideoTmpFile_6_streamers_id_1_540.mp4 -vf scale=-2:720 -movflags +faststart -preset veryfast -vcodec h264 -acodec aac -b:a 192k -max_muxing_queue_size 1024 -y /var/www/html/videos/avideoTmpFile_6_streamers_id_1_720.mp4]
[15-Mar-2023 10:56:03 UTC] progressFileHasVideosWithErrors: we could not detect files on the progress log, we will ignore errors
ffmpeg version 4.3.5-0+deb11u1 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 10 (Debian 10.2.1-6)
configuration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Option user_agent not found.
[15-Mar-2023 10:56:03 UTC] getReturn_vars {"videos_id":712,"video_id_hash":"cHlEZEhBN3dUTng5c1h3bU9TMmwrdlRaR2Vud0NTWms0VUtZV1NiNzc5VT0=","releaseDate":"2023-03-15 10:33"}
[15-Mar-2023 10:56:03 UTC] Encoder::send() order_id=7
[15-Mar-2023 10:56:03 UTC] Encoder::run: Autodelete Not active
[15-Mar-2023 10:56:03 UTC] getReturn_vars {"videos_id":712,"video_id_hash":"cHlEZEhBN3dUTng5c1h3bU9TMmwrdlRaR2Vud0NTWms0VUtZV1NiNzc5VT0=","releaseDate":"2023-03-15 10:33"}
[15-Mar-2023 10:56:03 UTC] AVideo-Encoder sending confirmation to objects/aVideoEncoderNotifyIsDone.json.php
[15-Mar-2023 10:56:03 UTC] sendToStreamer to objects/aVideoEncoderNotifyIsDone.json.php
[15-Mar-2023 10:56:03 UTC] sendToStreamer spectrumimage not set
[15-Mar-2023 10:56:03 UTC] sendToStreamer rawVideo not set
[15-Mar-2023 10:56:03 UTC] sendToStreamer image not set
[15-Mar-2023 10:56:03 UTC] sendToStreamer gifimage not set
[15-Mar-2023 10:56:03 UTC] sendToStreamer webpimage not set
[15-Mar-2023 10:56:03 UTC] sendToStreamer video not set
[15-Mar-2023 10:56:03 UTC] sendToStreamer https://mediawall-test.infn.it/objects/aVideoEncoderNotifyIsDone.json.php in 0.606 seconds {"error":false,"target":"objects/aVideoEncoderNotifyIsDone.json.php","postFields":{"fail":0,"streamers_id":"1","user":"admin","pass":"_user_hash_S3Q2RmV2a3hCWDJ3aFZkOEdlMEIrSW8wZ1lmeU9Ob2dTWGhrRHZLakhIejR5SFdNbU1XSWYzeVJYVTdIQjB0a3NQTGJWRTJTNTZLdWdHcFUwMERWWnc9PQ==","return_vars":"{"videos_id":712,"video_id_hash":"cHlEZEhBN3dUTng5c1h3bU9TMmwrdlRaR2Vud0NTWms0VUtZV1NiNzc5VT0=","releaseDate":"2023-03-15 10:33"}","releaseDate":"2023-03-15 10:33","videos_id":712,"video_id_hash":"cHlEZEhBN3dUTng5c1h3bU9TMmwrdlRaR2Vud0NTWms0VUtZV1NiNzc5VT0="},"response_raw":"{"error":false,"video_id":712}","response":{"error":false,"video_id":712}}
Could you give me any hints to help me solve this issue?
Thanks in advance,
Marco
The text was updated successfully, but these errors were encountered: