Monday, 15 June 2015

ios - Using AVAssetReader reading HLS .ts segments -



ios - Using AVAssetReader reading HLS .ts segments -

in effort extract raw cmsamplebufferref hls live stream (for re-encoding video), i'm trying utilize avassetreader read hls stream (.m3u8 file). since reading network stream straight not supported avassetreader, i'm trying download .ts files listed in hls m3u8 index file local drive first, read using avassetreader. however, when tried opening .ts file avassetreader, i'm getting error "this media format not supported" (error domain=avfoundationerrordomain code=-11828 "cannot open" userinfo=0x7fd3aa723570 {nslocalizedfailurereason=this media format not supported).

does know if avassetreader supports reading .ts (mpeg2 transport stream) local drive? if not, there other way create/extract cmsamplebufferref hls stream? thanks!

ios avfoundation share|improve question asked nov 2 '14 @ 4:16 clx 6026 add comment |  1 reply 1 active oldest votes up vote 0 down vote

as far know, not. however, seems straightforward extract sound , video streams ts manually. wwdc session 513 wwdc2014 has great session on videotoolkit, , happens talk muxing/demuxing ts @ high level. maybe i'm missing something, seems can take 2 first blocks of info , extract pps , sps these, create cmvideoformatdescriptionref these, , alter start code next nal units length header , feed these straight vtdecompressionsession. this answer goes through these steps in detail.

alternatively, here's a cocoapod remuxes ts2 mp4.

share|improve answer edited may 13 '15 @ 0:33 answered may 13 '15 @ 0:11 nevyn 3,39021725 add comment |  your answer stackexchange.ifusing("editor", function () { stackexchange.using("externaleditor", function () { stackexchange.using("snippets", function () { stackexchange.snippets.init(); }); }); }, "code-snippets"); stackexchange.ready(function() { inittagrenderer("".split(" "), "".split(" ")); stackexchange.using("externaleditor", function() { // have fire editor after snippets, if snippets enabled if (stackexchange.options.snippets.enabled) { stackexchange.using("snippets", function() { createeditor(); }); } else { createeditor(); } }); function createeditor() { prepareeditor({ heartbeattype: 'answer', convertimagestolinks: true, reputationtopostimages: 10, bindnavprevention: true, postfix: "", ondemand: true, discardselector: ".discard-answer" ,immediatelyshowmarkdownhelp:true }); } });   draft saved draft discarded sign or log in stackexchange.ready(function () { stackexchange.helpers.onclickdraftsave('#login-link'); });

sign using google

sign using facebook

sign using email , password

post guest name email stackexchange.ready( function () { stackexchange.openid.initpostlogin('.new-post-login', 'http%3a%2f%2fstackoverflow.com%2fquestions%2f26695998%2fusing-avassetreader-reading-hls-ts-segments%23new-answer', 'question_page'); } ); post guest name email discard

posting answer, agree privacy policy , terms of service.

not reply you're looking for? browse other questions tagged ios avfoundation or ask own question.

asked

1 year ago

viewed

179 times

active

10 months ago

var ados = ados || {}; ados.run = ados.run || []; ados.run.push(function () { ados_add_placement(22,8277,"adzerk451604768",[5,17,2221]).setzone(45); }); ;"use strict";var _extends=object.assign||function(n){for(var i,r,t=1;t0&&(n.tags=i.join(";"))),n}function k(n){return n.innerhtml.replace(/\s+$/g,"")}function st(n,t,i,u){var c=r(n);if(c===null)return function(){};var h=null,e=null,l=f(),a=function a(){k(c)?(s(h),u(!1,f()-l)):e=o(a,t)};return e=o(a,t),i&&(h=o(function(){s(e);u(!0,f()-l)},i)),function(){s(e);s(h)}}function ht(){var t="careers1",i="careers3",u=e.hash.indexof("large=1")!==-1||!g()||r("#careersadsdoublehigh"),f=u?1:2,n=[f+"=hireme"];return r("#"+t)&&n.push("5="+t),r("#"+i)&&n.push("6="+i),n.join("&")}function d(n,i){var r=ot(_extends({},nt,{zones:ht()})),u,e;n&&(r.azt=1);i&&(r.lw=i);typeof t.innerwidth=="number"&&(r.bw=t.innerwidth);u=["zones","ip","ac","eng","prov","tags","theme","at","remote","seed","lw","azt","sysadmin","bw","nocpm","jobview","cpview"];e=l+"?"+ft(r,u);c=f();p(e)}function ct(n){function h(){u.foreach(w);e.foreach(function(n){lt(n,i[n],s,o)});typeof t.clc_after_load=="function"&&t.clc_after_load()}var i=n.cr,r=n.h,u=n.st,e=object.keys(i),o=c?f()-c:0,s="//"+r+"/ct";h()}function lt(n,t,i,f){var h=t.cl,c=t.cn,o=t.an,l=t.utm,s=(h||[]).join(" "),e=r("#"+n);e&&(s&&(e.classname+=" "+s),e.innerhtml=c.replace("&pt=0","&pt="+(f||0)),e.onmousedown=function(n){for(var t=n.target,r,f,s;t.tagname!=="a"&&t!==e;)t=t.parentnode;t!==e&&(r=[],o&&r.push("an="+o),f=[].filter.call(t.attributes,function(n){return/^data-/.test(n.name)}),f.length>0&&f.foreach(function(n){var t=n.name.replace(/^data-/,"");r.push(u(t)+"="+u(n.value))}),r.push("utm="+u(rt+l)),s="",r.length>0&&(s="?"+r.join("&")),t.href=i+s)})}function g(){return y(h).length>0}function at(n){var t=i.createelement("a");return t.href=n,t.host}function vt(){var t,n;g()?(n=st(h,20,t,d),o(function(){var u=r(h),t;k(u)||(u.parentnode.removechild(u),typeof n=="function"&&n(),t=i.createelement("img"),t.src="//"+at(l)+"/to.gif",t.style.display="none",i.body.appendchild(t))},2e3)):d()}var l=n.u,a=n.o,nt=a===undefined?{}:a,t=window,e=t.location,u=t.encodeuricomponent,v=t.decodeuricomponent,i=t.document,tt=i.body,it=i.getelementsbytagname("head")[0],o=t.settimeout,s=t.cleartimeout,rt="&utm_source="+e.hostname+"&utm_medium=ad&utm_campaign=",h="#sidebar [id^=adzerk].everyonelovesstackoverflow",c=0;t.clc={init:ct,load:vt,ls:p,as:w,tags:b}}).call(null, {"u":"//clc.stackoverflow.com/p.js"});"use strict";var allowedhosts=["stackoverflow.com","serverfault.com"];(allowedhosts[0]==="*"||allowedhosts.indexof(location.hostname)!==-1)&&window.clc.load(); linked 9 extracting h264 cmblockbuffer related 3 avassetreader doesn't read whole file? 0 read sample @ specified time avassetreader/alternative 2 avassetreader reads audio, fails 26 using avassetreader read (stream) remote asset 6 basic avassetreader problems reading video samples 2 read multiple tracks avassetreader 1 difference between how avassetreader , audiofilereadpackets reads audio 1 why receiving few sound samples per sec when using avassetreader on ios? 0 reading 2 files 1 after other using avassetreader 1 how read avcomposition avassetreader hot network questions idiom or proverb implies " evidence contradicts claim" tikz: missing parts of flow chart changing way of how 3-way handshake (tcp) works on linux general strategies write big code in mathematica? 1 lite year diameter planet ac sorcerer's draconic resistance combine monk's unarmoured defence? upgrading ram in hp laserjet printer improve performance? why aren't diagonal counts used in mcnemar's test? english language equivalent of polish saying "a peasant can leave village, small town never leave peasant" how gravity work seeking texts of prayers associated clock alter part of harm halved/doubled harm resistance/vulnerability? hard 1 person ride tandem bike? ok go postdocs help? how handle players create unmotivated characters selecting enum payment transaction reversing digits of infinite decimal how delete line using shortcut in gedit? https secure on public wifi expired certificate making acronym how can discourage camping while still supporting "sniper" style of play? faculty hiring committees overly polite on "denial" answers 7-year old asperger caught stealing - how deal okay utilize public method within own class? more hot questions


No comments:

Post a Comment