[FFmpeg-user] RTMP to RTMP video track copy throwing error

Arnaud A arnauda.contact at gmail.com
Tue Apr 29 15:01:49 CEST 2014


Hi all,

I need to fecth a RTMP H.264/MP3 stream and push it to RTMP H264/AAC
stream. I would like to leave the video track untouched as I have several
streams to process and would like CPU usage to remain as low as possible
So far I have been using:
./ffmpeg -i rtmp://myserver/live/test -c:v copy -c:a libvo_aacenc -b:a 96k
-f flv rtmp://myserver/live-flash/test

Now one out of 10 tries it passes and the stream gets transcoded but most
of time I have the following error. The incoming stream is not transcoded
to H264 with x264 (it is with Flash Media Live Encoder) but if I specify
-c:v libx264 (+x264 options) instead of -c:v copy it works 100% of the
time. Any hints on what is happening? I tried on another machine and the
same RTMP feed but I got the exact same error.

Thanks
Arnaud

ffmpeg version 2.2.1-   http://johnvansickle.com/ffmpeg/    Copyright (c)
2000-2014 the FFmpeg developers
  built on Apr 11 2014 04:58:33 with gcc 4.8 (Debian 4.8.2-19)
  configuration: --enable-gpl --enable-version3 --disable-shared
--disable-debug --enable-runtime-cpudetect --enable-libmp3lame
--enable-libx264 --enable-libwebp --enable-libspeex --enable-libvorbis
--enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray
--enable-libopenjpeg --enable-libopus --disable-ffserver
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
[flv @ 0x401d520] Stream discovered after head already parsed
[flv @ 0x401d520] negative cts, previous timestamps might be wrong
    Last message repeated 61 times
Input #0, flv, from 'rtmp://87.106.183.100/live/test':
  Metadata:
    author          :
    copyright       :
    description     :
    keywords        :
    rating          :
    title           :
    presetname      : Custom
    creationdate    : Tue Apr 29 14:17:16 2014
                    :
    videodevice     : Logitech HD Webcam C525
    avclevel        : 40
    avcprofile      : 77
    videokeyframe_frequency: 5
    audiodevice     : Microphone (Jabra UC VOICE 550a)
    audiochannels   : 2
    audioinputvolume: 75
  Duration: N/A, start: 0.000000, bitrate: 847 kb/s
    Stream #0:0: Video: h264 (Main), yuv420p(tv), 640x360 [SAR 1:1 DAR
16:9], 716 kb/s, 15.17 fps, 48.17 tbr, 1k tbn, 30 tbc
    Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16p, 131 kb/s
    Stream #0:2: Data: none
Output #0, flv, to 'rtmp://87.106.183.100/live-flash/test':
  Metadata:
    author          :
    copyright       :
    description     :
    keywords        :
    rating          :
    title           :
    presetname      : Custom
    creationdate    : Tue Apr 29 14:17:16 2014
                    :
    videodevice     : Logitech HD Webcam C525
    avclevel        : 40
    avcprofile      : 77
    videokeyframe_frequency: 5
    audiodevice     : Microphone (Jabra UC VOICE 550a)
    audiochannels   : 2
    audioinputvolume: 75
    encoder         : Lavf55.33.100
    Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 640x360 [SAR
1:1 DAR 16:9], q=2-31, 716 kb/s, 15.17 fps, 1k tbn, 1k tbc
    Stream #0:1: Audio: aac (libvo_aacenc) ([10][0][0][0] / 0x000A), 44100
Hz, stereo, s16, 96 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (mp3 -> libvo_aacenc)
Press [q] to stop, [?] for help
[flv @ 0x41b4680] pts (-4080) < dts (67) in stream 0
av_interleaved_write_frame(): Invalid argument
[libvo_aacenc @ 0x41b5640] Trying to remove 1024 samples, but the queue is
empty
[flv @ 0x41b4680] Encoder did not produce proper pts, making some up.
[libvo_aacenc @ 0x41b5640] Trying to remove 1024 samples, but the queue is
empty
[flv @ 0x41b4680] Failed to update header with correct duration.
[flv @ 0x41b4680] Failed to update header with correct filesize.
frame=    2 fps=0.0 q=-1.0 Lsize=      30kB time=00:00:00.04
bitrate=5383.3kbits/s
video:36kB audio:1kB subtitle:0 data:0 global headers:0kB muxing overhead
-16.655897%


More information about the ffmpeg-user mailing list