Ticket #870 (closed defect: invalid)
Transcoding a file. Is this output actually an error?
| Reported by: | himanshu | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | FFmpeg |
| Version: | git-master | Keywords: | |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
Hi Team,
I am trying to transcode a file. And getting the following output, while integrating with the application I am getting this as an error output. The confusion here is:
- Is there a problem with the audio file (attached the original one)?
- FFMpeg is returning a non-zero value by mistake.
I am attaching the original audio file for your reference.
C:\Users\himanshu.bhardwaj>ffmpeg -y -i _contents.wav -acodec pcm_mulaw output.wav
ffmpeg version N-31548-g78accb8, Copyright (c) 2000-2011 the FFmpeg developers built on Jul 17 2011 22:41:27 with gcc 4.6.1 configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame--enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 11. 0 / 51. 11. 0
libavcodec 53. 8. 0 / 53. 8. 0
libavformat 53. 6. 0 / 53. 6. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 27. 0 / 2. 27. 0
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0
[wav @ 000000000028EEE0] max_analyze_duration 5000000 reached at 5120000
Input #0, wav, from '_contents.wav':
Duration: 00:00:15.44, bitrate: 64 kb/s
Stream #0.0: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s
Output #0, wav, to 'output.wav':
Metadata:
encoder : Lavf53.6.0
Stream #0.0: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s
Stream mapping:
Press [q] to stop, ? for help
size= 121kB time=00:00:15.44 bitrate= 64.0kbits/s
video:0kB audio:121kB global headers:0kB muxing overhead 0.045335%
Attachments
Change History
Changed 17 months ago by himanshu
-
attachment
_contents.wav
added
comment:1 Changed 17 months ago by cehoyos
Works as expected on Linux, which return value do you see (and how do you test the value on Windows)?
$ ffmpeg -y -i _contents.wav -acodec pcm_mulaw output.wav
ffmpeg version N-36389-g2ba3416, Copyright (c) 2000-2012 the FFmpeg developers
built on Jan 3 2012 13:15:08 with gcc 4.5.3
configuration: --cc='/usr/local/gcc-4.5.3/bin/gcc -m32'
libavutil 51. 33.100 / 51. 33.100
libavcodec 53. 50.100 / 53. 50.100
libavformat 53. 29.100 / 53. 29.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 57.101 / 2. 57.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 5.100 / 0. 5.100
Input #0, wav, from '_contents.wav':
Duration: 00:00:03.98, bitrate: 64 kb/s
Stream #0:0: Audio: pcm_mulaw ([7][0][0][0] / 0x0007), 8000 Hz, 1 channels, s16, 64 kb/s
Output #0, wav, to 'output.wav':
Metadata:
encoder : Lavf53.29.100
Stream #0:0: Audio: pcm_mulaw ([7][0][0][0] / 0x0007), 8000 Hz, 1 channels, s16, 64 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (pcm_mulaw -> pcm_mulaw)
Press [q] to stop, [?] for help
size= 31kB time=00:00:03.98 bitrate= 64.1kbits/s
video:0kB audio:31kB global headers:0kB muxing overhead 0.182161%
$ echo "$?"
0
comment:2 follow-up: ↓ 3 Changed 17 months ago by himanshu
Yes I checked the code again the return value is coming out to be zero only. But the strange thing is why STDOUT stream is empty while STDERR is giving the output, could it be due to log levels in the FFMPEG app.
I am testing this by wrapping Java code around FFMpeg, so basically I run the java program from which I call FFMpeg internally.
Also on comparing with the standard output I found this line:
[wav @ 0000000001C5F2E0] max_analyze_duration 5000000 reached at 5120000
Is it informational or does it hold specific significance? Am going through the documentation side-by-side to figure out meaning of this line.
Code highlighting:
09:43:00.339 [pool-1-thread-8] DEBUG ffmpeg.FFMpegProcessor - FFMpeg output:
09:43:00.882 [pool-1-thread-8] DEBUG ffmpeg.FFMpegProcessor - FFMpeg error output:ffmpeg version N-31548-g78accb8, Copyright (c) 2000-2011 the FFmpeg developers
built on Jul 17 2011 22:41:27 with gcc 4.6.1
configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 11. 0 / 51. 11. 0
libavcodec 53. 8. 0 / 53. 8. 0
libavformat 53. 6. 0 / 53. 6. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 27. 0 / 2. 27. 0
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0
[wav @ 0000000001C5F2E0] max_analyze_duration 5000000 reached at 5120000
Input #0, wav, from 'C:\Users\HIMANS~1.BHA\AppData\Local\Temp\mp_231.wav':
Duration: 00:00:15.44, bitrate: 32 kb/s
Stream #0.0: Audio: adpcm_ima_wav, 8000 Hz, 1 channels, s16, 32 kb/s
Output #0, wav, to 'C:\Users\HIMANS~1.BHA\AppData\Local\Temp\mp_232.wav':
Metadata:
encoder : Lavf53.6.0
Stream #0.0: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop, [?] for help
Multiple frames in a packet from stream 0
size= 121kB time=00:00:15.44 bitrate= 64.0kbits/s
video:0kB audio:121kB global headers:0kB muxing overhead 0.045335%
comment:3 in reply to: ↑ 2 Changed 17 months ago by cehoyos
- Status changed from new to closed
- Resolution set to invalid
Replying to himanshu:
Yes I checked the code again the return value is coming out to be zero only. But the strange thing is why STDOUT stream is empty while STDERR is giving the output, could it be due to log levels in the FFMPEG app.
Given that FFmpeg supports pipe output, this is definitely intended.
[wav @ 0000000001C5F2E0] max_analyze_duration 5000000 reached at 5120000
Is it informational or does it hold specific significance?
It means when trying to find out the duration of your file, FFmpeg stopped after scanning more than the default size (5000000) that you can change with -analyzeduration



Original audio file for reference