Panasonic Camera Streaming MJPEG Video with G.726 Audio

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
hubschrauber
New Cone
New Cone
Posts: 3
Joined: 07 Feb 2010 06:08

Re: Panasonic Camera Streaming MJPEG Video with G.726 Audio

Postby hubschrauber » 19 Feb 2010 01:37

The raw audio data that openRTSP captures and stores can be converted into a playable wav file with a few utilities on a Linux machine, but it takes a bit of effort. Some of the same information is posted on a few other forums but it deserves to be here too so that those who are trying to find a way to get the audio stream data from a Panasonic IP cam won't have to go hunting for it. Maybe it will also give the VLC developers some ideas about how to consume and transcode the audio in spite of the sketchy support in openRTSP.

First, the raw audio data is apparently not encoded by the camera in a way that is expected by the generally available codecs, so someone wrote a command line utility called decode-g72x that does an initial conversion into a format that can be consumed more easily. The source code for that is at http://www.ps-auxw.de/g72x++.tar.bz2 You have to do the usual download, unpack, read the build instructions, compile, and put the binary somewhere you can execute.

Next, the output from decode-g72x has to be fed into the linux sox command to output a wav format audio file.

The entire piped set of commands goes as follows:

cat <infile> | decode-g72x -64 -l -R | sox -r 8000 -w -c 1 -s -t raw - -t wav <outfile>.wav

decode-g72x parameters
* -64 specifies to Process G.726 32kbps (4-bit) input data
* -l specifies to Generate 16-bit linear PCM data
* -R specifies that G.726 samples are right packed (Note: this seems to be the key non-standard encoding issue)

sox parameters:
* -c 1 specifies 1 audio channel
* -w specifies 16bit "word" samples
* -s specifies "signed linear" data
* -t raw specifies raw input data, no header
* - is a place-holder for streamed input
* -t wav specifies the output file format.

Note that <infile> must be just the raw audio data. By default, openRTSP, when run on the command line, will output a separate file for each stream. If the -4 switch is used, the video and audio from the Panasonic camera will be muxed into an MP4 file, so the audio would need to be demuxed into a separate file. That turns out to be somewhat tricky since most tools like ffmpeg refuse to do anything with the audio atom in the MP4 file that has a format-type / fourcc of "????". Since I already had quite a few captures stored that way, I ended up writing my own QT atom parser to extract the audio chunks from the MP4 into another file that could be used with decode-g72x. So, I'd recommend starting with openRTSP capturing streams to separate files. Then convert the audio. Then use something like ffmpeg to mux the audio and video together into a file playable in VLC.

Note: Sometimes VLC manages to play audio directly from the camera, but it is very choppy and seems to die after a minute or two. It's a hassle to pipe the audio through these other utilities, but I was happy to at least find a way to convert the raw audio into something usable. Hope this helps or inspires. I'd still rather have a nice point, click, and play, re-stream, or record solution.

hackeron
Blank Cone
Blank Cone
Posts: 24
Joined: 18 Jul 2008 13:30

Re: Panasonic Camera Streaming MJPEG Video with G.726 Audio

Postby hackeron » 17 Feb 2011 02:25

Any news about g72x support in vlc? :(

tomok10
New Cone
New Cone
Posts: 6
Joined: 27 Dec 2011 00:14

Re: Panasonic Camera Streaming MJPEG Video with G.726 Audio

Postby tomok10 » 27 Dec 2011 06:16

It is not exactly what you asked for but there are some similarities :-)

I’m running an AXIS 2100 ip-cam with an AXIS audio modul 2191 which
streams MJPG video and G.72? (32ADPCM) audio via HTTP.

As far as I know the only way to hear sound is using IE + an activeX-plugin.

Nevertheless I tried (WinXP) ‚FFplay’ and ‚VLC’ to get direct access to
the audio stream – without success.
‚MPLAYER’ (using codec ‚Sharp G.726 Audio’) recognizes the audio
stream: very choppy but stable:

mplayer.exe -quiet -cache 1240 -demuxer rawaudio –rawaudio channels=1:rate=8000:samplesize=4:bitrate=32000:format=0x45 http://192.168.2.99/axis-cgi/audio/receive.cgi?

(Starting the above command line you’ll have to wait until the cache is
filled to 20%.)

Maybe there is something useful in my example for testing VLC ?

haydenm315
New Cone
New Cone
Posts: 6
Joined: 06 Nov 2013 04:13

Re: Panasonic Camera Streaming MJPEG Video with G.726 Audio

Postby haydenm315 » 15 Mar 2014 17:06

Sorry to bring this back from the dead, but streaming with audio using vlc works with this camera.

1. Upgrade to the latest firmware for the camera.
2. Use the latest version of vlc
3. Configure the general user permissions to be able to listen.
4. Use the following url to connect to the camera in vlc: rtsp://[CAMERA IP]/nphMpeg4/g726-[WIDTH]x[HEIGHT]

Dominiccc
New Cone
New Cone
Posts: 2
Joined: 23 May 2015 22:16

Re: Panasonic Camera Streaming MJPEG Video with G.726 Audio

Postby Dominiccc » 23 May 2015 23:09

I know its a very old thread but it seems to be the most useful one Google could find. This might info might help other Panasonic bb-hcm705 735 users irked that they cant get the audio from their trusty old camera.

I gave up trying to get VLC or any other software to access the sound stream from the camera. It transmits audio in a non standard way that no current software that I've come across will decode. To get the audio I resorted to loading Microsoft XP Mode on my Windows 7 PC. (Alas you cant use XP Mode with the Windows 7 Home, unless you ask Google of course). I then simply used IE6 included in XP Mode and loaded the ActiveX controls downloaded from the camera. It automatically downloaded a very old version of Java which I suspect if full of security holes but I only want to use XP Mode with my old webcam so who cares.

Setting up XP Mode also took some Googling to get past the usual obtuse Windows error messages but I got things sorted quite quickly. Dont forget to use a separate firewall within XP even though you have one in Windows 7.

The camera audio up and running with an hour or so of having made the decision to try XP Mode.

I expect I could use VLC to re-encode the audio stream from the sound card output into something more current and remux it with the video stream if the urge ever strikes me. But for now I have what I wanted! Sad I know but I do like listening to the sound of the local donkey and some local chickens from my villa early in the morning and the racket of amorous frogs in the evening from the roof of my villa in Cyprus. Its a shame that it can also hear some road noise too!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Panasonic Camera Streaming MJPEG Video with G.726 Audio

Postby Jean-Baptiste Kempf » 16 Jul 2015 20:26

I know its a very old thread but it seems to be the most useful one Google could find. This might info might help other Panasonic bb-hcm705 735 users irked that they cant get the audio from their trusty old camera.

I gave up trying to get VLC or any other software to access the sound stream from the camera. It transmits audio in a non standard way that no current software that I've come across will decode. To get the audio I resorted to loading Microsoft XP Mode on my Windows 7 PC. (Alas you cant use XP Mode with the Windows 7 Home, unless you ask Google of course). I then simply used IE6 included in XP Mode and loaded the ActiveX controls downloaded from the camera. It automatically downloaded a very old version of Java which I suspect if full of security holes but I only want to use XP Mode with my old webcam so who cares.

Setting up XP Mode also took some Googling to get past the usual obtuse Windows error messages but I got things sorted quite quickly. Dont forget to use a separate firewall within XP even though you have one in Windows 7.

The camera audio up and running with an hour or so of having made the decision to try XP Mode.

I expect I could use VLC to re-encode the audio stream from the sound card output into something more current and remux it with the video stream if the urge ever strikes me. But for now I have what I wanted! Sad I know but I do like listening to the sound of the local donkey and some local chickens from my villa early in the morning and the racket of amorous frogs in the evening from the roof of my villa in Cyprus. Its a shame that it can also hear some road noise too!
Can you share the file to play?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Dominiccc
New Cone
New Cone
Posts: 2
Joined: 23 May 2015 22:16

Re: Panasonic Camera Streaming MJPEG Video with G.726 Audio

Postby Dominiccc » 26 Aug 2015 23:20

Hello Jean Baptiste

Apologies for the delay in responding, I only saw your request this evening.

I didnt try saving any streams from the camera as I was just happy with viewing/hearing it live.

My cameras address is http://trimithousa.viewnetcam.com however my brother was staying at my villa last week and took the ethernet cable to run his internet media box then helpfully forgot to reconnect the camera. Most annoying for me especially as he did the same last year!
I will ask a neighbour to get it running again in the next couple of days and let you now when its up again. You dont need login for guest access to the video/audio stream. I believe that recording files made by the camera do not have quite the same stream format but I would be happy to record some for you. For bandwidth reasons I find that selecting a smaller image size with automatic Image refresh every 5+seconds ensures an unbroken audio feed.

If there is anything else I can do, please ask.

Dominic


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 23 guests