[FFmpeg-user] How to transmux RTSP (mpeg-4, pcmu) to mov?

wl2776 wl2776 at gmail.com
Thu Jul 14 13:31:55 CEST 2011


Hi all. 
I have a video server (Moxa VPort 351), streaming video and sound over RTSP. 
How can I transmux its output to mov container? 

I tried 

ffmpeg -i rtsp://192.168.24.64/udpStream -acodec copy -vcodec copy -f mov
rec.mov 

but audio and video are terribly out of sync. 

Here is the uncut output from ffmpeg: 

$ ./ffmpeg_g -y -i rtsp://192.168.24.64/udpStream -acodec copy -vcodec copy
-f mov rec.mov 
ffmpeg version N-31407-g21a351c, Copyright (c) 2000-2011 the FFmpeg
developers
  built on Jul 14 2011 12:35:31 with gcc 4.4.3
  configuration: --disable-optimizations --disable-postproc --enable-debug=3
--enable-static --disable-shared --cpu=i686 --disable-ffserver --enable-gpl
--enable-version3 --prefix=/usr/local
  libavutil    51. 11. 0 / 51. 11. 0
  libavcodec   53.  7. 0 / 53.  7. 0
  libavformat  53.  5. 0 / 53.  5. 0
  libavdevice  53.  2. 0 / 53.  2. 0
  libavfilter   2. 24. 4 /  2. 24. 4
  libswscale    2.  0. 0 /  2.  0. 0
[rtsp @ 0xaa78380] Estimating duration from bitrate, this may be inaccurate
Input #0, rtsp, from 'rtsp://192.168.24.64/udpStream':                                                                        
  Metadata:
    title           : CH1 Unicast Stream
    comment         : /dev/at2042
  Duration: N/A, start: 0.768000, bitrate: N/A
    Stream #0.0: Video: mpeg4, yuv420p, 720x576 [PAR 12:11 DAR 15:11], 25
fps, 25 tbr, 90k tbn, 25 tbc
    Stream #0.1: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s
Output #0, mov, to 'rec.mov':
  Metadata:
    title           : CH1 Unicast Stream
    comment         : /dev/at2042
    encoder         : Lavf53.5.0
    Stream #0.0: Video: mpeg4, yuv420p, 720x576 [PAR 12:11 DAR 15:11],
q=2-31, 25 tbn, 25 tbc
    Stream #0.1: Audio: pcm_mulaw, 8000 Hz, 1 channels, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop, [?] for help
frame=   52 fps=  6 q=-1.0 Lsize=     757kB time=00:00:09.76 bitrate=
635.1kbits/s    
video:704kB audio:50kB global headers:0kB muxing overhead 0.335662%

Switches -vcodec copy and -acodec copy are mandatory for me, because I'm
developing an application, using libav, and this app must just remux stream,
not re-encode. 
I need therefore some hints on which switches I should specify.

So, I want to have a good result with ffmpeg, and then mimic its behavior in
my app.


--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/How-to-transmux-RTSP-mpeg-4-pcmu-to-mov-tp3667271p3667271.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list