#3233: PSP PMF audio -------------------------------------+------------------------------------- Reporter: cehoyos | Owner: Type: enhancement | Status: new Priority: wish | Component: Version: git-master | undetermined Keywords: mpegps pmf | Resolution: atrac3 atrac3p videolan | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+-------------------------------------
Comment (by bazz): == Solution Found for PMF Freezing == I have discovered why the ATRAC3+ parsing failed on my PMF sample and have made a solution. The problem was that the ATRAC3+ parser did not properly process a buffer that only contains one full header. I am attaching both a complete patch (parser.diff), and a patch that shows only my changes from https://ffmpeg.org/pipermail/ffmpeg-devel/2014-December/166169.html (parser_partial.diff) == ffmpeg Mod to Transcode PMF == Using the latest FFmpeg from Github (7d17d31db4322b0c5e89f889ebf32af9ca2d91a9), ffplay works out of the box with the PMF patch. But, I found that I have to modify one more thing for the ffmpeg tool to work. Let me detail the issue, then provide the solution. Here is a log of an attempt to transcode a PMF to avi. {{{ bazz@awesomesauce ~/Code/FFmpeg $ ./ffmpeg -i ~/3rd/008.pmf -vcodec copy /tmp/derp.avi ffmpeg version git-2016-09-23-ae2cd8a Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.9.3 (Gentoo 4.9.3 p1.5, pie-0.6.4) configuration: libavutil 55. 30.100 / 55. 30.100 libavcodec 57. 57.101 / 57. 57.101 libavformat 57. 50.100 / 57. 50.100 libavdevice 57. 0.102 / 57. 0.102 libavfilter 6. 62.100 / 6. 62.100 libswscale 4. 1.100 / 4. 1.100 libswresample 2. 1.100 / 2. 1.100 [atrac3plus @ 0x3fbedc0] block_align is not set Input #0, mpeg, from '/home/bazz/3rd/008.pmf': Duration: 00:00:50.48, start: 0.945211, bitrate: 1320 kb/s Stream #0:0[0x1e0]: Video: h264 (Main), yuv420p(tv, smpte170m), 480x272 [SAR 1:1 DAR 30:17], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc Stream #0:1[0x1bd0]: Audio: atrac3p, 44100 Hz, stereo, 128 kb/s [abuffer @ 0x404db40] Unable to parse option value "(null)" as sample format Last message repeated 1 times [abuffer @ 0x404db40] Error setting option sample_fmt to value (null). [graph 0 input from stream 0:1 @ 0x404da40] Error applying options to the filter }}} The issue stems from the fact that `block_align is not set`, because in `libavcodec/atrac3plusdec.c:147` `atrac3p_decode_init()` will fail in this case. I can say that commenting out the `block_align` return statement allows `ffmpeg` to once again apparently run flawlessly with PMF. Let it be known here that the PMF parser constantly updates the `block_align` anyways. Thus, I'm not sure if removing the logic check produces issues for other users of ATRAC3+, but it at least provides with me a usable latest version of FFmpeg for the purpose of working with these PMF videos. Anyhow, I'm attaching this patch as "ffmpeg.diff" Note: Using a ~Dec 2014 commit of FFmpeg did not require this modification, but I did not discover why. == Closing Remarks == Check out the new attachment I added to this ticket `bazz_patches.zip` Remember, I'm using the latest FFmpeg from Github (7d17d31db4322b0c5e89f889ebf32af9ca2d91a9) -- Ticket URL: <https://trac.ffmpeg.org/ticket/3233#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker _______________________________________________ FFmpeg-trac mailing list FFmpeg-trac@avcodec.org http://ffmpeg.org/mailman/listinfo/ffmpeg-trac