Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#12509 closed bug (fixed)

FFmpeg media plugin broken since using libresample

Reported by: vidrep Owned by: nobody
Priority: high Milestone: R1/beta1
Component: Add-Ons/Media Version: R1/Development
Keywords: Cc: ttcoder
Blocked By: Blocking: #12517, #12535
Has a Patch: no Platform: All

Description

hrev49888 x86_gcc2 Tested several different HD formats which cause MediaPlayer to crash AVCHD (m2ts), 4K UHD (mp4), and 1080p (divx) Opened each in terminal Debug reports attached Test logs attached

Attachments (13)

MediaPlayer-597-debug-28-11-2015-11-29-27.report (26.7 KB) - added by vidrep 3 years ago.
test_AVCHD_M2TS.log (22.6 KB) - added by vidrep 3 years ago.
MediaPlayer-631-debug-28-11-2015-11-29-46.report (22.5 KB) - added by vidrep 3 years ago.
test_4K_MP4.log (2.9 KB) - added by vidrep 3 years ago.
MediaPlayer-664-debug-28-11-2015-11-29-58.report (22.2 KB) - added by vidrep 3 years ago.
test_1080p_Divx.log (1.3 KB) - added by vidrep 3 years ago.
MediaPlayer-3435-debug-29-11-2015-06-28-58.report (20.5 KB) - added by kim1963 3 years ago.
mp3 file hrev49893 debug
MediaPlayer-2579-debug-29-11-2015-09-39-12.report (22.8 KB) - added by kim1963 3 years ago.
avi file hrev49893 debug
MediaPlayer-628-debug-29-11-2015-07-44-57.report (22.8 KB) - added by vidrep 3 years ago.
Fighter.mpg (2.1 MB) - added by vidrep 3 years ago.
debugger.log (2.2 KB) - added by vidrep 3 years ago.
SoundPlay-3250-debug-30-11-2015-08-15-20.report (29.5 KB) - added by kim1963 3 years ago.
flac file hrev49895 debug
MediaPlayer-3698-debug-30-11-2015-08-20-05.report (20.4 KB) - added by kim1963 3 years ago.
flac file hrev49985 debug 2

Change History (33)

Changed 3 years ago by vidrep

Attachment: test_AVCHD_M2TS.log added

Changed 3 years ago by vidrep

Attachment: test_4K_MP4.log added

Changed 3 years ago by vidrep

Attachment: test_1080p_Divx.log added

comment:1 Changed 3 years ago by vidrep

These same video files did not previously cause a crash in MediaPlayer. The last known working revision was hrev49856.

comment:2 Changed 3 years ago by Barrett

Cc: ttcoder added

Changed 3 years ago by kim1963

mp3 file hrev49893 debug

Changed 3 years ago by kim1963

avi file hrev49893 debug

comment:3 Changed 3 years ago by vidrep

I did a pkgman update from hrev49888 to hrev49893 and now nothing plays without crashing MP. Build bots? I'll try downloading hrev49893 and do a fresh install to see if it makes a difference.

comment:4 Changed 3 years ago by vidrep

As with 64 bit, I did another pkgman update from hrev49893 (not working) to hrev49894, and it works again. My testing did trigger a single crash report on a file which played normally when I tried a second time. I have attached it in the hope it might shed light on the problem.

comment:5 Changed 3 years ago by vidrep

I did a fresh install of hrev49893 and the behaviour is as before. However, doing a pkgman update to hrev49893 from an earlier revision produces a system that crashes MP. I was able to duplicate this same behaviour on 64 bit as well. There is a codec problem, but it is being compounded by another entirely different issue that probably deserves its own ticket. Advice anyone?

comment:6 Changed 3 years ago by vidrep

I have attached the video clip that generated the MediaPlayer-628-debug-29-11-2015-07-44-57.report that I posted earlier.

Changed 3 years ago by vidrep

Attachment: Fighter.mpg added

comment:7 Changed 3 years ago by vidrep

hrev49894 x86_gcc2 Attempting to open a video file caused the system to KDL. After a reboot, I opened the syslog and copied the relevant information (see attached debugger.log).

Last edited 3 years ago by vidrep (previous) (diff)

Changed 3 years ago by vidrep

Attachment: debugger.log added

Changed 3 years ago by kim1963

flac file hrev49895 debug

Changed 3 years ago by kim1963

flac file hrev49985 debug 2

comment:8 Changed 3 years ago by ttcoder

Ran pkgman up on a hint (thanks vidrep), but in hrev49901 BMediaFile still crashes on "resampling failed" on most audio and many video files, no change for me. So what is the situation, is this....

Replying to Barrett:

Just wanted to mention that i tested both files today and they don't crash under gcc4h. I'm of course building Haiku by myself.

... still true ? In other words, do the build bots and self-built images behave the same, as of now, or is there still a difference.

If there is no more behavior inconsistency [i.e. if it now crashes for everybody, including Barret, pulkomandy ..etc], I guess the remaining lead to follow is pulkomandy's lead regarding ffmpeg possibly mis-identifying audio data as protracker mod audio? Anything we can do to help, tell us if so

Last edited 3 years ago by ttcoder (previous) (diff)

comment:9 Changed 3 years ago by diver

Blocking: 12517 added

comment:10 Changed 3 years ago by Barrett

Under my install the file still play correctly, gcc4 based builds seems to behave correctly, vidrep tested it some days ago too while I don't know if he done it with nightlies.

comment:11 Changed 3 years ago by vidrep

Barrett,

I'm doing all my testing on x86_gcc2 and x86_64 nightlies, updating to latest revision before testing.

There is a difference in behavior due to the ffmpeg version being used. I am only testing video playback - not mp3, wav, ogg or any other audio formats. Those should probably be in a separate ticket. As of hrev49908 x86_gcc2 still behaves exactly as described in the ticket description - SD video playback appears normal, HD playback crashes MediaPlayer. The same applies to ticket #12508 - HD video playback is normal, SOME SD video causes a MediaPlayer crash.

comment:12 Changed 3 years ago by diver

Component: Applications/MediaPlayerAdd-Ons/Media
Milestone: UnscheduledR1/beta1
Owner: changed from stippi to nobody
Summary: MediaPlayer (x86_gcc2) crashes on HD format videoMediaPlayer crashes in ffmpeg media plugin

comment:13 Changed 3 years ago by waddlesplash

Priority: normalblocker
Summary: MediaPlayer crashes in ffmpeg media pluginFFmpeg media plugin broken since using libresample

Every WAV and MP3 file I tried to play resulted in a crash. Running from Terminal, there is some relevant info before the crash:

[SWR @ 0x183b3cb0] Input channel count and layout are unset
_InitFromTrack(): keyframes: 1, frame count: 23493
running without video node
Assertion a->planar failed at libswresample/swresample.c:284
Abort

comment:14 Changed 3 years ago by waddlesplash

For quick testing, the first file at http://www-mmsp.ece.mcgill.ca/documents/audioformats/wave/Samples.html will produce this result.

comment:15 Changed 3 years ago by waddlesplash

Priority: blockerhigh

Reverted the commit in hrev49929. Still leaves the earlier issues, though.

comment:16 Changed 3 years ago by diver

Blocking: 12535 added

comment:17 Changed 3 years ago by pulkomandy

I rewrote the code using swr_convert, and from what I could test (mp3 and aac audio) it seems to work for both ffmpeg 0.10 and 2.4. If you still have problems with this, I don't need tons of logs and bugreports. I would prefer links to broken files. It would be nice to test files that are available online, for example from http://samples.ffmpeg.org/ so everyone can work from the same set of files.

comment:18 Changed 3 years ago by markh

I still have the same problem and I found a file in the ffmpeg test files. Try the following one: http://samples.ffmpeg.org/A-codecs/WMA/mplayer_sample-audio_0x161.wmv

It crashes with the assertion a->planar error on my system (revision hrev49938 on x86_gcc2)

comment:19 Changed 3 years ago by pulkomandy

Resolution: fixed
Status: newclosed

@markh: so, it does not crash with "resampling failed" as with all reports submitted here. This means it is not the same problem. Please open a new ticket and attach a debugger report.

I think this one can be closed now.

comment:20 Changed 3 years ago by markh

I created a new ticket (see #12547) for the assertion error.

Note: See TracTickets for help on using tickets.