MG 1.1 Problem Transcoding

KawaiiHannah

Active member
I have transcode enabled so that members can post avi, 3gp but I get the error message
Unfortunately, the video file you uploaded named VIDEO NAME could not be processed. Please upload a different video and try again.
 
If it’s not working on any videos then there could be a problem but if it’s just one or two then it could just be a problem with the video itself.
 
If you go to Admin CP > Applications > Gallery Options and then click "Save Changes" do you get any errors reported related to FFmpeg?

Also are there any server error logs in the Admin CP related to this?
 
No but heres the error log I get
Here's the server Error Log

Code:
Error Info
XenForo_Exception: Video uploaded by video name failed to be transcoded. - library/XenGallery/Helper/Video.php:579
Generated By: Unknown Account, 50 minutes ago
Code:
Stack Trace
#0 /var/www/vhosts/domain/httpdocs/library/XenGallery/Helper/Video.php(480): XenGallery_Helper_Video->_transcodeException(Array, 'xengallery_vide...', Array)
#1 /var/www/vhosts/domain/httpdocs/library/XenGallery/Helper/video-transcode.php(57): XenGallery_Helper_Video->finalizeTranscode(Array, '/var/www/vhosts...')
#2 {main}
Code:
Request State
array(3) {
  ["url"] => string(7) "http://"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Ok.

We need to see what FFmpeg is actually saying about these videos so ideally you need to manually upload the video to your server (via FTP or similar). Uploading it to your XF web root might be easier (e.g. /var/www/vhosts/domain/httpdocs where domain is your domain name).

Then you need to cd into that directory.

Then you need to get your FFmpeg binary path out of your options, e.g. /usr/bin/ffmpeg (or whatever it might be).

Then you need to run the following command:
Code:
/path/to/ffmpeg -y -i <video.extension> -vcodec libx264 -acodec aac -ar 48000 -ac 2 -movflags faststart transcoded.mp4
Obviously you'll have to replace <video.extension> with the actual file name of the video you want to transcode.

Try and copy and paste the full output here if possible.
 
Output is the following
Code:
[root@svr muffins]# /usr/bin/ffmpeg -y -i <02-02-11_2017.3gp> -vcodec libx264 -acodec aac -ar 48000 -ac 2 -movflags faststart transcoded.mp4
ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --enable-libfaac --enable-nonfree --enable-libfdk-aac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  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
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
libx264: No such file or directory
 
New output
Code:
[root@svr muffins]# /usr/bin/ffmpeg -y -i 02-02-11_2017.3gp -vcodec libx264 -acodec aac -ar 48000 -ac 2 -movflags faststart transcoded.mp4
ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --enable-libfaac --enable-nonfree --enable-libfdk-aac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  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
  libavresample   2.  1.  0 /  2.  1.  0
  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 '02-02-11_2017.3gp':
  Metadata:
    major_brand     : 3gp4
    minor_version   : 512
    compatible_brands: 3gp4
    creation_time   : 2011-02-02 20:16:52
  Duration: 00:00:30.40, start: 0.000000, bitrate: 279 kb/s
    Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 272 kb/s, 12.36 fps, 12.33 tbr, 48k tbn, 15 tbc (default)    Metadata:
      creation_time   : 2011-02-02 20:16:52
      handler_name    : vide
    Stream #0:1(und): Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 12 kb/s (default)
    Metadata:
      creation_time   : 2011-02-02 20:16:52
      handler_name    : soun
[libx264 @ 0x1e30780] using SAR=1/1
[libx264 @ 0x1e30780] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
[libx264 @ 0x1e30780] profile High, level 1.2
[libx264 @ 0x1e30780] 264 - core 142 r2495 6a301b6 - 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=9 lookahead_threads=1 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=12 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[aac @ 0x1e3e4e0] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.
[aac @ 0x1e3e4e0] Alternatively use the non experimental encoder 'libfaac'.
[root@svr muffins]#
 
I had a 50% chance of guessing which audio codec you had...

Try:
Code:
/usr/bin/ffmpeg -y -i 02-02-11_2017.3gp -vcodec libx264 -acodec libvo_aacenc -ar 48000 -ac 2 -movflags faststart transcoded.mp4
 
Output is
Code:
[root@svr muffins]# /usr/bin/ffmpeg -y -i 02-02-11_2017.3gp -vcodec libx264 -acodec libvo_aacenc -ar 48000 -ac 2 -movflags faststart transcoded.mp4
ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --enable-libfaac --enable-nonfree --enable-libfdk-aac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  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
  libavresample   2.  1.  0 /  2.  1.  0
  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 '02-02-11_2017.3gp':
  Metadata:
    major_brand     : 3gp4
    minor_version   : 512
    compatible_brands: 3gp4
    creation_time   : 2011-02-02 20:16:52
  Duration: 00:00:30.40, start: 0.000000, bitrate: 279 kb/s
    Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 272 kb/s, 12.36 fps, 12.33 tbr, 48k tbn, 15 tbc (default)    Metadata:
      creation_time   : 2011-02-02 20:16:52
      handler_name    : vide
    Stream #0:1(und): Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 12 kb/s (default)
    Metadata:
      creation_time   : 2011-02-02 20:16:52
      handler_name    : soun
Unknown encoder 'libvo_aacenc'
[root@svr muffins]#
 
Right... That's likely the problem, then... Though I wasn't necessarily aware there could be situations where neither of the codecs we support are available.
Code:
/usr/bin/ffmpeg -y -i 02-02-11_2017.3gp -vcodec libx264 -acodec aac -strict -2 -ar 48000 -ac 2 -movflags faststart transcoded.mp4
That seems like it would work.
 
Back
Top Bottom