ffmpeg-php ffmpeg passthru () function in terminal PHP file can be transcoded, Web Access this PHP file cannot transcode. What reason??

Source: Internet
Author: User
Problem scenario: Transcode files with FFmpeg.
Problem Description: Use PHP to implement transcoding with three methods called Terminal ffmpeg via exec (), PassThru (), System ()
The code is as follows:

To run this PHP file in the terminal, it can be transcoded normally.
However, access to this file via the Web cannot be transcoded. Why??
Before the full path of the FFmpeg is written, the status Code of PassThru () is not found in the command, and now is the Web Access returned in 1, stating that no execution was successful.
Executes the PHP file directly in, the state is 0, the execution succeeds.
Does FFmpeg have a problem with user permissions
The users who print out on the web are Www-data
Terminal is root

What is the reason for this situation?
。 Urgent and urgent ...
Little brother to do mobile development, this is not familiar,, Google a lot of themselves, did not find the cause and solution----

-------!!!!!!!!!!!!!

Reply content:

Problem scenario: Transcode files with FFmpeg.
Problem Description: Use PHP to implement transcoding with three methods called Terminal ffmpeg via exec (), PassThru (), System ()
The code is as follows:

To run this PHP file in the terminal, it can be transcoded normally.
However, access to this file via the Web cannot be transcoded. Why??
Before the full path of the FFmpeg is written, the status Code of PassThru () is not found in the command, and now is the Web Access returned in 1, stating that no execution was successful.
Executes the PHP file directly in, the state is 0, the execution succeeds.
Does FFmpeg have a problem with user permissions
The users who print out on the web are Www-data
Terminal is root

What is the reason for this situation?
。 Urgent and urgent ...
Little brother to do mobile development, this is not familiar,, Google a lot of themselves, did not find the cause and solution----

-------!!!!!!!!!!!!!

You are using the root user in the terminal, this user privilege is invincible, and the user rights in the Web is limited ~.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.