Luke 36888 Posted December 7, 2012 Share Posted December 7, 2012 I'm moving in the direction of you telling me what you want. So here are some new changes. The "format" param is gone and has been split into three new params. I'll break it down with each handler: Audio: - Specify "audioCodec" on the query string (aac/mp3), and the file will be encoded. Omit and it will be copied. HLS Audio: - You can now choose between aac and mp3 using "audioCodec", but unlike the regular audio streamer, this param is required. Video: - Specify "container" on the query string (asf/ts/webm), and the file will be encoded. Omit and it will be copied. - IF a container is specified, then specify "videoCodec" to encode the video stream, or omit to use the original. - IF a container is specified, then specify "audioCodec" to encode the audio stream, or omit to use the original. HLS Video: - Specify "videoCodec" to encode the video stream, or omit to use the original. Currently only h264 encoding is supported, so if you specify anything else it will just default to h264. - Specify "audioCodec" to encode the audio stream, or omit to use the original. Basically there is no more magic on the server to determine if we can copy the original streams or encode. It is up to you to decide based on your device capabilities. Link to comment Share on other sites More sharing options...
Luke 36888 Posted December 7, 2012 Author Share Posted December 7, 2012 Mark, Your upgrade path is: Audio: - Specify audioCodec=mp3 (although I would encourage you to see if you can handle the original file and omit this) Video: - Container = webm - videoCodec = Vpx - audioCodec = Vorbis - If you can play the original file directly, then omit all of those params. Link to comment Share on other sites More sharing options...
Luke 36888 Posted December 8, 2012 Author Share Posted December 8, 2012 Last but not least, the quality option is gone and you now have full control over the bitrate you get. Use the following params: videoBitrate=xxx audioBitrate=xxx If you omit these you'll get a default. FYI, here are he values we were using for quality level 6, so start with these and then lower based on your own network and performance criteria. Audio - Vorbis/aac 120000, mp3 320000 Video - Vpx 1900000, wmv 8000000, h264 1850000 So you can still have quality settings but now you get to choose your own bitrate for each level. Just worry about what you can handle from your point of view. The server may then lower the number you ask for based on it's own conditions (WEI). Tikuf, when working with the ui developers this should give you a lot more flexibility. Link to comment Share on other sites More sharing options...
Tikuf 663 Posted December 8, 2012 Share Posted December 8, 2012 Excellent. The wei matrix is still on my list (or have you got something in place already). Link to comment Share on other sites More sharing options...
Luke 36888 Posted December 8, 2012 Author Share Posted December 8, 2012 Nope, waiting for you. (No rush though, I've got more than enough to do). Link to comment Share on other sites More sharing options...
Tikuf 663 Posted December 8, 2012 Share Posted December 8, 2012 Yup cool as soon as Red pops his head up we will get back to resume debugging (hard for me alone as it all works as expected) . I was thinking we may be able to use an avisynth script to allow resume in folder rips (its on my white board) Link to comment Share on other sites More sharing options...
Luke 36888 Posted December 8, 2012 Author Share Posted December 8, 2012 Ok. I would prioritize subtitles over folder rip resume though. Link to comment Share on other sites More sharing options...
Tikuf 663 Posted December 8, 2012 Share Posted December 8, 2012 Im sort of treading water on subs atm waitint for zeranoe to put out a new build with the new subtitle support (it shouldn't be too long). In the mean time I may find a nightly somewhere and start playing with it. I still cant work out why Scott and Red are having sttttutter on resume one small tweak (and it may help Im waiting for red for a test) I would recommend is line 79 of the BaseProgressiveStreamingHandler.cs return string.Format("-ss {0}", (int)TimeSpan.FromTicks(time.Value).TotalSeconds - 20); (stripping the miliseconds) You will prob do it differently but essentially when seeking is prior to the -i it does a fast seek using keyframes only and it will alway land on a keyframe (this may be some of the issue). If we do a fast seek using key frames (seek before the -i) then a slow seek for exact time specified (after the -i). I have it hard coded at the moment (for testing which is not ideal) it would mean that the resume command would start with. ffmpeg -ss 1549 -i "blah.avi" -ss 15 So the beh. would be resume time -20 seconds (lands on keyframe) then slow seek for 15 seconds to find a time 5 seconds prior to the actual resume (I figured a small rollback would be good) Again not sure I have explained it well lmk if that is the case. Link to comment Share on other sites More sharing options...
Luke 36888 Posted December 8, 2012 Author Share Posted December 8, 2012 Yea, I get it. If you test and verify with them that it fixes it then I'll add it. Link to comment Share on other sites More sharing options...
Tikuf 663 Posted December 8, 2012 Share Posted December 8, 2012 Yup will get back to you. I'm figuring Red will have to do a fair bit of code refactor for the new urls anyhow. Link to comment Share on other sites More sharing options...
Tikuf 663 Posted December 8, 2012 Share Posted December 8, 2012 While I don't quite want to call this totally fixed until Scott has a chance to test. Red has just successfully resumed a number of movies that were stuttering using the above fixes So I am calling it as working until otherwise told Link to comment Share on other sites More sharing options...
Luke 36888 Posted December 8, 2012 Author Share Posted December 8, 2012 Excellent. Can you figure out the smallest possible offset that will work? For example, your original example is 20 seconds. Can you try 5? Or smaller? Link to comment Share on other sites More sharing options...
Tikuf 663 Posted December 8, 2012 Share Posted December 8, 2012 I chose 20 and 15 because the the standard gop lengths (unless specified) are fr*10 so we are pretty much assured we will get a good position. It should allow for audio to sync properly at those settings. Once you code the second -ss (after the -i) to appear only in a resumed c/l (at the moment as I have it hard coded it does a slow seek to 15 secs on every file I play) I will play with the values. Link to comment Share on other sites More sharing options...
Luke 36888 Posted December 8, 2012 Author Share Posted December 8, 2012 Yea, the more precise the better. Nice work, this sounds very promising. Link to comment Share on other sites More sharing options...
Luke 36888 Posted December 8, 2012 Author Share Posted December 8, 2012 In other nerd news, you guys are all accustomed to sending requests to the server and then getting a response back. But what if the server decided to randomly say hello?? Link to comment Share on other sites More sharing options...
Tikuf 663 Posted December 8, 2012 Share Posted December 8, 2012 Lol Im thinking all manner of things could be included. I like the idea "I'm sorry Dave. I can do that" "I'm telling your wife you're watching porn" Sending messages between attached clients could be a side effect too and kinda fun. Link to comment Share on other sites More sharing options...
Luke 36888 Posted December 8, 2012 Author Share Posted December 8, 2012 Hmm, interesting. Hadn't considered that idea. Link to comment Share on other sites More sharing options...
Redshirt 1487 Posted December 8, 2012 Share Posted December 8, 2012 In other nerd news, you guys are all accustomed to sending requests to the server and then getting a response back. But what if the server decided to randomly say hello?? Well there goes my weekend Link to comment Share on other sites More sharing options...
Tikuf 663 Posted December 8, 2012 Share Posted December 8, 2012 You could extend it to a messaging client of sorts. You could leave a message for another user that pops when they log in. Free sms to home base Link to comment Share on other sites More sharing options...
Xzener 729 Posted December 8, 2012 Share Posted December 8, 2012 "So and so just watched blah, blah, blah." Link to comment Share on other sites More sharing options...
Tikuf 663 Posted December 8, 2012 Share Posted December 8, 2012 That could be awkward for Red when he watches porn and his mum finds out Link to comment Share on other sites More sharing options...
Abobader 2934 Posted December 8, 2012 Share Posted December 8, 2012 That could be awkward for Red when he watches porn and his mum finds out ah, I wish I did not read this thread while drinking my coffee, it all over the keyboard now I like this msg/popup idea Well done all. Link to comment Share on other sites More sharing options...
ScottIsAFool 517 Posted December 8, 2012 Share Posted December 8, 2012 While I don't quite want to call this totally fixed until Scott has a chance to test. Just pulled the latest server code and tried doing a resume, still choppy here. For a brief moment (a second) I thought it was going to work, but then it just went to the same behaviour as before. Link to comment Share on other sites More sharing options...
Tikuf 663 Posted December 8, 2012 Share Posted December 8, 2012 Don't think it is in yet Scott Link to comment Share on other sites More sharing options...
Tikuf 663 Posted December 8, 2012 Share Posted December 8, 2012 Luke running the test with Scott also seams to have fixed the stutter (yay). When you get the chance if you could throw it in the core and I will play with the numbers. Cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now