Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
zimbra
Visitor

Re: Advice for Debugging playback?

I wrote this out, and forgot to submit, sorry for the delay.

"RokuKevin" wrote:
zimbra,

could you post the mp4info from your encoding? From your description, it sounds like you've chosen compatible settings...


I don't use mp4info, but atomicparsley says:

For the downsampled version

------------------------------------------------------
Total size: 558530607 bytes; 62 atoms total. AtomicParsley version: 0.9.0 (utf8)
Media data: 555197502 bytes; 3333105 bytes all other atoms (0.597% atom overhead).
Total free atom space: 264 bytes; 0.000% waste.
------------------------------------------------------
Movie duration: 5511.233 seconds (01:31:51.23) - 805.91* kbp/sec bitrate (*=approximate)
Low-level details. Total tracks: 2
Trk Type Handler Kind Lang Bytes
1 vide [none listed] avc1 und 465521553
675.76* kbp/s 5511.075 sec AVC Baseline Profile, Level 3 320x176 (220 macroblocks)
2 soun [none listed] mp4a eng 89675941
130.17 kbp/s 5511.233 sec MPEG-4 AAC Low Complexity Profile channels: [2]


This is the original file:



------------------------------------------------------
Total size: 1082293054 bytes; 69 atoms total. AtomicParsley version: 0.9.0 (utf8)
Media data: 1077949028 bytes; 4344026 bytes all other atoms (0.401% atom overhead).
Total free atom space: 2019 bytes; 0.000% waste. Padding available: 2019 bytes.
------------------------------------------------------
Movie duration: 5511.255 seconds (01:31:51.25) - 1564.72* kbp/sec bitrate (*=approximate)
Low-level details. Total tracks: 2
Trk Type Handler Kind Lang Bytes
1 vide Apple Video Media Handler avc1 eng 970249969
1408.44* kbp/s 5511.075 sec AVC Main Profile, Level 3 854x480 (1590 macroblocks)
2 soun Apple Sound Media Handler mp4a eng 107699051
160.00 kbp/s 5511.255 sec MPEG-4 AAC Low Complexity Profile channels: [2]
0 Kudos
zimbra
Visitor

TCPdump of http headers during rebuffering

Here's a list of the http headers I saw going back and forth during playback. The video in question was encoded at ~700bps, total file size of 558530607. Length is 91 minutes.

There are a few interesting things happening - during initial playback of the first several minutes of the movie, the player requests the whole video, then sends several quick requests for the 1M or so (with a range that varies back and forth a bit, around byte 556419183).

When I fast forwarded past the 1hr. mark, the rebuffering issue comes up, and I start seeing requests every few seconds (or several per second) for an earlier byte range (around 404105009 and up). This is at around 07:56:34 in the headers.

All requests are successfully served by the apache server.

I'm not clear what the box is looking for at the end of the file, or why it would keep requesting it - nor do I understand what the problem is with buffering in the middle of the file. Since this seems to happen at the 1 hr. mark reliably, regardless of file size or bitrate or whatever, I'm at a bit of a loss to explain why it's doing this.


GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
HTTP/1.1 200 OK
Date: Tue, 26 Jan 2010 07:48:56 GMT
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
HTTP/1.1 200 OK
Date: Tue, 26 Jan 2010 07:48:56 GMT
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=555197662-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:48:56 GMT
Content-Range: bytes 555197662-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=556783887-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:49:03 GMT
Content-Range: bytes 556783887-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=557117863-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:49:04 GMT
Content-Range: bytes 557117863-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=557255563-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:49:04 GMT
Content-Range: bytes 557255563-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=558205347-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:49:04 GMT
Content-Range: bytes 558205347-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=558324079-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:49:04 GMT
Content-Range: bytes 558324079-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=558530475-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:49:04 GMT
Content-Range: bytes 558530475-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=558205403-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:49:05 GMT
Content-Range: bytes 558205403-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
HTTP/1.1 200 OK
Date: Tue, 26 Jan 2010 07:49:05 GMT
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=557002235-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:49:06 GMT
Content-Range: bytes 557002235-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=556255343-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:49:06 GMT
Content-Range: bytes 556255343-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=557255951-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:49:06 GMT
Content-Range: bytes 557255951-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=168-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:49:06 GMT
Content-Range: bytes 168-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=556288111-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:49:26 GMT
Content-Range: bytes 556288111-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=557321487-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:49:29 GMT
Content-Range: bytes 557321487-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=556320879-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:50:06 GMT
Content-Range: bytes 556320879-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=557387023-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:52:21 GMT
Content-Range: bytes 557387023-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=556353647-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:55:14 GMT
Content-Range: bytes 556353647-558530606/558530607

Here's where I fast forwarded

GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
HTTP/1.1 200 OK
Date: Tue, 26 Jan 2010 07:56:32 GMT
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=557035003-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:56:33 GMT
Content-Range: bytes 557035003-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=556419183-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:56:33 GMT
Content-Range: bytes 556419183-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=557067771-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:56:33 GMT
Content-Range: bytes 557067771-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=556583023-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:56:34 GMT
Content-Range: bytes 556583023-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=557452559-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:56:34 GMT
Content-Range: bytes 557452559-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=404105009-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:56:34 GMT
Content-Range: bytes 404105009-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=404139476-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:56:34 GMT
Content-Range: bytes 404139476-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=404205571-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:56:34 GMT
Content-Range: bytes 404205571-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
HTTP/1.1 200 OK
Date: Tue, 26 Jan 2010 07:57:21 GMT
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=406168408-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:57:22 GMT
Content-Range: bytes 406168408-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=406203247-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:57:22 GMT
Content-Range: bytes 406203247-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=406341996-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:57:22 GMT
Content-Range: bytes 406341996-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
HTTP/1.1 200 OK
Date: Tue, 26 Jan 2010 07:57:59 GMT
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=408528522-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:58:00 GMT
Content-Range: bytes 408528522-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=408562133-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:58:00 GMT
Content-Range: bytes 408562133-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
HTTP/1.1 200 OK
Date: Tue, 26 Jan 2010 07:58:39 GMT
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=410962940-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:58:40 GMT
Content-Range: bytes 410962940-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=410998263-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:58:40 GMT
Content-Range: bytes 410998263-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
HTTP/1.1 200 OK
Date: Tue, 26 Jan 2010 07:59:16 GMT
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=413431814-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:59:17 GMT
Content-Range: bytes 413431814-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=413465039-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:59:17 GMT
Content-Range: bytes 413465039-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=413565708-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:59:17 GMT
Content-Range: bytes 413565708-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
HTTP/1.1 200 OK
Date: Tue, 26 Jan 2010 07:59:57 GMT
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=416088771-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:59:58 GMT
Content-Range: bytes 416088771-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=416180453-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 07:59:58 GMT
Content-Range: bytes 416180453-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
HTTP/1.1 200 OK
Date: Tue, 26 Jan 2010 08:00:41 GMT
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=419047857-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 08:00:42 GMT
Content-Range: bytes 419047857-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=419088597-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 08:00:42 GMT
Content-Range: bytes 419088597-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=556648559-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 08:01:10 GMT
Content-Range: bytes 556648559-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
HTTP/1.1 200 OK
Date: Tue, 26 Jan 2010 08:01:18 GMT
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=421636264-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 08:01:19 GMT
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=421674761-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 08:01:19 GMT
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
HTTP/1.1 200 OK
Date: Tue, 26 Jan 2010 08:01:53 GMT
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=423400047-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 08:01:54 GMT
Content-Range: bytes 423400047-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=423436472-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 08:01:54 GMT
Content-Range: bytes 423436472-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
HTTP/1.1 200 OK
Date: Tue, 26 Jan 2010 08:02:32 GMT
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=425847705-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 08:02:33 GMT
Content-Range: bytes 425847705-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=425881564-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 08:02:33 GMT
Content-Range: bytes 425881564-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
HTTP/1.1 200 OK
Date: Tue, 26 Jan 2010 08:03:08 GMT
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=427599913-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 08:03:09 GMT
Content-Range: bytes 427599913-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=557976847-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 08:03:34 GMT
Content-Range: bytes 557976847-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
HTTP/1.1 200 OK
Date: Tue, 26 Jan 2010 08:03:47 GMT
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=430346342-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 08:03:48 GMT
Content-Range: bytes 430346342-558530606/558530607
GET /Media/Movies/002%20Independence%20-%20iPod.mp4 HTTP/1.1
Range: bytes=430393725-
HTTP/1.1 206 Partial Content
Date: Tue, 26 Jan 2010 08:03:48 GMT
Content-Range: bytes 430393725-558530606/558530607
0 Kudos
RokuKevin
Visitor

StreamBitrates

Sorry for the confusion. It is indeed specified in Kbps.

TommyTheKid: It is important that you set it to the peak bw you will require (for audio and video) and if you are having playability problems you should "round up". You don't need to "round up" by a thousand though 😉 That would make the prebuffer for your stream starting pretty slow...
0 Kudos
bryankaiser
Visitor

Same issue

I'm working on replacing our training library with a Roku, but I'm running into the same buffering issues as others. I've been trying different things for about 2 weeks now with nothing positive to show for it. Here's where I'm at now:

I've ripped one of our in-house training DVDs, runtime 104 minutes.
Ran it through ffmpeg with the libx264 encoder.
The stream stops to rebuffer after 5-6 minutes and buffers every minute or so after that.

I've tried ffmpeg, handbrake, etc. I can't get anything to generate a stream the Roku seems happy with. Here's what atomicparsley has to say about the current file:

Movie duration: 6261.953 seconds (01:44:21.95) - 686.66* kbp/sec bitrate (*=approximate)
Low-level details. Total tracks: 2
Trk Type Handler Kind Lang Bytes
1 vide VideoHandler avc1 und 407745865
520.92* kbp/s 6261.953 sec AVC High Profile, Level 4 720x304 (855 macroblocks)
2 soun SoundHandler mp4a eng 129732034
165.74* kbp/s 6261.803 sec MPEG-4 AAC Low Complexity Profile channels: [2]


So, I have an h.264 video stream, 720x304, ~700kbps, High profile, Level 4 with a 2 channel AAC audio stream. This appears to me to be completely in line with the specs in the developer guide.

Here's the output from Apache while playing the video. There were about 4 - 5 instances of buffering during the 10 minutes or so I let it play.

192.168.1.200 - - [05/Feb/2010:08:37:34 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 200 544473964
192.168.1.200 - - [05/Feb/2010:08:37:34 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 6996021
192.168.1.200 - - [05/Feb/2010:08:37:35 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 5897728
192.168.1.200 - - [05/Feb/2010:08:37:35 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 5297284
192.168.1.200 - - [05/Feb/2010:08:37:35 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 4696872
192.168.1.200 - - [05/Feb/2010:08:37:49 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 1174200
192.168.1.200 - - [05/Feb/2010:08:37:49 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 96
192.168.1.200 - - [05/Feb/2010:08:37:50 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 1174184
192.168.1.200 - - [05/Feb/2010:08:37:53 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 6989752
192.168.1.200 - - [05/Feb/2010:08:37:53 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 5297268
192.168.1.200 - - [05/Feb/2010:08:37:53 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 5897680
192.168.1.200 - - [05/Feb/2010:08:37:27 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 200 544473964
192.168.1.200 - - [05/Feb/2010:08:37:53 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 2348288
192.168.1.200 - - [05/Feb/2010:08:38:30 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 6956984
192.168.1.200 - - [05/Feb/2010:08:39:14 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 5264500
192.168.1.200 - - [05/Feb/2010:08:39:14 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 5864912
192.168.1.200 - - [05/Feb/2010:08:39:17 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 2282752
192.168.1.200 - - [05/Feb/2010:08:39:27 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 6924216
192.168.1.200 - - [05/Feb/2010:08:40:22 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 2249984
192.168.1.200 - - [05/Feb/2010:08:40:40 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 6891448
192.168.1.200 - - [05/Feb/2010:08:41:46 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 5231732
192.168.1.200 - - [05/Feb/2010:08:41:46 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 5832144
192.168.1.200 - - [05/Feb/2010:08:41:56 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 2217216
192.168.1.200 - - [05/Feb/2010:08:42:32 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 6858680
192.168.1.200 - - [05/Feb/2010:08:44:01 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 2184448
192.168.1.200 - - [05/Feb/2010:08:45:02 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 6825912
192.168.1.200 - - [05/Feb/2010:08:46:07 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 5198964
192.168.1.200 - - [05/Feb/2010:08:46:07 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 5799376
192.168.1.200 - - [05/Feb/2010:08:46:28 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 2151680
192.168.1.200 - - [05/Feb/2010:08:47:44 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 6793144
192.168.1.200 - - [05/Feb/2010:08:49:15 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 2118912
192.168.1.200 - - [05/Feb/2010:08:37:53 -0700] "GET /encodes/TEST.m4v HTTP/1.1" 206 544473920


Last, but not least, here's my XML for this video:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed>
<!-- resultLength indicates the total number of results for this feed -->
<resultLength>1</resultLength>
<!-- endIndix indicates the number of results for this *paged* section of the feed -->
<endIndex>1</endIndex>
<item sdImg="http://192.168.1.98:8080/images/TEST.jpg" hdImg="http://192.168.1.98:8080/images/TEST.jpg">
<title>Test</title>
<contentId>10001</contentId>
<contentType>movie</contentType>
<contentQuality>SD</contentQuality>
<media>
<streamFormat>mp4</streamFormat>
<streamQuality>SD</streamQuality>
<streamBitrate>700</streamBitrate>
<streamUrl>http://192.168.1.98:8080/encodes/TEST.m4v</streamUrl>
</media>
<synopsis>Testing</synopsis>
<genres>Movie</genres>
<runtime>6240</runtime>
</item>
</feed>


If anyone, especially anyone from Roku, can shed any light on this I would really, really appreciate it. The project is pretty much dead in the water until I get this figured out.

Also, I'd be really interested if anyone from Roku has ever created a stream successfully using handbrake, ffmpeg, etc. I'd assume that most of the content companies are using something like Compressor to do all their encoding. That makes me wonder if it's something about the x264 encoder that's causing the issue. It'd be great if Roku could generate a working stream and then tell us what settings they've used. It seems like there are quite a few people with this particular problem.
0 Kudos
RokuMarkn
Visitor

Re: Advice for Debugging playback?

I'm curious if anyone has seen this issue on content that was NOT ripped from a DVD. All the reports that I recall mention DVDs.

--Mark
0 Kudos
bryankaiser
Visitor

Re: Advice for Debugging playback?

That's a great point. I'll see if I can get some source material and see if I can get it to work.
0 Kudos
bbefilms
Visitor

Re: Advice for Debugging playback?

We were having tremendous problems with rebuffering non-reipped HD in H264 codec produced via Apple Compressor with the apple H264 codec until we swapped over the X264 codec instead.
0 Kudos
TommyTheKid
Visitor

Re: Advice for Debugging playback?

Interesting, I am using handbrake on Apple OSX, probably using the Apple Codec, guess I will look into encoding using x264 and see what happens.

~tommy
0 Kudos
bryankaiser
Visitor

Small Success

I've spent the last few days trying to tackle this problem and I've had some small successes. I'll try to keep this as brief as I can.

I believe the audio stream is at fault for the constant rebuffering problem. I took RokuMarkn's advice and started looking at whether it was only content ripped from DVDs that was exhibiting this behavior. I tried the process with several DVDs, as well as material from various sources (archive.org, podcasts, etc.), anywhere I could find content over 60 minutes. Here's the ffmpeg command I would use:

ffmpeg -i SOURCE_VOB -acodec aac -ab 160k -ac 2 -vcodec libx264 -vpre normal -crf 22 -threads 0 OUTPUT.mp4


With the DVD content I was trying to convert originally this would result in videos that would start rebuffering after 20 minutes or so. I also tried Handbrake, MediaCoder, you name it. All exhibited the same problem. With the content I had downloaded, this process worked. All the videos played with no rebuffering. Being a DVD source did appear to have something to do with it.

I decided to try moving the content to a "middle tier" format. Something that was relatively high quality, but transcoded from the original DVD. I used AutoGK to create an XviD version of the content, then transcoded again using my ffmpeg command from above. The quality suffered considerably, but the video played on the roku without incident. No rebuffering. So, there was indeed an issue going directly from the DVD.

Not happy with the quality I was getting using the XviD interim step, I decided to try and track down what exactly the issue was. I eventually ended up using the audio stream from the XviD encode, but using the video stream from the original VOB file. This also worked with no rebuffering on the roku. This is what leads me to believe that there is an issue with the audio (ac3) stream coming off of the DVDs.

I've now simplified my process and it has worked on several discs that were problematic before. I'm now using ffmpeg with BeSweet. I first rip the ac3 audio track off of the VOB file and convert it to a WAV with BeSweet. I then encode using ffmpeg with the video stream coming from the VOB file and the audio coming from the WAV. Here are the commands I'm using currently:

ffmpeg -i INPUT.vob -vn -acodec copy INPUT.ac3

BeSweet.exe -core( -input "INPUT.ac3" -output "INPUT.wav" -2ch ) -azid( -n1 -c normal -L -3db --maximize ) -profile( ~~~~~ Default Profile ~~~~~ )

del INPUT.ac3

ffmpeg -i INPUT.vob -i INPUT.wav -map 0:0 -map 1:0 -acodec aac -ab 160k -ac 2 -vcodec libx264 -vpre normal -crf 21 -threads 0 -s 720x480 -t 1:39:39 -aspect 4:3 -r 29.97 OUTPUT.mp4

del INPUT.wav


I was trying to deal with some inconsistencies I was getting from ffmpeg, that's why I'm specifying the size (-s), aspect ratio (-aspect), frame rate (-r) and the duration (-t). I'm also currently shaving about 1 second off the total runtime. I thought this was necessary at one point, but I'm not sure it is now. It works though, so I'd hate to waste the time running another encode just to find out it does need to be there. It typically just cuts off a blank screen, so it's no real loss.

Oh, I'm also ripping the DVDs into one VOB file. DVD Shrink will do this. That's the only way I've gotten it to play nicely with ffmpeg.

I do still have a couple of issues to deal with: No program I've found gives an accurate duration of the video. They are all within a few seconds, but my encoded videos are typically 3-6 seconds longer than what VLC might report. Everything is in sync though, so maybe it's just an artifact from ffmpeg (or the encoders). I also did have one video where the audio appears to be running at a different rate than the video. The extracted audio was 1:30:00 and the extracted video was 1:29:54. This caused all sorts of sync issues, and I'm still dealing with that one.

So much for keeping this short. I hope someone else finds something useful here. I still don't know what it is about the ac3 stream that's causing the issue. Maybe I'll do a little more research, but I'm honestly kind of burned out right now. Good luck.
0 Kudos
TommyTheKid
Visitor

Re: Advice for Debugging playback?

so, basically, it looks to me like you are down-mixing the audio from AC3 to 2 channel, have you tried doing that on the "HandBrake" type app directly?

Tommy
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.