Opened 8 years ago

Closed 8 years ago

#1606 closed defect (fixed)

WMP have problem with wma files generated by FFmpeg (slider is set at the end)

Reported by: ami_stuff Owned by:
Priority: important Component: avformat
Version: git-master Keywords: asf regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: yes


When I play wma file (with WMP) encoded by FFmpeg then the slider is automaticly set at the end of the playback.

The problem is probably that FFmpeg writes $FFFFFF in some place. When I repleace it with $000000 then WMP's slider is set at the beginning of the playback and moves forward correctly.

I have created this patch to mark the place where I'm in the file:


    /* movie chunk, followed by packets of packet_size */
    asf->data_offset = cur_pos;
    ff_put_guid(pb, &ff_asf_data_header);
    avio_wl64(pb, data_chunk_size);
    ff_put_guid(pb, &ff_asf_my_guid);
-    avio_wl64(pb, asf->nb_packets); /* nb packets */
+    avio_wl64(pb, 0x2222222222222222);
    avio_w8(pb, 1); /* ??? */
    avio_w8(pb, 1); /* ??? */

When you look at the attached screenshot then you will notice these 0x22..., after them
there are problematic $FFFFFF, but I'm not sure what it is. When I modify them to $000000
then WMP's slider is set at the beginning of the playback, not at the end.

C:\>ffmpeg -i file.avi -vn -acodec wmav2 out.wma
ffmpeg version N-43160-g752344d Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug  3 2012 02:38:06 with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.
  configuration: --prefix=/var/www/users/research/ffmpeg/snapshots/build --arch=
x86 --target-os=mingw32 --cross-prefix=i686-pc-mingw32- --cc='ccache i686-pc-min
gw32-gcc' --enable-w32threads --enable-memalign-hack --enable-runtime-cpudetect
--enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -
lwinmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snap
shots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/s
napshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3
--enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-
libvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libmp3lame --enable-libvpx --disable-decoder=libvpx
  libavutil      51. 66.100 / 51. 66.100
  libavcodec     54. 48.100 / 54. 48.100
  libavformat    54. 22.100 / 54. 22.100
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3.  5.101 /  3.  5.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[wmv3 @ 0x1ead6e0] WMV3 Complex Profile is not fully supported
Input #0, avi, from 'file.avi':
  Duration: 00:23:53.53, start: 0.000000, bitrate: 58 kb/s
    Stream #0:0: Video: wmv3 (Complex) (WMV3 / 0x33564D57), yuv420p, 640x480, 29
.97 tbr, 29.97 tbn, 29.97 tbc
    Stream #0:1: Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, s16, 14
7 kb/s
      title           : gs1 AC3 T01 2_0ch 448Kbps DELAY 0ms
Output #0, asf, to 'out.wma':
    WM/EncodingSettings: Lavf54.22.100
    Stream #0:0: Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, stereo, s16, 128
      title           : gs1 AC3 T01 2_0ch 448Kbps DELAY 0ms
Stream mapping:
  Stream #0:1 -> #0:0 (aac -> wmav2)
Press [q] to stop, [?] for help
size=     988kB time=00:00:53.76 bitrate= 150.6kbits/s
video:0kB audio:840kB subtitle:0 global headers:0kB muxing overhead 17.643010%

Attachments (1)

wmpwma.jpg (189.0 KB) - added by ami_stuff 8 years ago.

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by ami_stuff

comment:1 Changed 8 years ago by ami_stuff

git-e01f478 19-Mar-2012 - ok
git-4082198 25-Mar-2012 - bad

ffmpeg -i test.wav -acodec wmav2 out.wma

comment:2 Changed 8 years ago by cehoyos

  • Keywords asf regression added
  • Priority changed from normal to important
  • Version changed from unspecified to git-master

comment:3 follow-up: Changed 8 years ago by michael

Please try -avoid_negative_ts 1, if it works ill make it default for asf/wma.

comment:4 in reply to: ↑ 3 Changed 8 years ago by ami_stuff

Replying to michael:

Please try -avoid_negative_ts 1, if it works ill make it default for asf/wma.

Tested - it fixes the problem.

comment:5 Changed 8 years ago by michael

  • Analyzed by developer set
  • Component changed from undetermined to avformat
  • Resolution set to fixed
  • Status changed from new to closed

thanks, should be fixed in my next push then

Note: See TracTickets for help on using tickets.