mp4 generation with both video and audio fails

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

mp4 generation with both video and audio fails

manickam palaniappan
Pls help: I tried the following:

gst-launch-1.0 rtspsrc location=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov ! decodebin name=dm mp4mux name=mux ! filesink location=f.mp4 dm. ! x264enc ! mux. dm. ! faac ! mux.

File resides at 0  bytes all the time. If I remove the audio component, it starts working.

And if somebody could provide the rtpdepay based cmdline instead of decodebin, it would be helpful.

Thanks,
Manickam

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: mp4 generation with both video and audio fails

Tim Müller
On Wed, 2014-03-12 at 15:20 -0700, manickam palaniappan wrote:

Hi,

> gst-launch-1.0 rtspsrc
> location=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov !
> decodebin name=dm mp4mux name=mux ! filesink location=f.mp4 dm. !
> x264enc ! mux. dm. ! faac ! mux.
> File resides at 0  bytes all the time. If I remove the audio
> component, it starts working.
> And if somebody could provide the rtpdepay based cmdline instead of
> decodebin, it would be helpful.

Try something like:

gst-launch-1.0 \
    mp4mux name=mux ! filesink location=f.mp4 \
\
    rtspsrc location=rtsp://... name=src \
\
    src. ! queue ! rtph264depay ! mux.video_0 \
    src. ! queue ! rtpmp4adepay ! mux.audio_0

This assumes the rtsp stream contains H264 and AAC. If that fails, try
adding an aacparse element after rtpmp4depay and an h264parse element
after rtph264depay as well (to add some extra fields on the output caps
that mp4mux might want).

 Cheers
  -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: mp4 generation with both video and audio fails

manickam palaniappan
In reply to this post by manickam palaniappan
I followed your cmd and it is not helping. Could you pls check hwat is wrong. the rtsp url would be accessible to you too. And the audio is aac:

gst-launch-1.0 mp4mux name=mux ! filesink location=a.mp4 rtspsrc location=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov name=src src. ! queue ! rtph264depay ! h264parse ! mux.video_0 src. ! queue ! rtpmp4adepay ! aacparse ! mux.audio_0

manickam@manickam-Aspire-5738:~$ ffprobe rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov
avprobe version 0.8.10-4:0.8.10-0ubuntu0.12.04.1, Copyright (c) 2007-2013 the Libav developers
  built on Feb  6 2014 20:56:59 with gcc 4.6.3
[rtsp @ 0x169d980] Estimating duration from bitrate, this may be inaccurate
Input #0, rtsp, from 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov':
  Metadata:
    title           : BigBuckBunny_115k.mov
  Duration: 00:09:56.48, start: 0.000000, bitrate: N/A
    Stream #0.0: Audio: aac, 12000 Hz, stereo, s16
    Stream #0.1: Video: h264 (Constrained Baseline), yuv420p, 240x160, 24 fps, 1k tbr, 90k tbn, 48 tbc






On Thursday, March 13, 2014 3:50 AM, manickam palaniappan <[hidden email]> wrote:
Pls help: I tried the following:

gst-launch-1.0 rtspsrc location=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov ! decodebin name=dm mp4mux name=mux ! filesink location=f.mp4 dm. ! x264enc ! mux. dm. ! faac ! mux.

File resides at 0  bytes all the time. If I remove the audio component, it starts working.

And if somebody could provide the rtpdepay based cmdline instead of decodebin, it would be helpful.

Thanks,
Manickam



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: mp4 generation with both video and audio fails

harishjennykn
Try this out!

gst-launch-1.0 mp4mux name=mux ! filesink location=a.mp4 rtspsrc location=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov name=src src. ! queue ! rtph264depay ! h264parse ! avdec_h264 ! x264enc ! mux.video_0 src. ! queue ! rtpmp4gdepay ! aacparse ! avdec_aac ! audioconvert ! faac ! mux.audio_0 -e

or

gst-launch-1.0 mp4mux name=mux ! filesink location=a.mp4 rtspsrc location=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov name=src src. ! queue ! rtph264depay ! h264parse ! mux.video_0 src. ! queue ! rtpmp4gdepay ! aacparse ! avdec_aac ! audioconvert ! faac ! mux.audio_0 -e


~HJ