Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#131 closed enhancement (fixed)

add support for (maybe broken) *.divx file

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

Description

http://kakonacl.dip.jp/PlayerTry/TestMovies/Others/DivX6.11_MP3(Vidomi).divx

the file may be broken, but "Media Player Classic" and "VLC Player" can play it, so let it be playable with ffplay as well

C:\>ffmpeg -i C:\DivX6.11_MP3(Vidomi).divx
FFmpeg version git-N-29181-ga304071, Copyright (c) 2000-2011 the FFmpeg develope
rs
  built on Apr 18 2011 21:24:03 with gcc 4.5.2
  configuration: --enable-gpl --enable-version3 --enable-runtime-cpudetect --ena
ble-memalign-hack --enable-avisynth --enable-bzlib --enable-frei0r --enable-libo
pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --
enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
 --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl
e-libx264 --enable-libxavs --enable-libxvid --enable-zlib --cross-prefix=i686-w6
4-mingw32- --target-os=mingw32 --arch=x86_32 --extra-cflags=-I/home/kyle/softwar
e/ffmpeg/external-libraries/win32/include --extra-ldflags=-L/home/kyle/software/
ffmpeg/external-libraries/win32/lib --pkg-config=pkg-config
  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. 79. 0 /  1. 79. 0
  libswscale    0. 13. 0 /  0. 13. 0
[avi @ 01CEC000] scale/rate is 0/0 which is invalid. (This file has been generated by broken software.)
[avi @ 01CEC000] unknown stream type 73627573
C:\DivX6.11_MP3(Vidomi).divx: Operation not permitted

Attachments (3)

divx.avi (2.0 MB ) - added by Carl Eugen Hoyos 10 years ago.
JUMPSTAR.AVI (1.2 MB ) - added by ami_stuff 10 years ago.
avidec.diff (607 bytes ) - added by ami_stuff 10 years ago.

Change History (10)

comment:1 by Carl Eugen Hoyos, 10 years ago

Component: undeterminedavformat
Reproduced by developer: set
Status: newopen
Type: defectenhancement
Version: unspecifiedgit-master

Plays fine with mplayer -demuxer avi

by Carl Eugen Hoyos, 10 years ago

Attachment: divx.avi added

comment:2 by reimar, 10 years ago

Do you have any other info on the file? Patch below allows playback, but the subtitle format is not xsub it seems, any idea what it might be??
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 9395dc2..af8b023 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -532,6 +532,8 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)

case MKTAG('a', 'u', 'd', 's'):

codec_type = AVMEDIA_TYPE_AUDIO;
break;

+ case MKTAG('s', 'u', 'b', 's'):
+ st->codec->codec_id = CODEC_ID_XSUB;

case MKTAG('t', 'x', 't', 's'):

codec_type = AVMEDIA_TYPE_SUBTITLE;
break;

@@ -656,7 +658,8 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)

break;

case AVMEDIA_TYPE_SUBTITLE:

st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;

  • st->request_probe= 1;

+ if (st->codec->codec_id == CODEC_ID_NONE)
+ st->request_probe= 1;

break;

default:

st->codec->codec_type = AVMEDIA_TYPE_DATA;

comment:3 by ami_stuff, 10 years ago

Sorry no info (just a random file found with Google).

comment:4 by ami_stuff, 10 years ago

It is acceptable to just ignore the unknown stream? Here is another file which plays with mplayer/vlc/xing/mpc, but not with ffplay (ffmpeg).

by ami_stuff, 10 years ago

Attachment: JUMPSTAR.AVI added

by ami_stuff, 10 years ago

Attachment: avidec.diff added

in reply to:  4 comment:5 by Michael Niedermayer, 10 years ago

Replying to ami_stuff:

It is acceptable to just ignore the unknown stream? Here is another file which plays with mplayer/vlc/xing/mpc, but not with ffplay (ffmpeg).

patch applied

comment:6 by Carl Eugen Hoyos, 10 years ago

Resolution: fixed
Status: openclosed

comment:7 by Carl Eugen Hoyos, 10 years ago

Keywords: avi added
Note: See TracTickets for help on using tickets.