Opened 13 years ago
Closed 11 years ago
#2289 closed defect (fixed)
ffplay loops audio on eof on Windows
| Reported by: | feelart | Owned by: | Marton Balint |
|---|---|---|---|
| Priority: | normal | Component: | ffplay |
| Version: | git-master | Keywords: | SDL |
| Cc: | cus@passwd.hu | Blocked By: | |
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
1/ ffmpeg.exe -i loopBug20130216.mov -vn outMP3.mp3
2/ ffplay out101MP3.mp3
Same if
ffmpeg.exe -i loopBug20130216.mov -vn outAAC.aac
Also tested & confirmed with FFMpeg 1.0.1 & 1.1.1
P.S. Can you also reproduce the bug 2284 I reported.
F:\danses\Salsa\Salsa Odance>ffmpeg.exe -i loopBug20130216.mov -vn outMP3.mp3
ffmpeg version N-49997-gb9c5448 Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 16 2013 02:32:10 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-lib
mp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-am
rwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
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.103 / 3. 37.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'loopBug20130216.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf54.63.100
Duration: 00:00:00.30, start: 0.018000, bitrate: 29756 kb/s
Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuvj420p, 1280x720, 46817 kb/s, 50 fps, 50 tbr, 50k tbn, 100k tbc
Metadata:
handler_name : DataHandler
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s
Metadata:
handler_name : DataHandler
Output #0, mp3, to 'outMP3.mp3':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
TSSE : Lavf54.63.100
Stream #0:0(eng): Audio: mp3, 48000 Hz, stereo, s16p
Metadata:
handler_name : DataHandler
Stream mapping:
Stream #0:1 -> #0:0 (pcm_s16le -> libmp3lame)
Press [q] to stop, [?] for help
size= 6kB time=00:00:00.31 bitrate= 145.5kbits/s
video:0kB audio:5kB subtitle:0 global headers:0kB muxing overhead 5.915179%
F:\danses\Salsa\Salsa Odance>
Attachments (3)
Change History (12)
by , 13 years ago
| Attachment: | loopBug20130216.mov added |
|---|
comment:2 by , 13 years ago
| Priority: | important → normal |
|---|
Could you explain what the issue with the file you uploaded is? I don't understand...
comment:3 by , 13 years ago
1/
ffplay loopBug20130216COR.mov
You'll hear 6 sec(SIX) of audio, then loops after these 6 sec (well it happens because it's a cut of a NON corrupted mov, but ffmpeg doesn't properly close the stream; CLI "ffmpeg.exe -t 6 -i "2011-01-28 Salsa2.mov" -acodec copy -vn loopBug20130216COR.mov")
So that my first post was incorrect in the reproducability, but not in the bug.
In trying to cut the original file(700Mb) to fit in your 2MB limit( by the way, would be nice to raise limit to 8Mb), I first did a mistake in isolation, sorry.
2/
ffmpeg.exe -t 3 -i loopBug20130216COR.mov outMP3.mp3
3/
ffplay outMP3.mp3
You'll hear that after 3 sec the audio loops, as if the audio stream is incorrectly closed, this seems like the fixing of bug 1435.
Trying aac convertion leads to same bug.
Correct test file is thus loopBug20130216COR.mov
comment:4 by , 13 years ago
Do I understand correctly that there is no bug with the first sample you uploaded?
If the second sample fails with a ffmpeg command line, please provide the command line together with the complete, uncut console output. If the sample works fine with ffmpeg but fails somehow with ffplay, please provide the failing ffplay command line together with the complete, uncut console output.
The second sample plays fine here with "ffplay loopBug20130216COR.mov" and "ffplay loopBug20130216COR.mov -autoexit". I also tested reencoding with "ffmpeg -i loopBug20130216COR.mov out.mp2" and "ffmpeg -i loopBug20130216COR.mov -strict -2 out.aac" and both output files play fine.
comment:5 by , 13 years ago
I run Win7 64bits.
ffplay loopBug20130216COR.mov or ffplay out.aac (as with your "ffmpeg -i loopBug20130216COR.mov -strict -2 out.aac"
Play buggy with FFmpeg(0.8 & 1.0.1 & 1.1.1 & 2013-02-16) or SMplayer AFTER 6sec.
It's not your case??
comment:6 by , 13 years ago
| Component: | undetermined → FFplay |
|---|---|
| Keywords: | SDL added |
| Version: | unspecified → git-master |
The problem - that sound loops with ffplay on eof - is reproducible both with the Zeranoe builds and with a binary compiled with current SDL 1.2.15 binary release.
I don't know if this is a bug in SDL or if the current behaviour can be improved in ffplay.
comment:7 by , 13 years ago
| Summary: | Audio: pcm_s16le (sowt / 0x74776F73) extraction bug → ffplay loops audio on eof on Windows |
|---|
by , 11 years ago
| Attachment: | 0001-ffplay-do-not-block-audio-thread-on-WIN32.patch added |
|---|
comment:8 by , 11 years ago
| Cc: | added |
|---|---|
| Owner: | set to |
| Status: | new → open |
Could you try the attached patch?
comment:9 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | open → closed |
Should be fixed in b1f78632c681f32c4901a85aa7ee72bf9ca6fece.



Audio extraction leads to loop