I receive live stream from ip camera (via rtsp) with video H264 and audio G.726. I need to store the stream in file (mp4 preferably) without transcoding. Video is recorded, but seems that ffmpeg cannot write G.726 nor to mp4 neither to other containers I've tried, like avi, mkv, ogg and so on.
ffmpeg -i rtsp:... -vcodec copy -acodec copy test.mp4
Here is audio stream info:
Stream #0:1: Audio: adpcm_g726le, 8000 Hz, mono, s16, 16 kb/s
Error:
Could not find tag for codec adpcm_g726le in stream #0, codec not currently supported in container
Also I tried live555 and GStreamer, but no success with audio stream.
Is there any possibility to record G.726 with no transcoding? If there is any C/C++ lib that can do this, point me please to it.
Update. Solution with Gstreamer for mkv:
gst-launch-1.0 -e rtspsrc location=rtsp:... name=rtspsrc ! rtph264depay ! h264parse ! matroskamux name=mux ! filesink location="test.mkv" rtspsrc. ! rtpg726depay ! mux.