Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
every time I try to upload a video, it fails after starting to transcode. I am using ffmpeg to transcode.
this is what it says on the page the video is supposed to display on:
The video conversion process has failed. You might want to submit a simpler video format like mpeg or divx avi.
If the problem persists contact your website administrator. Please check logs for further debugging.
and what it shows in the log:
Video conversion failed. Could not create the directory: public://videos/converted/257
any help would be greatly appreciated.
Comments
Comment #1
Jorrit CreditAttribution: Jorrit commentedPlease check the permissions of your
sites/____/files
directory. The webserver user must be able to create subdirectories.Comment #2
Jorrit CreditAttribution: Jorrit commentedClosed because of lack of response.
Comment #3
yaoweizhen CreditAttribution: yaoweizhen commentedAlways failed. This my log:
/usr/bin/ffmpeg -i '/Users/Mike/htdocs/invisalign/core/sites/default/files/videos/original/building_exterior_video_update.wmv' -strict experimental -vcodec 'h264' -qscale '6' -s '640x360' -acodec 'aac' -ac '2' -pass '2' -passlogfile '/private/tmp/1365234654-515fd3deb0442-multipass' -y /private/tmp/1365234654-515fd3deb02bb.mp4
ffmpeg version 1.2-tessus Copyright (c) 2000-2013 the FFmpeg developers
built on Mar 15 2013 01:18:55 with llvm-gcc 4.2.1 (LLVM build 2336.1.00)
configuration: --prefix=/Users/tessus/data/ext/ffmpeg/sw --as=yasm --extra-version=tessus --disable-shared --enable-static --disable-ffplay --enable-gpl --enable-pthreads --enable-postproc --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libspeex --enable-bzlib --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxavs --enable-version3 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvpx --enable-libgsm --enable-libopus --enable-fontconfig --enable-libfreetype --enable-libass --enable-filters --enable-runtime-cpudetect
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[wmv3 @ 0x10203bc00] Extra data: 8 bits left, value: 0
[asf @ 0x102016400] max_analyze_duration 5000000 reached at 5100000 microseconds
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, asf, from '/Users/Mike/htdocs/invisalign/core/sites/default/files/videos/original/building_exterior_video_update.wmv':
Metadata:
WMFSDKNeeded : 0.0.0.0000
DeviceConformanceTemplate: MP
WMFSDKVersion : 12.0.7601.17514
IsVBR : 0
Duration: 00:02:40.47, start: 0.000000, bitrate: 16700 kb/s
Stream #0:0: Video: mjpeg, yuvj420p, 1440x1080, 90k tbr, 90k tbn, 90k tbc
Metadata:
comment : Movie/video screen capture
Stream #0:1: Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:2: Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 1440x1080, 24000 kb/s, 29.97 tbr, 1k tbn, 1k tbc
Please use -q:a or -q:v, -qscale is ambiguous
[libx264 @ 0x1020e0200] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
[libx264 @ 0x1020e0200] constant rate-factor is incompatible with 2pass.
Output #0, mp4, to '/private/tmp/1365234654-515fd3deb02bb.mp4':
Metadata:
WMFSDKNeeded : 0.0.0.0000
DeviceConformanceTemplate: MP
WMFSDKVersion : 12.0.7601.17514
IsVBR : 0
Stream #0:0: Video: h264, yuv420p, 640x360, q=-1--1, pass 2, 90k tbn, 29.97 tbc
Stream #0:1: Audio: none, 48000 Hz, stereo, fltp, 128 kb/s
Stream mapping:
Stream #0:2 -> #0:0 (wmv3 -> libx264)
Stream #0:1 -> #0:1 (wmav2 -> aac)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Comment #4
Jorrit CreditAttribution: Jorrit commentedThe error is:
Solution: Either enable "Force one-pass encoding" for your preset, or set the "Video bitrate" setting to some bitrate.
Comment #5
yaoweizhen CreditAttribution: yaoweizhen commentedThanks. It woks by your solution.
Is the 2pass necessary?
This is help text for video bitrate:
"A target bitrate in kbps. Not necessary if you select a Video Quality setting, unless you want to target a specific bitrate."
It's a little confusing.
Comment #6
Jorrit CreditAttribution: Jorrit commentedThere would be use-cases for a targeting a specific bit-rate, like storage constraints. In that case, two-pass helps you achieve a better visual result by first examining the input data in pass one and then doing the actual transcoding in pass two. In that sense, the encoder knows "what's coming" and is better able to target the bitrate you want. I should perhaps add code that ignores two-pass when no bit rate has been entered.
Comment #7
yaoweizhen CreditAttribution: yaoweizhen commented