FAQ  •  Register  •  Login

VLC stream plays, but ffmpeg stream doesn't play on S590

<<

smedi

Serviio newbie

Posts: 2

Joined: Tue Jan 27, 2015 10:11 pm

Post Tue Jan 27, 2015 10:29 pm

VLC stream plays, but ffmpeg stream doesn't play on S590

EDIT: [SOLVED] Setting ffmpeg to -s 1280x720 made the stream playable on the Sony.

I usually use Serviio to play files from my Windows 7 PC to my Sony BDP-S590 Blu-ray player, but sometimes I want to stream a live capture from my desktop as an Online Source.

I have had success with using VLC alone to capture and stream a desktop region to HTTP (as ts, x264/ac3 and also as ps mp2v/ac3). However, the cpu usage was high and so I've been trying to test and compare capture and encoding with ffmpeg to a udp stream, then pipe through VLC to output an http stream without reencoding. The result plays fine on another instance of VLC and the Serviio Online Source stream test checks as ok, but the ffmpeg through VLC stream does not play on the Sony S590.

The reason I'm trying to pipe through VLC is because ffmpeg itself does not output to an HTTP stream. It does with ffserver, but that is not working on Windows. I also tried sending an RTMP stream from ffmpeg through nginx server to the Serviio Online Source, but that didn't play on the Sony either. I also tried adding targetContainer="mpegts" Matches container="mpegts" to OnlineTranscoding sections in my profiles.xml and adding the ffmpeg udp link directly to Online Sources, but that didn't work.

Any suggestions to improve my VLC or ffmpeg commands to get the ffmpeg to play? I'm also open to other Windows alternatives to add the ffmpeg udp (or other) stream as an Online Source without VLC.

VLC only capture/stream command that works on Sony:

  Code:
:sout=#transcode{vcodec=h264,vb=2500,venc=x264{vbv-maxrate=5000,vbv-bufsize=10000},fps=30,scale=1,acodec=a52,ab=192,channels=2,samplerate=48000,audio=sync}:duplicate{dst=std{access=http,mux=ts,dst=:1234/go.ts}} :sout-mux-caching=2000 :sout-transcode-high-priority :no-sout-rtp-sap :no-sout-standard-sap :ttl=1 :sout-keep


ffmpeg capture command for udp stream sent to VLC:
(does not play on Sony)

  Code:
ffmpeg -f dshow -i video="UScreenCapture":audio="Stereo Mix (Realtek High Defini" -vcodec libx264 -preset fast -tune zerolatency -r 30 -async 1 -crf 23  -pix_fmt yuv420p -s 656x384 -acodec ac3 -ab 192k -ar 48000 -ac 2 -bsf:v h264_mp4toannexb -maxrate 6000k -bufsize 12000k -f mpegts udp://127.0.0.1:1234?pkt_size=1316


VLC command to send ffmpeg input to Serviio Online Source as http stream:
(checks as ok in Serviio, but does not play on Sony)

  Code:
:sout=#standard{access=http,mux=ts,dst=:1234/go.ts} :sout-keep



ffmpeg -i output (ffmpeg udp stream to VLC http, does not play on Sony):

  Code:
[h264 @ 0000000000311de0] non-existing PPS 0 referenced
[h264 @ 0000000000311de0] decode_slice_header error
[h264 @ 0000000000311de0] no frame!
Input #0, mpegts, from 'http://127.0.0.1:1234/go.ts':
  Duration: N/A, start: 7079.208067, bitrate: 192 kb/s
  Program 1
    Stream #0:0[0x44](): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp,
 192 kb/s
    Stream #0:1[0x45](): Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 6
56x384, 30 tbr, 90k tbn, 60 tbc


ffmpeg -i output (VLC only, plays on Sony):

  Code:
[h264 @ 0000000000301d00] decode_slice_header error
[h264 @ 0000000000301d00] no frame!
[h264 @ 0000000000301d00] non-existing PPS 0 referenced
[mpegts @ 00000000002ff780] decoding for stream 1 failed
[mpegts @ 00000000002ff780] Could not find codec parameters for stream 1 (Video:
 h264 ([27][0][0][0] / 0x001B)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'http://127.0.0.1:1234/go.ts':
  Duration: N/A, start: 7644.652856, bitrate: 192 kb/s
  Program 1
    Stream #0:0[0x44]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 1
92 kb/s
    Stream #0:1[0x45]: Video: h264 ([27][0][0][0] / 0x001B), 30 tbr, 90k tbn, 18
0k tbc
Last edited by smedi on Thu Jan 29, 2015 3:16 am, edited 1 time in total.
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Wed Jan 28, 2015 2:33 pm

Re: VLC stream plays, but ffmpeg stream doesn't play on S590

Try to change h264 encoding settings.
Do you try with 25fps rate ?
<<

smedi

Serviio newbie

Posts: 2

Joined: Tue Jan 27, 2015 10:11 pm

Post Thu Jan 29, 2015 3:13 am

Re: VLC stream plays, but ffmpeg stream doesn't play on S590

Illico wrote:Try to change h264 encoding settings.
Do you try with 25fps rate ?


Thanks for your help. I tried 25fps and also forced the resolution to 720p and now the ffmpeg stream works when piped through VLC. The problem was the non-standard resolution, so at 720p it also plays at 30fps. I didn't notice issues with non-standard resolutions (multiples of 16) when only using VLC, but now I have a solution that works with both ffmpeg and VLC. ffmpeg does seem to use lower cpu, and I'm glad to have the choice to test both streaming options.

Thanks again for pointing me in the right direction.

Return to Sony

Who is online

Users browsing this forum: No registered users and 38 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.