[FFmpeg-trac] Cannot transcode streaming to mp4

Asoul azx754 at gmail.com
Wed Feb 17 10:15:18 CET 2016


Hi,

I want to use ffmpeg for transcoding RTP streaming to MP4(HTTP) streaming, so I can play in html video tag,

but I can only transcode to flv format successfully.

Below is my settings:

[/etc/ffserver.conf]

...

<Feed feed1.ffm>
  File /tmp/feed1.ffm
  FileMaxSize 5M
  ACL allow localhost
</Feed>

<Stream flv>
  Feed feed1.ffm
  Format flv
  VideoFrameRate 40
  VideoBitRate 128
  VideoSize 1920x1080
  AVOptionVideo flags +global_header
  AudioBitRate 24
  AudioChannels 2
  AudioSampleRate 44100
  AVOptionAudio flags +global_header
</Stream>

<Stream mp4>
  Feed feed1.ffm
  Format mp4
  VideoFrameRate 40
  VideoBitRate 128
  VideoSize 1920x1080
  AVOptionVideo flags +global_header
  AudioBitRate 24
  AudioChannels 2
  AudioSampleRate 44100
  AVOptionAudio flags +global_header
</Stream>

<Stream avi>
  Feed feed1.ffm
  Format avi
  VideoFrameRate 40
  VideoBitRate 128
  VideoSize 1920x1080
  AVOptionVideo flags +global_header
  AudioBitRate 24
  AudioChannels 2
  AudioSampleRate 44100
  AVOptionAudio flags +global_header
</Stream>

[Commands]

$ ffserver -d -f /etc/ffserver.conf

$ ffmpeg -i MY_RTP_SOURCE  http://localhost:8090/feed1.ffm <http://localhost:8090/feed1.ffm>

[Other information]

1. Input format

$ ffprobe -i MY_RTP_SOURCE

Input #0, rtp, from 'MY_RTP_SOURCE':
  Duration: N/A, start: 47175.696200, bitrate: N/A
  Program 1
    Stream #0:1: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080, 25 tbr, 90k tbn
    Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp, 255 kb/s

2. AVI error message when access (at ffserver)

Wed Feb 17 17:09:16 2016 127.0.0.1 - - New connection: GET /avi
Wed Feb 17 17:09:16 2016 [avi @ 0x7fac8b800150]Too large number of skipped frames 873420092564 > 60000
Wed Feb 17 17:09:16 2016 Error writing frame to output for stream 'avi': Invalid argument
Wed Feb 17 17:09:16 2016 [avi @ 0x7fac8b800150]Too large number of skipped frames 873420092564 > 60000
Wed Feb 17 17:09:16 2016 127.0.0.1 - - [GET] "/avi HTTP/1.1" 200 2598

3. MP4 error mesage when access (at ffserver)

Wed Feb 17 17:09:56 2016 127.0.0.1 - - New connection: GET /mp4
Wed Feb 17 17:09:56 2016 [mp4 @ 0x7fac8c000150]muxer does not support non seekable output
Wed Feb 17 17:09:56 2016 Error writing output header for stream 'mp4': Invalid argument
Wed Feb 17 17:09:56 2016 127.0.0.1 - - [GET] "/mp4 HTTP/1.1" 200 62

4. My ffmpeg version

ffmpeg version 2.8.6 Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 7.0.2 (clang-700.1.81)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.6 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda
libavutil      54. 31.100 / 54. 31.100
libavcodec     56. 60.100 / 56. 60.100
libavformat    56. 40.101 / 56. 40.101
libavdevice    56.  4.100 / 56.  4.100
libavfilter     5. 40.101 /  5. 40.101
libavresample   2.  1.  0 /  2.  1.  0
libswscale      3.  1.101 /  3.  1.101
libswresample   1.  2.101 /  1.  2.101
libpostproc    53.  3.100 / 53.  3.100




If anyone know how to solve it or need more information, please tell me, thanks!

Sincerely,
Asoul

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/ffmpeg-trac/attachments/20160217/9c797dae/attachment.html>


More information about the FFmpeg-trac mailing list