2015-09-28, 02:18 PM
With the current version of ffmpeg (2.8), play time transcoding of both recordings and live TV seems to work pretty well. However, using the ffmpeg filter effectively stops you from using seek within a recording. One way around this would be to restart the stream using the -ss argument to ffmpeg to jump directly to the required place in the stream. I've tested it by modifying <TranscodeArgs> in config.xml and it works very nicely, but for it to be useful, it would need to be able to be set on the fly. Currently the /transcode stream request passes a number of on the fly aguments (source, resolution, bitrate etc). It would be really nice if there were a couple of user arguments that could be used to replace [USERARG] place holders in config.xml.
So my config.xml would have this line:-
and my javascript might say:-
Of course, it should be possible to replace any of the ffmpeg arguments that way.
So my config.xml would have this line:-
Code:
<TranscodeArgsxx>-y -v 0 [B]-ss [USERARG1] [/B]-i [SOURCE] -f mpegts -acodec ac3 -ab 96k -ar 44100 -ac 2 -s [RESOLUTION] -vcodec libx264 -b [BITRATE] -maxrate [BITRATE] -flags +loop -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -bufsize 96K -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect [ASPECT] -g 30 -async 2 [TARGET]</TranscodeArgsxx>
and my javascript might say:-
Code:
url = TVC.getStreamerBaseURL() + "/transcode?recording=" + recordingID + [B]"&userarg1=" + seektime[/B]&resolution=1920x1080&bitrate=4096k&mode=http&mime=video/MP2T";
Of course, it should be possible to replace any of the ffmpeg arguments that way.
Server: Ci5 2500k, 3GB, Windows Server 2012, nPVR 3.5.7. 2xWinTV-DVB-T USB, 1xWinTV-DVB-T PCI, 2 x BlackGold DVB-T, 1xPCTV290E and 1xPCTV460E on Astra 28.2 E.
clients: RPI2, Acer R3700, PCH-A110, NUC, 3xSamsung Smart TV