FFMPEG av_interleaved_write_frame(): Operation not permitted - ffmpeg

Ok I receiving a 'av_interleaved_write_frame(): Operation not permitted' error while trying to encode an MOV file. Firstly I need to outline the conditions behind it.
I am encoding 12 different files of different resolution sizes and format types via a PHP script that runs on cron. Basically it grabs a 250mb HD MOV file and encodes it in 4 different frame sizes as MOV, MP4 and WMV file types.
Now the script takes over 10mins to run and encode each of the files for the 250mb input file. I am outputting the processing times and as soon as the time on the script hits 10mins FFMPEG crashes and returns "av_interleaved_write_frame(): Operation not permitted" for the current file being encoded and all other remaining files yet to be encoded.
If the input videos is 150MB the total time the script runs for is under 10mins so it encodes all of the videos fine. Additionally if I run the FFMPEG command on the individual file that it fails on for the 250mb file it encodes the file with no issues.
From doing to research on the error "av_interleaved_write_frame()" it seems it is related to timestamps of what I understand to be of the input file. But in saying that it doesn't seem to be the case in my instance because I can encode the file with no problem if I do it individually.
example ffmpeg command
ffmpeg -i GVowbt3vsrXL.mov -s 1920x1080 -sameq -vf "unsharp" -y GVowbt3vsrXL_4.wmv
Error output on the failed file at 10mins. Remember there is no issue with the command if I run it by itself it is only when the script hits 10mins.
'output' =>
array (
0 => 'FFmpeg version SVN-r24545, Copyright (c) 2000-2010 the FFmpeg developers',
1 => ' built on Aug 20 2010 23:32:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)',
2 => ' configuration: --enable-shared --enable-gpl --enable-pthreads --enable-nonfree --cpu=opteron --extra-cflags=\'-O3 -march=opteron -mtune=opteron\' --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-avfilter --enable-filter=movie --enable-avfilter-lavf --enable-swscale',
3 => ' libavutil 50.23. 0 / 50.23. 0',
4 => ' libavcore 0. 1. 0 / 0. 1. 0',
5 => ' libavcodec 52.84. 1 / 52.84. 1',
6 => ' libavformat 52.77. 0 / 52.77. 0',
7 => ' libavdevice 52. 2. 0 / 52. 2. 0',
8 => ' libavfilter 1.26. 1 / 1.26. 1',
9 => ' libswscale 0.11. 0 / 0.11. 0',
10 => 'Input #0, mov,mp4,m4a,3gp,3g2,mj2, from \'/home/hdfootage/public_html/process/VideoEncode/_tmpfiles/GVowbt3vsrXL/GVowbt3vsrXL.mov\':',
11 => ' Metadata:',
12 => ' major_brand : qt',
13 => ' minor_version : 537199360',
14 => ' compatible_brands: qt',
15 => ' Duration: 00:00:20.00, start: 0.000000, bitrate: 110802 kb/s',
16 => ' Stream #0.0(eng): Video: mjpeg, yuvj422p, 1920x1080 [PAR 72:72 DAR 16:9], 109386 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc',
17 => ' Stream #0.1(eng): Audio: pcm_s16be, 44100 Hz, 2 channels, s16, 1411 kb/s',
18 => '[buffer # 0xdcd0e0] w:1920 h:1080 pixfmt:yuvj422p',
19 => '[unsharp # 0xe00280] auto-inserting filter \'auto-inserted scaler 0\' between the filter \'src\' and the filter \'Filter 0 unsharp\'',
20 => '[scale # 0xe005b0] w:1920 h:1080 fmt:yuvj422p -> w:1920 h:1080 fmt:yuv420p flags:0xa0000004',
21 => '[unsharp # 0xe00280] effect:sharpen type:luma msize_x:5 msize_y:5 amount:1.00',
22 => '[unsharp # 0xe00280] effect:none type:chroma msize_x:0 msize_y:0 amount:0.00',
23 => 'Output #0, asf, to \'/home/hdfootage/public_html/process/VideoEncode/_tmpfiles/GVowbt3vsrXL/GVowbt3vsrXL_4.wmv\':',
24 => ' Metadata:',
25 => ' WM/EncodingSettings: Lavf52.77.0',
26 => ' Stream #0.0(eng): Video: msmpeg4, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 1k tbn, 25 tbc',
27 => ' Stream #0.1(eng): Audio: libmp3lame, 44100 Hz, 2 channels, s16, 64 kb/s',
28 => 'Stream mapping:',
29 => ' Stream #0.0 -> #0.0',
30 => ' Stream #0.1 -> #0.1',
31 => 'Press [q] to stop encoding',
32 => '[msmpeg4 # 0xdccb50] warning, clipping 1 dct coefficients to -127..127',
Then it errors
frame= 75 fps= 5 q=1.0 size= 12704kB time=2.90 bitrate=3588 6.0kbits av_interleaved_write_frame(): Operation not permitted',
)
Has any anybody encountered this sort of problem before? It seems to be something to do with the timestamps but only because the script is running for a period longer then 10mins. It maybe related to PHP/Apache config but I don't know if it is FFMPEG or if it is server config I need to be looking at.

One trivially solvable cause for this problem (if you found this question while searching for this problem, as I did) is when the partition you are trying to write your file to is full. Make sure you have enough available space to write your file to. On linux/unix this is as easy as running
$ df -h
To solve, just free up enough space by moving files to another partition, deleting unwanted files, and emptying your trash.

this patch (linked from ffmpeg issue 807's page) solved the problem for me reencoding video and copying audio out of a live captured flv file to an avi file:
https://roundup.ffmpeg.org/file1098/utils.c.patch

I encounter this issue when I was trying to mux 1920x1080 video in mpeg transportstream using custom AVIOContext like this:
mAVIOBufferSize = 1024 * 10;
mAVIOBuffer = static_cast<unsigned char *>(av_malloc(mAVIOBufferSize));
mAVIOContext = avio_alloc_context(
mAVIOBuffer,
mAVIOBufferSize,
1,
this,
NULL,
write_packet,
NULL
);
mOutputContext->pb = mAVIOContext;
The problem was that my mAVIOBufferSize was too small for some of the the data av_interleaved_write_frame function wanted to pass to write_packet function.
I solved this by increasing the mAVIOBufferSize
mAVIOBufferSize = 1024 * 1024;
And the error disappeared.

Related

ffmpeg live rtmp stream does not start to process for long time

I have rtmp stream created by flash player in h264 but when i convert it to video or tumbnail using ffmpeg it some times works after very very long time and some time not work but if I create a stream with Flash Media live encoder on same FMS server the command below works fine. At the same time if I try the stream in player it works well and fine.
I am using IP so DNS resolving issue is not possible either I think.
ffmpeg -i rtmp://xxx.xxx.xx.xx/live/bdeef2c065509361e78fa8cac90aac741cc5ee29 -r 1 -an -updatefirst 1 -y thumbnail.jpg
Following is when it worked aftre 15 - 20 minutes
ffmpeg -i "rtmp://xxx.xxx.xx.xx/live/bdeef2c065509361e78fa8cac90aac741cc5ee29 live=1" -r 1 -an -updatefirst 1 -y thumb.jpg
[root#test ~]# ffmpeg -i rtmp://38.125.41.20/live/bdeef2c065509361e78fa8cac90aac741cc5ee29 -r 1 -an -updatefirst 1 -y thumbnail.jpg
ffmpeg version N-49953-g7d0e3b1-syslint Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 14 2013 15:29:40 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-decoder=liba52 --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --extra-version=syslint
libavutil 52. 17.101 / 52. 17.101
libavcodec 54. 91.103 / 54. 91.103
libavformat 54. 63.100 / 54. 63.100
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 37.101 / 3. 37.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[flv # 0x14c0100] Stream #1: not enough frames to estimate rate; consider increasing probesize
[flv # 0x14c0100] Could not find codec parameters for stream 1 (Audio: none, 0 channels): unspecified sample format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[flv # 0x14c0100] Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from 'rtmp://xxx.xxx.xx.xx/bdeef2c065509361e78fa8cac90aac741cc5ee29':
Metadata:
keyFrameInterval: 15
quality : 90
level : 3.1
bandwith : 0
codec : H264Avc
fps : 15
profile : baseline
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (Baseline), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 15 tbr, 1k tbn, 30 tbc
Stream #0:1: Audio: none, 0 channels
Output #0, image2, to 'thumbnail.jpg':
Metadata:
keyFrameInterval: 15
quality : 90
level : 3.1
bandwith : 0
codec : H264Avc
fps : 15
profile : baseline
encoder : Lavf54.63.100
Stream #0:0: Video: mjpeg, yuvj420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 1 tbc
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mjpeg)
Press [q] to stop, [?] for help
frame= 2723 fps=1.3 q=1.6 size=N/A time=00:45:23.00 bitrate=N/A dup=8 drop=12044
and on stopping the stream by closing the browser running the flash player which is publishing the video I get the following
[flv # 0x23684e0] Could not find codec parameters for stream 1 (Audio: none, 0 channels): unspecified sample format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[flv # 0x23684e0] Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from 'rtmp://xxx.xxx.xx.xx/live/bdeef2c065509361e78fa8cac90aac741cc5ee29':
Metadata:
keyFrameInterval: 15
quality : 90
bandwith : 0
level : 3.1
codec : H264Avc
fps : 15
profile : baseline
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (Baseline), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 15 tbr, 1k tbn, 30 tbc
Stream #0:1: Audio: none, 0 channels
when if i stop the stream it quickly creates a thumbnail file where as running stream is an issue.
I found the reason and cause of this, if a stream created by flash not no microphone selected the audio channel is 0 in rtmp published stream so for that reason the audio codec part of rtmp goes into some kind of loop and not returns and goes further . I have found the cause . but looking for a way to get rid if this loop incase there is no audio channel . may be might have to modify the source code of rtmp and compile again .

How to create a video from png images using ffmpeg

I want to create a video from different png images. My code is:
ffmpeg -r 20 -f image2 -i slideshow/%d.png -y -s 320x240 -aspect 4:3 out.mp4
and i receive output:
FFmpeg version SVN-r26400, Copyright (c) 2000-2011 the FFmpeg developers
built on Sep 27 2011 00:47:07 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)
configuration: --enable-avfilter --enable-filter=fade
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 1 / 0.16. 1
libavcodec 52.108. 0 / 52.108. 0
libavformat 52.93. 0 / 52.93. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1.74. 0 / 1.74. 0
libswscale 0.12. 0 / 0.12. 0
Input #0, image2, from 'slideshow/%d.png':
Duration: 00:00:00.25, start: 0.000000, bitrate: N/A
Stream #0.0: Video: png, rgb24, 720x471, 20 fps, 20 tbr, 20 tbn, 20 tbc
[buffer # 0x9687230] w:720 h:471 pixfmt:rgb24
[scale # 0x9687600] w:720 h:471 fmt:rgb24 -> w:320 h:240 fmt:yuv420p flags:0xa0000004
Output #0, mp4, to 'out.mp4':
Metadata:
encoder : Lavf52.93.0
Stream #0.0: Video: mpeg4, yuv420p, 320x240 [PAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 20 tbn, 20 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
Segmentation fault
What might be the problem? Please help...
Currently i am using centos 5 server.
At last i found a fix for the problem. I don't know why but in case of png images of multiple size, ffmpeg was not creating the video but when i used png images of same size video was created without error. So, i cut similar size thumnails from images and create video using those thumbnails and i was able to generate the slideshow...

FFMPEG - Scale video filter not providing expected results

Apologies if this question has been asked. I couldn't find it, but if it has, please let me know and I'll close this out.
I'm attempting a simple scale of a video whose original dimensions are 480x360 and whose target dimensions are 400x300. The video starts as an FLV and eventually needs to end up as an MPEG. I'm using the following command line to do this:
ffmpeg -i user.flv -vf "scale=400:300" user_scaled.mpg
When I play the scaled video in MPEG Streamclip, the scale is correct and the video info shows that the dimensions are 400x300. However, when I play the scaled video in Quicktime, the video is scaled to 478x359. More importantly, FFMPEG, itself, treats the video as being 478x359, so any future commands (trimming, conversion, overlaying, etc) executed on it result in a video of 478x359.
The initial workflow required an FLV to MPEG conversion, but I've tried this with several different in and out formats (FLV -> FLV, FLV -> MPEG, MPEG -> MPEG, etc) all with the same results. As long as I can end up with an MPEG, though, I can deal with however many steps and conversions it would take to get this scaling working.
I'll paste the command-line output below, and a sample input video is also linked below, if you'd like it. Thank you very much for any help.
http://www.monkeydriver.com/dpassera/stack_flv.zip
Command-line output:
ffmpeg -i user.flv -vf "scale=400:300" user_scaled.mpg
ffmpeg version 0.7-rc1, Copyright (c) 2000-2011 the FFmpeg developers
built on May 21 2011 22:13:19 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--mandir=/usr/share/man --incdir=/usr/include --disable-avisynth
--extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC'
--enable-avfilter --enable-libdirac --enable-libgsm --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264
--enable-gpl --enable-postproc --enable-pthreads --enable-shared
--enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
--disable-yasm --enable-filters --enable-filter=movie
libavutil 50. 40. 1 / 50. 40. 1
libavcodec 52.120. 0 / 52.120. 0
libavformat 52.108. 0 / 52.108. 0
libavdevice 52. 4. 0 / 52. 4. 0
libavfilter 1. 77. 0 / 1. 77. 0
libswscale 0. 13. 0 / 0. 13. 0
libpostproc 51. 2. 0 / 51. 2. 0
[flv # 0x11dd3b30] Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from 'user.flv':
Metadata:
duration : 5
videocodecid : 2
audiocodecid : 6
canSeekToEnd : true
createdby : FMS 4.0
creationdate : Mon Oct 31 11:43:44 2011
Duration: 00:00:04.62, start: 0.000000, bitrate: N/A
Stream #0.0: Video: flv, yuv420p, 640x480, 1k tbr, 1k tbn, 1k tbc
Stream #0.1: Audio: nellymoser, 44100 Hz, mono, s16
[buffer # 0x11ddc950] w:640 h:480 pixfmt:yuv420p
[scale # 0x11dda610] w:640 h:480 fmt:yuv420p -> w:400 h:300 fmt:yuv420p flags:0xa0000004
[mpeg # 0x11dd6bd0] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'user_scaled.mpg':
Metadata:
duration : 5
videocodecid : 2
audiocodecid : 6
canSeekToEnd : true
createdby : FMS 4.0
creationdate : Mon Oct 31 11:43:44 2011
encoder : Lavf52.108.0
Stream #0.0: Video: mpeg1video, yuv420p, 400x300, q=2-31, 200 kb/s, 90k tbn, 60 tbc
Stream #0.1: Audio: mp2, 44100 Hz, mono, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 230 fps= 0 q=10.2 size= 366kB time=3.82 bitrate= 785.6kbits/s dup=175 drop=0
frame= 267 fps= 0 q=10.7 Lsize= 412kB time=4.43 bitrate= 761.3kbits/s dup=203 drop=0
video:370kB audio:36kB global headers:0kB muxing overhead 1.568959%
After much gnashing of teeth, I think the problem has nothing to do with ffmpeg, and everything to do with Quicktime.
Quicktime Player (10.1 (501.5)) scales videos to match the size of the window, and has a minimum window size. So regardless of the actual video size, Quicktime will scale it to at least 480 by 360. This is why the info display has size information in the "Format" section (the true size), but also has a "Current Size" section. Changing the window size changes that latter number.
So, scale videos using ffmpeg either with -vf scale or just -s, but don't trust Quicktime Player to show them to you at the correct size. I recommend VLC as a very capable alternative.

FFMPEG FLV to 3GP more than 176x144 size

I am converting my.flv to my.gp3 with this command
ffmpeg -i my.flv -acodec libamr_nb -s 176x144 -ar 8000 -b 120000 -vcodec h263 -ab 10.2k -ac 1 my.3gp
but size of my flv is 320x240 and I am trying change 176x144 to 320x240 but getting 3gp file with 0kb , how can I do that and get my.3gp file with same size like my.flv
And one more thing , the my.flv is product of converting from my.swf(vide) , if you know some command which will do swf->3gp with same size it would be better .
Thanks a lot.
I used your command line with my copy of ffmpeg (bundled with Xuggler) and it produced perfect output. There were some warnings but it didn't affect the output.
E:\media\New>ffmpeg -i red5.flv -acodec libamr_nb -s 176x144 -ar 8000 -b 120000 -vcodec h263 -ab 10.
2k -ac 1 my.3gp
FFmpeg version SVN-r24930-xuggle-4.0.896, Copyright (c) 2000-2010 the FFmpeg developers
built on Aug 25 2010 23:41:31 with gcc 4.2.4 (TDM-1 for MinGW)
configuration: --prefix=/usr/xuggle --extra-version=xuggle-4.0.896 --extra-cflags=-I/usr/home/Paul
/code/trunk/java/xuggle-xuggler/build/native/i686-pc-mingw32/captive/usr/xuggle/include --extra-ldfl
ags=-L/usr/home/Paul/code/trunk/java/xuggle-xuggler/build/native/i686-pc-mingw32/captive/usr/xuggle/
lib --enable-shared --enable-gpl --enable-nonfree --enable-version3 --enable-libx264 --enable-libmp3
lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libopencore-amrnb --enable-lib
opencore-amrwb --extra-cflags=-mno-cygwin --extra-cflags=-fno-common --extra-ldflags=-mno-cygwin --e
xtra-ldflags=--out-implib --enable-w32threads --enable-memalign-hack
libavutil 50.24. 0 / 50.24. 0
libavcore 0. 6. 0 / 0. 6. 0
libavcodec 52.86. 1 / 52.86. 1
libavformat 52.78. 3 / 52.78. 3
libavdevice 52. 2. 1 / 52. 2. 1
libavfilter 1.38. 1 / 1.38. 1
libswscale 0.11. 0 / 0.11. 0
[flv # 007d9f20] Estimating duration from bitrate, this may be inaccurate
Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 11.99 (12000/
1001)
Input #0, flv, from 'red5.flv':
Metadata:
duration : 1
width : 480
height : 360
videodatarate : 0
framerate : 12
videocodecid : 4
filesize : 27733
Duration: 00:00:01.33, start: 0.167000, bitrate: N/A
Stream #0.0: Video: vp6f, yuv420p, 480x368, 11.99 tbr, 1k tbn, 1k tbc
[buffer # 007de2f0] w:480 h:368 pixfmt:yuv420p
[scale # 007dee70] w:480 h:368 fmt:yuv420p -> w:176 h:144 fmt:yuv420p flags:0xa0000004
Output #0, 3gp, to 'my.3gp':
Metadata:
encoder : Lavf52.78.3
Stream #0.0: Video: h263, yuv420p, 176x144, q=2-31, 120 kb/s, 12k tbn, 11.99 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
[h263 # 006cc200] warning, clipping 1 dct coefficients to -127..127
Last message repeated 10 times
[h263 # 006cc200] warning, clipping 2 dct coefficients to -127..127
Last message repeated 1 times
[h263 # 006cc200] warning, clipping 1 dct coefficients to -127..127
Last message repeated 3 times
[h263 # 006cc200] warning, clipping 2 dct coefficients to -127..127
[h263 # 006cc200] warning, clipping 1 dct coefficients to -127..127
[h263 # 006cc200] warning, clipping 2 dct coefficients to -127..127
[h263 # 006cc200] warning, clipping 1 dct coefficients to -127..127
frame= 13 fps= 0 q=1.6 Lsize= 24kB time=1.08 bitrate= 182.3kbits/s
video:23kB audio:0kB global headers:0kB muxing overhead 3.130478%

FFMPEG wmv conversion to flv

anyone using ffmpeg
I have a fairly simple wmv exported by a user from movie maker with standard output and want to convert to .flv using
C:>ffmpeg -i "E:\Jab Core 4 Recounters.wmv" -vcodec flv "C:\Net Projects\SVN\IntegratedAlgorithmics\src\MediaAdmin\MediaAdmin\bin\Debug\Movies\Jab Core 4 Recounters.flv" -ar 44100
the output / error i receive is
FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-swscale --enable-avfilt
er --enable-avfilter-lavf --enable-pthreads --enable-avisynth --enable-libfaac -
-enable-libfaad --enable-libmp3lame --enable-libspeex --enable-libtheora --enabl
e-libvorbis --enable-libxvid --enable-libx264 --enable-memalign-hack
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 16 2009 16:09:18, gcc: 4.2.4 [Sherpya]
[wmv3 # 0x1c0d490]Extra data: 8 bits left, value: 0
Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000
/1) -> 30.00 (30/1)
Input #0, asf, from 'E:\Jab Core 4 Recounters.wmv':
Duration: 00:01:55.99, start: 5.000000, bitrate: 813 kb/s
Stream #0.0: Audio: wmav2, 48000 Hz, stereo, s16, 192 kb/s
Stream #0.1: Video: wmv3, yuv420p, 640x480, 586 kb/s, 30 tbr, 1k tbn, 1k tbc
Output #0, flv, to 'C:\Net Projects\SVN\IntegratedAlgorithmics\src\MediaAdmin\Me
diaAdmin\bin\Debug\Movies\Jab Core 4 Recounters.flv':
Stream #0.0: Video: flv, yuv420p, 640x480, q=2-31, 200 kb/s, 90k tbn, 30 tbc
Stream #0.1: Audio: libmp3lame, 48000 Hz, stereo, s16, 64 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Stream #0.0 -> #0.1
[wmv3 # 0x1c0d490]Extra data: 8 bits left, value: 0
[libmp3lame # 0x1c0d8d0]flv does not support that sample rate, choose from (4410
0, 22050, 11025).
Could not write header for output file #0 (incorrect codec parameters ?)
i added th -ar switch when i got the error the first time
the codec info i have on the file is as follows
General
Complete name : E:\Jab Core 4 Recounters.wmv
Format : Windows Media
File size : 11.3 MiB
Duration : 2mn 0s
Overall bit rate mode : Variable
Overall bit rate : 780 Kbps
Maximum Overall bit rate : 949 Kbps
Encoded date : UTC 2009-03-07 07:02:41.121
Writing application : 6.0.6000.16386 / Windows Movie Maker
Application : Windows Movie Maker 6.0.6000.16386
Video
ID : 2
Format : VC-1
Format profile : MP#ML
Codec ID : WMV3
Codec ID/Info : Windows Media Video 9
Codec ID/Hint : WMV3
Duration : 2mn 0s
Bit rate mode : Variable
Bit rate : 587 Kbps
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 4/3
Frame rate : 30.000 fps
Resolution : 24 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.064
Stream size : 8.46 MiB (75%)
Language : en-us
Audio
ID : 1
Format : WMA2
Format profile : L3
Codec ID : 161
Codec ID/Info : Windows Media Audio 2
Description of the codec : Windows Media Audio 9.2 - VBR Quality 90, 48 kHz, stereo 1-pass VBR
Duration : 2mn 0s
Bit rate mode : Variable
Bit rate : 186 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Resolution : 16 bits
Stream size : 2.68 MiB (24%)
Language : en-us
i see alot of people with this issue with so solution or cause
any ideas would be helpful
thanks in advance
In ffmpeg, options must prefix the input file they relate to. Move -ar 44100 to the front and it will work.
I know question already has an answer but I thought it might help someone.
If you are facing the audio sample rate issue please use the following command
ffmpeg -i video.avi -ar 22050 video.flv
-i input file name
-ar audio sampling rate in Hz
For what little help it may be, you can see that the source audio is at 48khz, and flv is refusing it. ffmpeg is apparently ignoring your -ar flag. Your first step needs to be to resample the audio... you could try transcoding to some intermediary format to get the sample rate converted, and then transcode from there to flv.
More precisely: in ffmpeg, options must prefix the output file they relate to. Move -ar 44100 to the front of the output filename and it will work.

Resources