Sign up here and you can log into the forum!

Files not playing

The place for n00b questions, anything goes...no n00b too n00bish.

Files not playing   

Postby nixxo » Sun Nov 22, 2015 12:18 pm

Hi.
Can someone with technical experience explain, or find out, why this two mp4 files behave differently on the wdtv.

One plays fine: http://vodpmd.la7.it.edgesuite.net/content/entry/data/0/239/0_y8smrwjr_0_980cvjxe_1.mp4
while the other doasn't: http://vodpmd.la7.it.edgesuite.net/content/entry/data/0/241/0_8967wk2x_0_oqnrnd84_1.mp4

I downloaded both files and with checked with mediainfo: they seem both identical. But they obviously they are not because one plays and the other doesn't.

The behaviour is also present when playing the files with an umsp plugin i'm trying to develop. Some files plays fine while others don't and obviously I won't release a plugin that doesn't work properly.

p.s. I'm on Gen3 but i don't think that matters.
nixxo
WDTVer
 
Posts: 33
Joined: Sat Oct 17, 2015 12:11 am

Re: Files not playing   

Postby mad_ady » Tue Nov 24, 2015 12:03 am

You should also look at HTTP headers. Maybe for one file you have a different content-type, or different headers that might cause the WDTV to interpret the files differently.

But since it doesn't play downloaded files, I don't really know. You can try to run MediaLogic (the renderer inside WDTV) in debug mode and see what it spits out:

Code: Select all
killall MediaLogic
MediaLogic AV MSGL_DBG
User avatar
mad_ady
Developer
 
Posts: 4562
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Files not playing   

Postby nixxo » Tue Nov 24, 2015 12:47 am

mad_ady wrote:You should also look at HTTP headers. Maybe for one file you have a different content-type, or different headers that might cause the WDTV to interpret the files differently.

But since it doesn't play downloaded files, I don't really know. You can try to run MediaLogic (the renderer inside WDTV) in debug mode and see what it spits out:

Code: Select all
killall MediaLogic
MediaLogic AV MSGL_DBG


Thanks for the tip.

file playing fine:
****************************************************************************************

HW:HW_Play:2103 - call DCCPlayVideoSource
HW:HW_Play:2130 - call DCCPlayAudioSource
HW:HW_SetAudioDelay:6445 - call DCCSTCSetAudioOffset (delay_ms: 25)
HW:HW_Play:2148 - sal_dcc->pStcSource 1/1
HW:HW_Play:2151 - call DCCSTCPlay
HW:HW_Play:2155 - exit
player:mov_turnon_subtitle:375 - enter
player:mov_turnon_subtitle:494 - exit
Send h264 header! size = 43
HW:HW_SetSTCatFirstTime:3030 - (PresentionTime: 0, set_pts: Y, hw_data->SetSTCatFirstTime: Y)
HW:HW_SetSTCatFirstTime:3035 - enter
HW:HW_SetSTCatFirstTime:3069 - call DCCSTCSetTime (setTime: 0, Videotime_resolution: 90000, Audiotime_resolution: 90000)
HW:HW_SetSTCatFirstTime:3085 - (hw_data->HW_BufferingData.state: 0, M: 1, N: 1)
prebuf:HW_SetPreFIFOWait:2888 - Rebuffering, Please wait a moment (buff_feed: 1448353544/1 seconds)
HW:HW_SetSTCatFirstTime:3133 - exit
HW:HW_CheckPreFIFOEvents:2993 - RUAWaitForMultipleEvents error (err: 7,RM_PENDING, decoder: 26, tagname: VIDEO)
HW:HW_CheckPreFIFO:2970 - Force to play ... (line: 3360)
prebuf:HW_SetPreFIFODone:2871 - Finish rebuffering, spend (buff_done: 1448353545/1/3 seconds, 2592 millisecond, log2BufferSize: 15, BufferCount: 15/32)
HW:HW_Play:2092 - enter (mode: 0xf)
********** (EM86xx/3_8_0/em86xx_player.c:2098 , STC: 0, 0 secs) **********
Video (Data 1a: st=95a89000 sz=4194304 wr=3505561 rd=688742 --> f : 16.42)
Video (XFER 1a: st=95e8e088 sz=17 wr=0 rd=16 er=0 --> f : 94.12)
Audio (Data 1c: st=93779000 sz=3145728 wr=2998066 rd=147661 --> f : 4.69)
Audio (XFER 1c: st=93a84924 sz=17 wr=16 rd=0 er=0 --> f : 0.00)
****************************************************************************************


file crashing:
****************************************************************************************

HW:HW_Play:2103 - call DCCPlayVideoSource
HW:HW_Play:2130 - call DCCPlayAudioSource
HW:HW_SetAudioDelay:6445 - call DCCSTCSetAudioOffset (delay_ms: 25)
HW:HW_Play:2148 - sal_dcc->pStcSource 1/1
HW:HW_Play:2151 - call DCCSTCPlay
HW:HW_Play:2155 - exit
player:mov_turnon_subtitle:375 - enter
player:mov_turnon_subtitle:494 - exit
Send h264 header! size = 43
HW:HW_SetSTCatFirstTime:3030 - (PresentionTime: 0, set_pts: Y, hw_data->SetSTCatFirstTime: Y)
HW:HW_SetSTCatFirstTime:3035 - enter
HW:HW_SetSTCatFirstTime:3069 - call DCCSTCSetTime (setTime: 0, Videotime_resolution: 90000, Audiotime_resolution: 90000)
HW:HW_SetSTCatFirstTime:3085 - (hw_data->HW_BufferingData.state: 0, M: 1, N: 1)
prebuf:HW_SetPreFIFOWait:2888 - Rebuffering, Please wait a moment (buff_feed: 1448353649/2 seconds)
HW:HW_SetSTCatFirstTime:3133 - exit
MOV_GetFrame:4212, stream[1], sample[0], pts < 0
MOV_GetNextFrame:4529, MOV_GetFrame() fail!
player:mov_threadbody:2317 - MOV_SendBuf error
HW:HW_WaitEOS:2574 - enter

HW:HW_CheckPreFIFO:2970 - Force to play ... (line: 2581)
prebuf:HW_SetPreFIFODone:2871 - Finish rebuffering, spend (buff_done: 1448353649/0/2 seconds, 1644 millisecond, log2BufferSize: 15, BufferCount: 32/32)
HW:HW_Play:2092 - enter (mode: 0xf)
********** (EM86xx/3_8_0/em86xx_player.c:2098 , STC: 0, 0 secs) **********
Video (Data 1a: st=95a89000 sz=4194304 wr=4194302 rd=1 --> f : 0.00)
Video (XFER 1a: st=95e8e088 sz=17 wr=16 rd=0 er=0 --> f : 0.00)
Audio (Data 1c: st=93779000 sz=3145728 wr=3145727 rd=0 --> f : 0.00)
Audio (XFER 1c: st=93a84924 sz=17 wr=16 rd=0 er=0 --> f : 0.00)
****************************************************************************************


it sems, for the little knowledge that I have, that the file has a frame that crashes the wdtv. Oblviously the problem is not there if the same file is remuxed in mkv, so the frame itself in not the problem, it'e the mp4 muxing that create the problem...

Am I correct?
And secondly, this is not a solvable problem if I want to play that file with a umsp plugin, I guess, correct?
nixxo
WDTVer
 
Posts: 33
Joined: Sat Oct 17, 2015 12:11 am

Re: Files not playing   

Postby mad_ady » Tue Nov 24, 2015 1:02 am

It might depend on the device and firmware you're running. Unfortunately there's no easy way to detect good files from bad files, so even if you would write a proxy script to do container transcoding, you couldn't direct only bad files to it.

If you search the UMSP forum you'll find a thread discussing transcoding on the WDTV and the news is bad. I managed to do a bit of container transcoding but couldn't get more than 15fps out of it.

You could let the end user decide. E.g. write the plugin asuming that video works and inform the end user that some clips are broken and not bother with them...
User avatar
mad_ady
Developer
 
Posts: 4562
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Files not playing   

Postby nixxo » Wed Nov 25, 2015 6:21 am

mad_ady wrote:It might depend on the device and firmware you're running. Unfortunately there's no easy way to detect good files from bad files, so even if you would write a proxy script to do container transcoding, you couldn't direct only bad files to it.

If you search the UMSP forum you'll find a thread discussing transcoding on the WDTV and the news is bad. I managed to do a bit of container transcoding but couldn't get more than 15fps out of it.

You could let the end user decide. E.g. write the plugin asuming that video works and inform the end user that some clips are broken and not bother with them...


Thanks again for the tip. Looking around (i downloaded the complete svn repo and searched for "ffmpeg" occurrences) I managed to write down this thing that seem to work.
Just a little change in the file container, no re-encode needed.
Code: Select all
header('Content-Type: video/x-flv');
header('Content-Disposition: attachment; filename="crozza.flv"');
header('Cache-control: no-cache');
header('Connection: keep-alive');
$cmd = "ffmpeg -i '" . $url . "' -vcodec copy -acodec copy -f flv pipe:1 2>/tmp/ffmpeg-umsp.log ";
_logInfo("Transcoding with command: $cmd");
set_time_limit(0);
passthru($cmd);


But it has no duration displayed... it's normal, right?
nixxo
WDTVer
 
Posts: 33
Joined: Sat Oct 17, 2015 12:11 am

Re: Files not playing   

Postby mad_ady » Wed Nov 25, 2015 11:40 pm

Yes, it's normal. If you do on the fly transcoding you lose duration and ability to move FF/REW in the clip.

It should also take a bit longer to start (it needs to fill WD's buffer of 2MB) before playback begins. If transcoding can't keep up with fps, you will also get "pauses" in playback - the buffer is empty and needs to refill.
User avatar
mad_ady
Developer
 
Posts: 4562
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Files not playing   

Postby nixxo » Thu Nov 26, 2015 2:16 am

mad_ady wrote:Yes, it's normal. If you do on the fly transcoding you lose duration and ability to move FF/REW in the clip.

It should also take a bit longer to start (it needs to fill WD's buffer of 2MB) before playback begins. If transcoding can't keep up with fps, you will also get "pauses" in playback - the buffer is empty and needs to refill.


no problem with speed, ffmpeg can remux the file at about double the fps of the actual file since it doesn't involve transcoding but only remuxing.
nixxo
WDTVer
 
Posts: 33
Joined: Sat Oct 17, 2015 12:11 am


Return to n00b central

Who is online

Users browsing this forum: No registered users and 4 guests