Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
FFmpeg failed to transcode - Error while opening encoder for output stream
26 août 2013, par Nikhil MReported errors
PHPVideoToolkit error: Execute error. It was not possible to encode "/home/onevid/public_html/sites/default/files/videos/original/qw_1.mpg" as FFmpeg returned an error. The error is with the video codec of the input file. FFmpeg reports the error to be "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height".
Executed commands and output
/usr/local/bin/ffmpeg -i '/home/onevid/public_html/sites/default/files/videos/original/qw_1.mpg' -vf 'scale=540:360' -strict experimental -vcodec 'h263' -qscale '12' -acodec 'aac' -ac '2' -pass '1' -passlogfile '/tmp/1377530626-521b73028a987-multipass' -y /tmp/1377530626-521b73028a7ea.mp4 ffmpeg version 1.2.2 Copyright (c) 2000-2013 the FFmpeg developers built on Aug 26 2013 15:10:42 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3) configuration: --disable-yasm 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 [mpeg @ 0x2e89160] max_analyze_duration 5000000 reached at 5015467 microseconds Input #0, mpeg, from '/home/onevid/public_html/sites/default/files/videos/original/qw_1.mpg': Duration: 00:00:14.00, start: 0.011978, bitrate: 3235 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 1:1 DAR 3:2], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc Stream #0:1[0x1c0]: Audio: mp2, 44100 Hz, stereo, s16p, 160 kb/s Please use -q:a or -q:v, -qscale is ambiguous [h263 @ 0x2e8b180] The specified picture size of 540x360 is not valid for the H.263 codec. Valid sizes are 128x96, 176x144, 352x288, 704x576, and 1408x1152. Try H.263+. Output #0, mp4, to '/tmp/1377530626-521b73028a7ea.mp4': Stream #0:0: Video: h263, yuv420p, 540x360 [SAR 1:1 DAR 3:2], q=2-31, pass 1, 200 kb/s, 90k tbn, 29.97 tbc Stream #0:1: Audio: none, 44100 Hz, stereo, fltp, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (mpeg2video -> h263) Stream #0:1 -> #0:1 (mp2 -> aac) Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
-
How to mux .h264 bitstream into avi using ffmpeg/avconv with required fps ?
26 août 2013, par Kristians KuhtaHow to mux .h264 bitstream into avi container using ffmpeg/avconv? I tryied launching Python subprocess with args:
ffmpeg -f h264 -r 30/1 -y -i input.h264 -vcodec copy -r 30/1 output.avi
but when I open the .avi file with vlc it shows in codec info FPS= 1199999.99..., so obiously something is wrong. How do I force the Fps to output avi file?
-
kxmovie in ffmpeg cannot play mp3 in device
26 août 2013, par s.mile.kIn ios,Using ffmpeg decoding audio stream, reference kxmovie mechanism, using the player source code, found in the simulator can normally play a variety of formats, but really play mp3 / mp2 appears bursts bursts of sound! Ffmpeg decoding is normal, now don't know what is going wrong, the simulator BitsPerChannel is 16, device was 32, but all other audio format. Other sampling formats into s16, normal, don't only s16p, sampling format conversion error? What's the problem
-
Where the decoded frame by ffmepg stored ?
26 août 2013, par JarI try to decode video and convert frame to rgb32 or gb565le format.
Then pass this frame from C to Android buffer by JNI.
So far, I know to how pass buffer from C to Android as well as how to decode video and get decoded frame.
My question is how to convert decoded frame to rgb32 (or rgb565le) and where is it stored?
The following is my code, I'm not sure is correct or not.
-Jargo
img_convert_ctx = sws_getContext(pCodecCtx->width, pCodecCtx->height, pCodecCtx->pix_fmt, 100, 100, PIX_FMT_RGB32, SWS_BICUBIC, NULL, NULL, NULL); if(!img_convert_ctx) return -6; while(av_read_frame(pFormatCtx, &packet) >= 0) { // Is this a packet from the video stream? if(packet.stream_index == videoStream) { avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet); // Did we get a video frame? if(frameFinished) { AVPicture pict; if(avpicture_alloc(&pict, PIX_FMT_RGB32, 100, 100) >= 0) { sws_scale(img_convert_ctx, (const uint8_t * const *)pFrame->data, pFrame->linesize, 0, pCodecCtx->height, pict.data, pict.linesize); } } // End of if( frameFinished ) } // End of if( packet.stream_index == videoStream ) // Free the packet that was allocated by av_read_frame av_free_packet(&packet); }
-
How to convert 1920x1200 HD video from MOV to MP4 without change of the original size [on hold]
25 août 2013, par user2618501I have a 1920x1200, 50 fps MOV file that I want to convert to MP4. I tried several converters on Mac but all create a MP4 file with 1728x1080 resolution.
I also tried to convert the video using ffmpeg. This created a very small MP4 file with the desired size but with a horrible quality. I used
ffmpeg -i my.mov -r 50 1920.mp4
Is there some better way to convert MOV to MP4 while keeping the original resolution and quality?