Re: [FFmpeg-user] ffmpeg livestreaming with subtitles

2015-05-18 Thread JamesW2015
Sorry. I am new and I don't know much about this. 

I am using VLC player and it can support subtitles. 

I did not mean to use "-f mpegts" as the output format. That was an example
only. I meant to ask which format I should use in ffmpeg command line to
support subtitle livestreaming. 

Thanks. 



--
View this message in context: 
http://ffmpeg-users.933282.n4.nabble.com/ffmpeg-livestreaming-with-subtitles-tp4670507p4670523.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] ffmpeg livestreaming with subtitles

2015-05-18 Thread JamesW2015
Hi, 
I am a new ffmpeg user. I like it very much. I got a subtitle livestreaming
problem though. 

Basically, I like to livestream a customized subtitles together with
audio/video mp4 file. The subtitle track has to be a separate one (cannot be
hardcoded or burned into the video data. I know how to burn but I don't want
that as the user at the client side may change the subtitles). I have
recently asked a question on  ffmpeg livestreaming with subtitles
  in ffmpeg developer
forum but was suggested that I asked the question on how to livestream
subtitles with ffmpeg here. 

Please help. 

Here is the current status,  
* Already added subtitles to "india_sub_srt.mp4" using ffmpeg successfully.
Using a vlc player to play the file, I can see the newly added subtitles.

* I am using an octoshape sever. The server set up was fine. If I use "-f
flv" instead of "-f mpegts" as the output container (see below), I can
stream successfully. However, "flv" does not support subtitle livestream. I
also tried "mp4", "mov" as an output format but got an error message saying
those are not seekable formats.

* Followed a couple of suggestions I got from the aforementioned post and
was able to see ffmpeg processing audo, video, and even subtitle for
streaming but there was a conversion failure. I wonder: does it mean the
current ffmpeg does not support or I need to use some other format?

Please see below for my screen print-outs.

Command:
ffmpeg -re -i india_sub_srt.mp4 -c:v libx264 -preset fast -maxrate 500k
-bufsize 4000k -pix_fmt yuv420p -g 50 -c:a copy -c:s copy -f mpegts
rtmp://localhost/live/livestream

Screen print-out:
ffmpeg version N-71481-g1c37848 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-av  isynth
--enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab   
  
le-iconv --enable-libass --enable-libbluray --enable-libbs2b
--enable-libcaca -- 
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm
--enable-l  ibilbc
--enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab   
  
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp
--en 
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora
--ena 
ble-libtwolame --enable-libvidstab --enable-libvo-aacenc
--enable-libvo-amrwbenc 
 
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp
--enabl  e-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --ena  
   
ble-decklink --enable-zlib
  libavutil  54. 22.101 / 54. 22.101
  libavcodec 56. 34.100 / 56. 34.100
  libavformat56. 30.100 / 56. 30.100
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 14.100 /  5. 14.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'india_sub_srt.mp4':
  Metadata:
major_brand : isom
minor_version   : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.30.100
  Duration: 00:04:59.86, start: 0.00, bitrate: 309 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 /
0x31637661), yu 
v420p(tv, bt709), 320x180, 209 kb/s, 25 fps, 25 tbr, 90k tbn, 180k tbc
(default)
Metadata:
  handler_name: VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
flt  p, 95 kb/s
(default)
Metadata:
  handler_name: SoundHandler
Stream #0:2(und): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
(default)
Metadata:
  handler_name: SubtitleHandler
[libx264 @ 040cbe60] using cpu capabilities: MMX2 SSE2Fast LZCNT
[libx264 @ 040cbe60] profile High, level 2.1
Output #0, mpegts, to 'rtmp://localhost/live/livestream':
  Metadata:
major_brand : isom
minor_version   : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.30.100
Stream #0:0(und): Video: h264 (libx264), yuv420p, 320x180, q=-1--1, max.
500   kb/s, 25 fps,
90k tbn, 25 tbc (default)
Metadata:
  handler_name: VideoHandler
  encoder : Lavc56.34.100 libx264