[FFmpeg-user] MP4 to wav
Paul B Mahol
onemda at gmail.com
Mon Apr 17 10:00:00 EEST 2023
On Mon, Apr 17, 2023 at 5:29 AM Anatoly <anatoly at kazanfieldhockey.ru> wrote:
> On Sun, 16 Apr 2023 17:37:13 +0000
> Carl Zwanzig <cpz at tuunq.com> wrote:
>
> > On 4/13/2023 12:14 AM, Paul B Mahol wrote:
> > > It is not mp4 file format.
> >
> > That's right, it's not (don't believe the file extension)--
> > Complete name : C:/temp/1122.mp4
> > Format : MPEG-PS
> > File size : 1.37 MiB
> > Duration : 13 s 937 ms
> > Overall bit rate : 823 kb/s
> > FileExtension_Invalid : mpeg mpg m2p vob vro pss
> > evo
> >
> > Video
> > ID : 224 (0xE0)
> > Format : HEVC
> > Format/Info : High Efficiency Video
> > Coding Format profile : Main at L4.1@Main
> > Duration : 13 s 937 ms
> > [...]
> >
> > Audio
> > ID : 192 (0xC0)
> > Format : MPEG Audio
> > Format version : Version 2.5
> > Format profile : Layer 2
> > Format settings : Dual mono / Reserved
> > Duration : 10 s 600 ms
> > Bit rate mode : Constant
> > Bit rate : 40.0 kb/s
> > [...]
> >
> >
> > If the file extension is wrong for the contents, it's possible that
> > the audio format tagging is also wrong -or- more likely that the OP
> Tag is wrong. Is there tag for g722.1 stream exist at all?
> > was told G722 while it's really mpeg. It's also possible that there
> > was a problem with the original encoding.
>
> so if it is mpeg-ps, let's try
> convert mpeg-ts to mpeg-ps (there's no ps2es):
> C:\test>ps2ts -notdvd -h264 1122.mp4 1122.ts
> then extract raw G722.1 audio bitstream:
> C:\test>ts2es -audio 1122.ts 1122_g722.raw
> then decode from g722.1 to s16le:
> C:\test>decode 0 1122_g722.raw 1122_s16le.raw 16000 7000
> then convert from s16le to wav
> C:\test>ffmpeg -f s16le -ar 16000 -i 1122_s16le.raw -c copy 1122.wav
> 1122.wav plays ok.
> Windows versions of ps2ts and ts2es are taken from here
> https://sourceforge.net/projects/tstools.berlios/
> decode.exe is taken from here:
>
> http://spectralink.polycom.com/global/downloads/company/about_us/technology/siren14_g7221c/Siren14PCExecutable.zip
> Tested under wine, because I have no Windows by hand, and I don't know
> any *nix equivalent of g722.1 decode.exe.
>
Not interested in writing g722.1 decoder for libavcodec for free.
More information about the ffmpeg-user
mailing list