Log in

View Full Version : Media Player Classic not detecting PCM stream in FLV file


ArdenDag
25th October 2007, 15:45
Hello y'all, this has got me a bit puzzled... I have (I think) the most recent version of FLVsplitter installed, and most FLV files play fine inside of MPC, however some do not, and when I play them in SMPlayer, they do play with audio.

When I checked, the Audio Stream is PCM:
http://arden.netfirms.com/audio.gif

What am I missing that the file doesn't play with audio in MPC, but does in SMPlayer?

Thanks,
Arden

Placio74
25th October 2007, 16:35
...
When I checked, the Audio Stream is PCM:
...
Not PCM. It's ADPCM.
You sure, this file is FLV not SWF?

clsid
25th October 2007, 18:36
Upload a sample file and post it in the following topic:
http://forum.doom9.org/showthread.php?t=123537

Then maybe Casimir666 can update the FLV splitter to recognize this audio type.

ArdenDag
26th October 2007, 05:03
Yes, I am not familiar with the differences between PCM and ADPCM audio, but they are similar in origin. I have the Microsoft ADPCM codec/filter installed, it must be an issue with FLVSplitter or MPC. Yes, the container is FLV, and the FourCC is FLV1, I'm sorry I didn't upload a screenshot of that as well.

If I get a chance, I will upload a clip to that thread, thanks clsid.

Arden

Placio74
26th October 2007, 08:29
Well, i'm see sample file in other topic (http://forum.doom9.org/showpost.php?p=1058804&postcount=658).

MediaInfo and AVIcodec recognize audio type - GSpot not.

MPlayer (SMPlayer) and FFplay recognize audio type, play and i'm hear - VLC and FLV Splitter (+ffdshow or system codecs) not.

Avidemux recognize audio.
Can't remux to FLV>FLV.
When remux to AVI and play, audio is recognized - but i'm hear only silent.

VirtualDub + FLV plugin - can't recognize audio (i'm see no input audio).

FFmpeg - when remux to AVI - wrong audio tag.
FFmpeg - copy video and recompress audio - OK.

FFmpeg - save only audio to WAV.
Can't play - not recognize by audio players.

I'm see sample file is created by Turbine Video Engine.
I'm check - default audio in projects is MP3.
Can set ADPCM, but i'm think it's wrong choice for FLV.

As i'm member... standard FLV can contain MP3, uncompressed PCM and Nellymoser audio.

Adobe Flash Player can't play audio from this sample file.
[EDIT]Ups, mistake. Can play (check on latest version).[EDIT]

[EDIT]
At this moment (november 2007) FLV with ADMPC (SWF variant) can play in: FFplay, MPlayer (SMPlayer) and actual build The KMPlayer.
The KMPlayer can play FLV with Nellymoser audio.
FLV Splitter 1.0.0.3 + latest ffdshow + Media Player Classic = can play FLV's with Nellymoser.

ArdenDag
26th October 2007, 19:04
Hello,

Thanks for taking a look. Yes, I know FLV normally contains MP3 audio, however the specs allow for PCM audio (I'm assuming ADPCM falls under this as well, as there are flash video players outside of adobe's flash player which do play this file correctly).

My problem is that I have some files already with this spec used, and rather than having them all converted with FFMpeg, which is an option by re-encoding the audio to MP3, I'd like to find a way to have MPC play them with FLVSplitter. It's very possible that this format could get used for other purposes (I don't know what... but it's possible) and FLVSplitter would need to be able to split it correctly in those instances anyway, right?

Arden

Placio74
26th October 2007, 22:30
Try...

ffmpeg -i input.flv -f flv -vcodec copy -ar 44100 -ac 2 -ab 128000 -acodec libmp3lame output.flv
or
ffmpeg -i input.flv -f flv -vcodec copy -acodec libmp3lame -sameq output.flv
or
ffmpeg -i input.flv -f avi -vcodec copy -ar 44100 -ac 2 -ab 128000 -acodec libmp3lame output.avi
or
ffmpeg -i input.flv -f avi -vcodec copy -acodec libmp3lame -sameq output.avi

Look at FFmpeg manual (http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html).

Play fine, but one irritating problem - output file have 1000 FPS (when copy video from FLV - no problem if recompress).

------

Convert FPS in VirtualDub 1.7.6.
- demux audio (VirtualDubMod or AVI-Mux GUI),
- open AVI file in VirtualDub,
- Frame Rate... > Convert to fps: and type FPS as source,
- Video > Direct stream copy,
- Audio > No Audio,
- File > Save as AVI...,
- mux video and audio (demuxed before) used VirtualDubMod or AVI-Mux GUI.
Demux audio and mux again - before VD 1.7.6 can't support MP3 VBR (desynchro A/V).

------

Convert FPS in VirtualDub 1.7.x test.
- open AVI file in VirtualDub,
- Frame Rate... > Convert to fps: and type FPS as source,
- Video > Direct stream copy.
Latest test version VD 1.7.x support MP3 VBR (show old info window, but support).

Convert to fps in actual version VD, not VDM (because VDM is too old and this option differently works).

------

Or some other...

ffmpeg -i input.flv -f avi -vcodec copy -ar 44100 -ac 2 -acodec pcm_s16le output.avi

Convert FPS and recompress audio in VD 1.7.6.

---

ar (audio resample) and ac (audio channels) in FFmpeg syntax not required.
Of course VD required VfW codec (decoder) - You can use ffdshow VfW.
You can recompress video too.
If copy FLV1 video - to play in DirectShow players required ffdshow.

------

I'm try few other tools and try copy video and recompress audio to FLV or AVI.
Without success.
Example Avidemux - jammed when try recompress.

------

BTW... ADPCM it's not uncompressed audio.
Look example at:
http://msdn2.microsoft.com/en-us/library/bb172299.aspx

------

[EDIT]
I'm forgot...
Other variant.
Demux video (to AVI) used FLV Extract.
Recompress (or decompress) audio used FFmpeg.
Example:
ffmpeg -i test.flv -vn -acodec libmp3lame -sameq audio.mp3
Mux audio and video to new AVI file.
This is OK (A/V sync) when source file is not VFR.
[EDIT]

------

I'm think it's problem rather with audio tag and (not) available correct decoder.

ArdenDag
31st October 2007, 10:47
Well, I guess this works in my favor. ADPCM audio in these files literally takes almost twice the size of the video anyways (as most of my videos had fairly low video file sizes). So it made sense for me to re-encode the audio to MP3 and remux...

I'll be patient, but I know that the issue is in how FFDShow reads the FLV format with ADPCM audio. Maybe it's in the FLVSplitter, maybe it's in libavcodec, I don't know, and I guess now I might not care either, since this works for my needs.

I ended up using FLV Extract to take the video, and ffmpeg to re-encode the audio to mp3, then remux with avidemux.

Thanks for the help!
Arden

Placio74
7th December 2007, 10:33
At this moment FLV with ADMPC (SWF variant) and Nellymoser audio can play:
- SMPlayer,
- The KMPlayer
- Media Player Classic + ffdshow
- FLV Splitter + ffdshow +some DirectShow players.

FLV Splitter and Media Player Classic updated on Guliverkli2 (https://sourceforge.net/project/showfiles.php?group_id=205650).

* FLV splitter: Recognize ADPCM audio.
* FLV splitter: Recognize Nellymoser audio.
* MPC: Tweaked priorities in DirectShow source filter enumeration. Behavior now better matches that of GraphEdit.
* MPC: Remember active shaders.
* MPC: Added two sharpen shaders.

(In ffdshow audio decoder configuration 'switch-on' Nellymoser and Other ADPCM.)