-
Notifications
You must be signed in to change notification settings - Fork 92
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
Unable to process video #4
Comments
You should try to transcode the video with the streamio ffmpeg gem and make sure your ffmpeg install is correct. The preset files are here: http://www.mediasoftpro.com/aspnet-x264-presets.html I should probably update the docs with this info. |
I've updated the readme with notes about the presets. Closing this issue. |
Thanks. The link would be very helpful in readme. |
I added it! :) |
Could you help me how can I change preset from slow to medium? I tried to set custom parameter with "-preset medium". It still used slow preset. Thanks. |
Can you put the flags that it is being run with here so I can debug it? @coreyti Would custom params allow for overriding the presets? |
@vladimeeer and @rheaton, yes :custom will allow you to specify custom presets, and more. e.g.,
|
...note that if you're on ffmpeg 0.11, I think the parameter changed for h264 presets. from -vpre to -preset |
I've installed ffmpeg 0.11. I use following flags in video uploader: process encode_video: [:mp4, resolution: :same, custom: "- preset medium -pix_fmt yuv420p"] I got error: Video Failed to transcode with FFmpeg. Check ffmpeg install and verify video is not corrupt or cut short. Original error: undefined method `/' for nil:NilClass On Aug 13, 2012, at 4:33 PM, Rachel Heaton wrote:
|
wow! that is not a very helpful error message :) do you have a logger set up? i believe that will show the actual ffmpeg command as run. might be helpful. On Aug 14, 2012, at 6:06 PM, vladimeeer notifications@github.com wrote:
|
No, it's not very helpful :) How can I setup logger to see what command ran?
there is an error message: Video Failed to transcode with FFmpeg. Check ffmpeg install and verify video is not corrupt or cut short. Original error: Failed encoding. Errors: encoded file is invalid. Full output: ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers built on Jun 24 2012 17:41:42 with llvm_gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) configuration: --prefix=/usr/local/Cellar/ffmpeg/0.11.1 --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-libfreetype --cc=/usr/bin/llvm-gcc --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libass --enable-libvo-aacenc --disable-ffplay libavutil 51. 54.100 / 51. 54.100 libavcodec 54. 23.100 / 54. 23.100 libavformat 54. 6.100 / 54. 6.100 libavdevice 54. 0.100 / 54. 0.100 libavfilter 2. 77.100 / 2. 77.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/milan/github/lettr/tmp/uploads/20120817-1548-771-5368/ForPitch.mp4': Metadata: major_brand : mp42 minor_version : 1 compatible_brands: M4V mp42isom creation_time : 2011-08-22 20:50:24 Duration: 00:01:37.52, start: 0.000000, bitrate: 266 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 800x600 [SAR 1:1 DAR 4:3], 216 kb/s, 15 fps, 15 tbr, 15k tbn, 30 tbc Metadata: creation_time : 2011-08-22 20:50:24 handler_name : Video Media Handler Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 47 kb/s Metadata: creation_time : 2011-08-22 20:50:24 handler_name : Sound Media Handler Please use -q:a or -q:v, -qscale is ambiguous [buffer @ 0x7fd74bc16040] w:800 h:600 pixfmt:yuv420p tb:1/15000 sar:1/1 sws_param:flags=2 [buffersink @ 0x7fd74bc16260] No opaque field provided [scale @ 0x7fd74bc15c00] w:800 h:600 fmt:yuv420p sar:1/1 -> w:640 h:480 fmt:yuv420p sar:1/1 flags:0x4 [NULL @ 0x7fd74c047200] [Eval @ 0x7fff641ef800] Undefined constant or missing '(' in 'bpyramid' [NULL @ 0x7fd74c047200] Unable to parse option value "bpyramid+mixed_refs+wpred+dct8x8+fastpskip+mbtree-wpred-dct8x8+mbtree" [NULL @ 0x7fd74c047200] Error setting option flags2 to value +bpyramid+mixed_refs+wpred+dct8x8+fastpskip+mbtree-wpred-dct8x8+mbtree. Output #0, mp4, to '/Users/milan/github/lettr/tmp/uploads/20120817-1548-771-5368/tmpfile.mp4': Metadata: major_brand : mp42 minor_version : 1 compatible_brands: M4V mp42isom creation_time : 2011-08-22 20:50:24 Stream #0:0(eng): Video: none, yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 90k tbn, 15 tbc Metadata: creation_time : 2011-08-22 20:50:24 handler_name : Video Media Handler Stream #0:1(eng): Audio: none, 44100 Hz, stereo, s16, 128 kb/s Metadata: creation_time : 2011-08-22 20:50:24 handler_name : Sound Media Handler Stream mapping: Stream #0:0 -> #0:0 (h264 -> libx264) Stream #0:1 -> #0:1 (aac -> libfaac) Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height |
Hi Vladimeer- Were able to get streamio-ffmpeg to transcode the video without the gem options, or just using ffmpeg command line to transcode the video? We saw an error like this when trying to work with a video that did not upload to completion, and there was nothing we could do about it. Our mac was able to play is with quicktime, but ffmpeg's mp4 library couldn't work with it. @coreyti correct me if my memory is failing. ;) |
were able to encode video in rails console with streamio-ffmpeg.
Here is result: Running transcoding... How did you solved your problem with that? It didn't work from me on local either on s3. Thanks. |
Did you ever get this working? Looks like the flags sent to ffmpeg from my gem are not correct. You should be able to get this by setting the logger. You should also tail your application log as some stuff is written to standard out by the ffmpeg gem, I think. |
This has to do with a change between how the h.264 flags are set between ffmpeg versions 0.10 and 0.11: -vpre (I believe it was) became -preset. With the current version of carrierwave-vidoe, this can be accomplished using the :custom option. Coreyhttp://about.me/coreyti On Tuesday, September 4, 2012 at 7:09 PM, Rachel Heaton wrote:
|
Actually, I have never got working this. I will try it with custom parameters this weekend. I am using it on my Thanks a lot for your help. I am glad for any help with :) |
Today, I took a look on the video processing. I set logger to get actual ffmpeg command. Video precessing was as you can see below: There was this command in log. Even I set custom parameter. It wasn't in the actual command. |
Hi there, I am trying to process MP4 video to video with different resolution. There is used custom parameter.
Parameters for processing:
process encode_video: [:mp4, :resolution => "1280x720", :custom => "-pix_fmt yuv420p"]
There is an error that slow profile wasn't found.
Failed to transcode with FFmpeg. Check ffmpeg install and verify video is not corrupt or cut short. Original error: Failed encoding. Errors: no output file created. Full output: ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
built on Jun 24 2012 17:41:42 with llvm_gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
configuration: --prefix=/usr/local/Cellar/ffmpeg/0.11.1 --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-libfreetype --cc=/usr/bin/llvm-gcc --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libass --enable-libvo-aacenc --disable-ffplay
libavutil 51. 54.100 / 51. 54.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.100 / 54. 6.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/milan/github/lettr/tmp/uploads/20120809-0843-3534-7339/M4H00620.MP4':
Metadata:
major_brand : MSNV
minor_version : 19595353
compatible_brands: MSNVmp42isom
creation_time : 2010-08-21 17:37:22
Duration: 00:00:33.53, start: 0.000000, bitrate: 8908 kb/s
Stream #0:0(und): Video: mpeg4 (Advanced Coding Profile) (mp4v / 0x7634706D), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 8842 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc
Metadata:
creation_time : 2010-08-21 17:37:22
handler_name : Video Media Handler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 24000 Hz, mono, s16, 64 kb/s
Metadata:
creation_time : 2010-08-21 17:37:22
handler_name : Sound Media Handler
Please use -q:a or -q:v, -qscale is ambiguous
File for preset 'slow' not found
The text was updated successfully, but these errors were encountered: