video processing error: /usr/bin/env: python : No such file or directory [solved]

edited April 2015 in General
// Converter Called...
Values passed to encoder:
Array
(
[0] => /home/vide02/public_html/cc-core/system/encode.php
[1] => --video=6298
)

Validating requested video...
Establishing variables...
Verifying raw video exists...
Verifying raw video was valid size...

Preparing for: H.264 Encoding...
H.264 Encoding Command: /usr/local/bin/ffmpeg -i /home/vide02/public_html/cc-content/uploads/temp/ws3fYNiamt9600cBbc6P.mp4 -vcodec libx264 -vf "scale=min(640\,iw):trunc(ow/a/2)*2" -vb 800k -acodec libfaac -strict experimental -ab 96k -ar 44100 -f mp4 /home/vide02/public_html/cc-content/uploads/h264/ws3fYNiamt9600cBbc6P_temp.mp4 >> /home/vide02/public_html/cc-core/logs/ws3fYNiamt9600cBbc6P.log 2>&1
Verifying H.264 video was created...

Checking qt-faststart permissions...

Shifting moov atom on H.264 video...
H.264 Shift Moov Atom Command: /home/vide02/public_html/cc-core/system/bin/qtfaststart /home/vide02/public_html/cc-content/uploads/h264/ws3fYNiamt9600cBbc6P_temp.mp4 /home/vide02/public_html/cc-content/uploads/h264/ws3fYNiamt9600cBbc6P.mp4 >> /home/vide02/public_html/cc-core/logs/ws3fYNiamt9600cBbc6P.log 2>&1
Verifying final H.264 file was created...
The final H.264 file was not created. The id of the video is: 6298

please help me as i am able to upload videos.

Comments

  • and the video log file:

    ==============================================================
    H.264 ENCODING
    ==============================================================

    H.264 Encoding Command: /usr/local/bin/ffmpeg -i /home/vide02/public_html/cc-content/uploads/temp/ws3fYNiamt9600cBbc6P.mp4 -vcodec libx264 -vf "scale=min(640\,iw):trunc(ow/a/2)*2" -vb 800k -acodec libfaac -strict experimental -ab 96k -ar 44100 -f mp4 /home/vide02/public_html/cc-content/uploads/h264/ws3fYNiamt9600cBbc6P_temp.mp4 >> /home/vide02/public_html/cc-core/logs/ws3fYNiamt9600cBbc6P.log 2>&1

    H.264 Encoding Output:


    ffmpeg version 2.6.1 Copyright (c) 2000-2015 the FFmpeg developers
    built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11)
    configuration: --enable-gpl --enable-libx264 --enable-libvorbis --enable-libvpx --enable-nonfree --enable-libmp3lame --enable-libfaac --enable-libtheora --enable-libxvid --enable-pthreads --enable-postproc --disable-debug
    libavutil 54. 20.100 / 54. 20.100
    libavcodec 56. 26.100 / 56. 26.100
    libavformat 56. 25.101 / 56. 25.101
    libavdevice 56. 4.100 / 56. 4.100
    libavfilter 5. 11.102 / 5. 11.102
    libswscale 3. 1.101 / 3. 1.101
    libswresample 1. 1.100 / 1. 1.100
    libpostproc 53. 3.100 / 53. 3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/vide02/public_html/cc-content/uploads/temp/ws3fYNiamt9600cBbc6P.mp4':
    Metadata:
    major_brand : mp42
    minor_version : 0
    compatible_brands: isommp42
    creation_time : 2015-04-01 14:39:13
    Duration: 00:02:36.13, start: 0.000000, bitrate: 1206 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1011 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
    creation_time : 1970-01-01 00:00:00
    handler_name : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
    creation_time : 2015-04-01 14:39:13
    handler_name : IsoMedia File Produced by Google, 5-11-2011
    [libx264 @ 0x341e940] using SAR=1/1
    [libx264 @ 0x341e940] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
    [libx264 @ 0x341e940] profile High, level 3.0
    [libx264 @ 0x341e940] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=800 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to '/home/vide02/public_html/cc-content/uploads/h264/ws3fYNiamt9600cBbc6P_temp.mp4':
    Metadata:
    major_brand : mp42
    minor_version : 0
    compatible_brands: isommp42
    encoder : Lavf56.25.101
    Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 800 kb/s, 29.97 fps, 30k tbn, 29.97 tbc (default)
    Metadata:
    creation_time : 1970-01-01 00:00:00
    handler_name : VideoHandler
    encoder : Lavc56.26.100 libx264
    Stream #0:1(und): Audio: aac (libfaac) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, s16, 96 kb/s (default)
    Metadata:
    creation_time : 2015-04-01 14:39:13
    handler_name : IsoMedia File Produced by Google, 5-11-2011
    encoder : Lavc56.26.100 libfaac
  • Stream mapping:
    Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    Stream #0:1 -> #0:1 (aac (native) -> aac (libfaac))
    Press [q] to stop, [?] for help
    frame= 95 fps=0.0 q=15.0 size= 86kB time=00:00:03.34 bitrate= 210.7kbits/s
    frame= 227 fps=226 q=5.0 size= 376kB time=00:00:07.73 bitrate= 398.1kbits/s
    frame= 361 fps=240 q=2.0 size= 799kB time=00:00:12.58 bitrate= 520.4kbits/s
    frame= 495 fps=247 q=4.0 size= 1437kB time=00:00:16.78 bitrate= 701.2kbits/s
    frame= 567 fps=226 q=14.0 size= 2327kB time=00:00:19.15 bitrate= 995.2kbits/s
    frame= 668 fps=222 q=15.0 size= 2703kB time=00:00:22.87 bitrate= 968.2kbits/s
    frame= 799 fps=227 q=14.0 size= 3028kB time=00:00:27.07 bitrate= 916.1kbits/s
    frame= 847 fps=211 q=17.0 size= 3533kB time=00:00:28.49 bitrate=1015.7kbits/s
    frame= 898 fps=199 q=20.0 size= 3977kB time=00:00:30.34 bitrate=1073.5kbits/s
    frame= 949 fps=189 q=22.0 size= 4334kB time=00:00:32.20 bitrate=1102.4kbits/s
    frame= 1011 fps=183 q=23.0 size= 4610kB time=00:00:34.08 bitrate=1107.9kbits/s
    frame= 1074 fps=178 q=23.0 size= 4821kB time=00:00:36.40 bitrate=1084.6kbits/s
    frame= 1149 fps=176 q=23.0 size= 5045kB time=00:00:38.75 bitrate=1066.5kbits/s
    frame= 1250 fps=178 q=22.0 size= 5232kB time=00:00:42.02 bitrate=1019.9kbits/s
    frame= 1343 fps=178 q=21.0 size= 5379kB time=00:00:45.27 bitrate= 973.2kbits/s
    frame= 1403 fps=175 q=21.0 size= 5659kB time=00:00:47.15 bitrate= 983.0kbits/s
    frame= 1480 fps=173 q=21.0 size= 5903kB time=00:00:49.96 bitrate= 967.7kbits/s
    frame= 1559 fps=172 q=21.0 size= 6110kB time=00:00:52.29 bitrate= 957.2kbits/s
    frame= 1673 fps=175 q=20.0 size= 6372kB time=00:00:56.02 bitrate= 931.6kbits/s
    frame= 1739 fps=173 q=20.0 size= 6655kB time=00:00:58.37 bitrate= 933.9kbits/s
    frame= 1791 fps=170 q=23.0 size= 7273kB time=00:01:00.23 bitrate= 989.2kbits/s
    frame= 1869 fps=169 q=23.0 size= 7598kB time=00:01:02.57 bitrate= 994.6kbits/s
    frame= 1950 fps=169 q=23.0 size= 7830kB time=00:01:05.36 bitrate= 981.3kbits/s
    frame= 2008 fps=166 q=24.0 size= 8145kB time=00:01:07.24 bitrate= 992.2kbits/s
    frame= 2132 fps=170 q=23.0 size= 8358kB time=00:01:11.44 bitrate= 958.3kbits/s
    frame= 2214 fps=169 q=22.0 size= 8564kB time=00:01:14.25 bitrate= 944.8kbits/s
    frame= 2291 fps=169 q=22.0 size= 8836kB time=00:01:17.04 bitrate= 939.6kbits/s
    frame= 2403 fps=171 q=21.0 size= 9014kB time=00:01:20.78 bitrate= 914.1kbits/s
    frame= 2538 fps=174 q=20.0 size= 9237kB time=00:01:24.98 bitrate= 890.4kbits/s
    frame= 2611 fps=173 q=20.0 size= 9476kB time=00:01:27.65 bitrate= 885.6kbits/s
    frame= 2672 fps=171 q=20.0 size= 9813kB time=00:01:29.67 bitrate= 896.4kbits/s
    frame= 2734 fps=170 q=21.0 size= 10178kB time=00:01:31.53 bitrate= 910.9kbits/s
    frame= 2790 fps=168 q=21.0 size= 10488kB time=00:01:33.39 bitrate= 920.0kbits/s
    frame= 2851 fps=167 q=22.0 size= 10858kB time=00:01:35.73 bitrate= 929.1kbits/s
    frame= 2939 fps=167 q=22.0 size= 11107kB time=00:01:38.54 bitrate= 923.3kbits/s
    frame= 3037 fps=168 q=21.0 size= 11350kB time=00:01:41.81 bitrate= 913.2kbits/s
    frame= 3101 fps=167 q=22.0 size= 11624kB time=00:01:43.70 bitrate= 918.3kbits/s
    frame= 3150 fps=165 q=23.0 size= 12092kB time=00:01:45.55 bitrate= 938.4kbits/s
    frame= 3199 fps=163 q=23.0 size= 12401kB time=00:01:46.97 bitrate= 949.6kbits/s
    frame= 3254 fps=162 q=24.0 size= 12660kB time=00:01:48.80 bitrate= 953.2kbits/s
    frame= 3325 fps=161 q=24.0 size= 12867kB time=00:01:51.59 bitrate= 944.5kbits/s
    frame= 3460 fps=164 q=22.0 size= 13056kB time=00:01:55.82 bitrate= 923.4kbits/s
    frame= 3514 fps=162 q=23.0 size= 13396kB time=00:01:57.70 bitrate= 932.3kbits/s
    frame= 3563 fps=161 q=23.0 size= 13670kB time=00:01:59.30 bitrate= 938.7kbits/s
    frame= 3619 fps=160 q=24.0 size= 13953kB time=00:02:00.97 bitrate= 944.8kbits/s
    frame= 3675 fps=159 q=24.0 size= 14226kB time=00:02:02.85 bitrate= 948.6kbits/s
    frame= 3808 fps=161 q=23.0 size= 14416kB time=00:02:07.50 bitrate= 926.3kbits/s
    frame= 3899 fps=161 q=22.0 size= 14614kB time=00:02:10.40 bitrate= 918.1kbits/s
    frame= 3940 fps=160 q=23.0 size= 14914kB time=00:02:11.70 bitrate= 927.7kbits/s
    frame= 3992 fps=159 q=24.0 size= 15222kB time=00:02:13.58 bitrate= 933.5kbits/s
    frame= 4039 fps=157 q=24.0 size= 15479kB time=00:02:15.00 bitrate= 939.3kbits/s
    frame= 4170 fps=159 q=23.0 size= 15667kB time=00:02:19.64 bitrate= 919.1kbits/s
    frame= 4263 fps=160 q=22.0 size= 15898kB time=00:02:22.50 bitrate= 914.0kbits/s
    frame= 4357 fps=160 q=22.0 size= 16117kB time=00:02:25.72 bitrate= 906.0kbits/s
    frame= 4427 fps=160 q=22.0 size= 16356kB time=00:02:28.05 bitrate= 905.0kbits/s
    frame= 4506 fps=160 q=22.0 size= 16579kB time=00:02:30.86 bitrate= 900.3kbits/s
    frame= 4610 fps=161 q=21.0 size= 16843kB time=00:02:34.13 bitrate= 895.2kbits/s
    frame= 4679 fps=161 q=-1.0 Lsize= 17157kB time=00:02:36.13 bitrate= 900.2kbits/s
    video:15178kB audio:1830kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.876626%
    [libx264 @ 0x341e940] frame I:62 Avg QP: 8.97 size: 9009
    [libx264 @ 0x341e940] frame P:3240 Avg QP:13.14 size: 4080
    [libx264 @ 0x341e940] frame B:1377 Avg QP:12.82 size: 1281
    [libx264 @ 0x341e940] consecutive B-frames: 54.9% 15.9% 5.0% 24.2%
    [libx264 @ 0x341e940] mb I I16..4: 49.0% 31.0% 20.0%
    [libx264 @ 0x341e940] mb P I16..4: 5.3% 10.4% 2.5% P16..4: 13.4% 8.8% 5.9% 0.0% 0.0% skip:53.6%
    [libx264 @ 0x341e940] mb B I16..4: 1.1% 1.0% 0.5% B16..8: 12.9% 5.5% 1.4% direct: 3.4% skip:74.2% L0:43.6% L1:46.4% BI:10.0%
    [libx264 @ 0x341e940] final ratefactor: 14.30
    [libx264 @ 0x341e940] 8x8 transform intra:53.7% inter:53.9%
    [libx264 @ 0x341e940] coded y,uvDC,uvAC intra: 30.3% 65.3% 39.9% inter: 8.7% 15.2% 3.6%
    [libx264 @ 0x341e940] i16 v,h,dc,p: 54% 28% 10% 8%
    [libx264 @ 0x341e940] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 24% 34% 2% 2% 2% 2% 2% 2%
    [libx264 @ 0x341e940] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 27% 19% 3% 5% 4% 4% 3% 2%
    [libx264 @ 0x341e940] i8c dc,h,v,p: 56% 23% 17% 4%
    [libx264 @ 0x341e940] Weighted P-Frames: Y:17.3% UV:12.4%
    [libx264 @ 0x341e940] ref P L0: 76.0% 5.7% 12.5% 5.0% 0.8%
    [libx264 @ 0x341e940] ref B L0: 88.0% 11.0% 1.0%
    [libx264 @ 0x341e940] ref B L1: 97.7% 2.3%
    [libx264 @ 0x341e940] kb/s:796.36




    ==================================================================
    H.264 SHIFT MOOV ATOM
    ==================================================================

    H.264 Shift Moov Atom Command: /home/vide02/public_html/cc-core/system/bin/qtfaststart /home/vide02/public_html/cc-content/uploads/h264/ws3fYNiamt9600cBbc6P_temp.mp4 /home/vide02/public_html/cc-content/uploads/h264/ws3fYNiamt9600cBbc6P.mp4 >> /home/vide02/public_html/cc-core/logs/ws3fYNiamt9600cBbc6P.log 2>&1

    H.264 Shift Moov Atom Output:


    /usr/bin/env: python
    : No such file or directory
  • please help me that as am i able to upload videos.
    thanks in advance
  • The processing failed during the qtfaststart part. That script is written in Python. Do you have Python installed properly on your server?
  • Hi Damian,

    I have communicate with the pacific host they said the python is installed on your server.

    root@server [~]# which python
    /usr/bin/python
    root@server [~]# which python2.6
    /usr/bin/python2.6

    Again i try to upload the video, the system log show the same code.

    my video setting are:

    PHP Path: /usr/local/bin/php
    FFMPEG Path: /usr/local/bin/ffmpeg

    please assist.

  • edited April 2015
    After some research, you either have one of two problems.

    a) The error you received:

    /usr/bin/env: python
    : No such file or directory

    Indicates that there is a return character (\r) in the first line of:

    /cc-core/system/bin/qtfaststart

    That is a Python script provided by CumulusClips. This could happen because of setting in your FTP client, or someone edited the file, or some other obscure reason. Ultimately it needs to be a line feed (\n).

    You can run this command from the root of the site on the command line:

    dostounix cc-core/system/bin/qtfaststart

    Make sure dostounix is installed first. Another option is to change the line endings manually. Just download the file, change the line endings to Unix (\n), save the file and reupload.

    b) The other possible reason I suspect is that the Python path isn't being detected automatically since your host has more than one version.

    To fix this you can try to change the file: /cc-core/system/encode.php on line 17.

    Change: DOC_ROOT
    To: '/usr/bin/python ' . DOC_ROOT

    The Python path is the one that was provided by your host in your earlier post.

    Try one of those things and let us know how it worked out.
  • thankyou Damian,

    the solution (a) works for me :)

    Thanks alot
This discussion has been closed.