Jump to content

IPhone/IPod touch support


Lars_MQ

Recommended Posts

  • Replies 300
  • Created
  • Last Reply

Top Posters In This Topic

  • Lars_MQ

    95

  • aht961

    40

  • Bossmann

    18

  • ml 05019

    16

Top Posters In This Topic

Posted Images

Hi Lars

I really love your work but I also have problems with streaming video stopping after a couple of minutes. Doesn't matter if I choose live TV or a recorded file. I don't think it has to do with my computer being to slow. Processor load is maximum 30 40 % when playback stops. Used to run Air Video before - pointing to my DVBViewer timeshift file to be able to watch live TV on my Ipod - but that's a really a sneak method comparing to your Recording Service solution. Any other clues why my video stream stops after 2 minutes besides that I may have too little processing power?

Link to comment

I have updated to V85, in addition overclocked the AMD CPU to 2,75G (tested as stable), doubled the memory to 4G (ASUS M2A-VN mobo, with onboard ATI graphcs, running w/o monitor/keyboard or mouse). Removed all unnecessary installations and tuned to function at its upper limit. Tried 18639/21575. Still having the same problems: streaming starts (either recordings or liveTV), no glitches, superb quality until about two minutes, then all of sudden image freezes (on desktop Safari) or QT logo appears (on iphone mobile safari). This makes the power issue quaestionable. Is it really so that even 2,75G cannot keep up with real-time video conversion. During the streaming Processor load is about 32-35%. Please find attached the log.

 

Of note, I am testing only the SD mpegts streams. I have tried also HD stream, the image is so pixelised. With the V85, I have lost the possibility to check the connected clients through the web interface. With earlier versions, I was able to see the connected clients' IPs, now there appears to be no client even I recieve the stream to my iPhone.

Edited by aht961
Link to comment
Is the AMD a singlecore? It's (at least now) not important for encoding but it might be a threading issue in my code...

It is Athlon 64 X2 4850e, i.e dual core. Should I go back to Intel? I am ready to upgrade the processor if only I knew that it should be ok. One interesting finding is, though, before overclocking I could get to (if you remember) upto 2000 frames (about 80 secs), now it stops around 3500 frames (about 132 secs) with 10% increase in power? By the way, did you have any chance to look at the log - any hints? Does graphic card have anything to do with the decoding (I have ATI Radeon X1200 onboard, did not think of adding additional card since I do not use any monitor here)?

Edited by aht961
Link to comment

Wait before you change around everything. I'll test it on a (old) amd first. I'm not really sure what happens but it seems ffmpeg stops responding. It's not clear if it's because my code or ffmpeg gets stuck. So I have to check this first...

Link to comment
I've uploaded .85. Please test with non Ansi filenames and iphone streaming. :angry:

Sorry, no luck:

post-77068-1265602836_thumb.jpgpost-77068-1265603025_thumb.jpg

trying to play file: 01-01_14-03-39_LTV7_Mf Noīrēt tēti.ts

getting in logfile:

FFMPEG		   e:\MYVIDE~1\RECORD~1\отрывки\01-01_14-03-39_ltv7_mf noiret teti.ts: no such file or directory

It looks like Webinterface replaces unicode symbols to similar letters (e.g. ī -> i) not only in EPG data, but also in filenames. Lars, could you just remove this feature? Since there's no encoding issues in Webinterface, I see no reason why symbols should be swapped, plus, it cripples the language.

 

I also checked how filenames without non-ansi symbols are handled, and I could play them, but there's another issue with some of the files:

post-77068-1265603509_thumb.jpgpost-77068-1265603523_thumb.jpg

I cannot select quality preset before starting stream, plus, if I reload the page, the styling disappears. But still, it streams :P

 

Here's the logfile: (times shown on screenshots above are relevant to those in logfile)

Edited by ml 05019
Link to comment

OK was worth a try. Seem shortnames does not help.

I have not been able to send files with unicode filenames to ffmpeg.

if you open cmd.exe (dosprompt) can you start ffmpeg manually with this file (with a simple commandline, doesn't really matter what).

 

 

And it seems your CPU can't handle the transcoding. You need constant 50 fps in transcoding, but it goes down to 33...

Link to comment

Played with commandline (and also observed how AirVideo handles this) and found ;) :

 -i "E:\\My Videos\\Recorded TV\\\u041d\u043e\u0432\u043e\u0441\u0442\u0438\\01-21_19-50-52_TV3_TV3 Zi\u0146as.ts"

this way, it works :bounce:

Now I understood that ffmpeg itself was replacing symbols in filename - and not Webinterface - but still, do you consider removing the symbols replacing in EPG data in Webinterface?

And it seems your CPU can't handle the transcoding. You need constant 50 fps in transcoding, but it goes down to 33...

Does it matter that all my TV channels are 25 Hz?

Anyway, I don't care as long as it works. And, my iPod's battery life is short enough so I don't manage to see any jittering before battery dies :)

Link to comment

I don't know whether it's custom ffmpeg, but at least it didn't work with Recording service when I tried to copy the files from AirVideo installation folder. Why don't you just try and download it for yourself - it's free, after all?

<deleted>

Edited by ml 05019
Link to comment

Well, it would not help. I'm certainly not telling people: "You have to install air server and copy their custom compiled ffmpeg into the service program folder."

First it's really bad style and secondly, it's a custom made version, everything done specially for it would not work with different ("normal") ffmpeg versions. Sorry but that's not the way to go.

Link to comment

Well, if there's no way to make "regular" ffmpeg work with non-ansi filenames, this problem still can be solved from the opposite side.

I've suggested it before, and will suggest again: you could stop DVBViewer producing recordings with non-ansi filenames, e.g. swap the non-ansi symbols with latin letters? v4.3 is still in beta, so it's not too late.

Link to comment

Wow that's a nice idea. I throw away the work of months, just to support apple's gadgets... :)

I think I have a better idea. It adds a little overhead but it should be not too much. The service handles the reading of the file itself and feeds it via pipe into ffmpeg. Should be possible, though I have to test it. It might take some time, hopefully not too long, but I have several other things to do right now...

Link to comment
plus, FFmpeg is distributed under GPL/LGPL, so using custom ffmpeg is not prohibited

And the legal status is a little bit doubtful at least in some states, as they state in their FAQ. That's why I don't package ffmpeg with the service. If there were problems it would backlash on the whole DVBViewer project and that's not a chance I'm willing to take, no way.

Link to comment

OK, I'll forget this topic for a few months :) I'm not requiring you to support this, since you declared it an Alpha version. These all are just suggestions ;)

I throw away the work of months, just to support apple's gadgets

I didn't mean you should abolish all support of Unicode in entire DVBViewer, just add a post-processing of filenames to remove/swap non-ansi symbols in them. I had enough problems with filemanagers, graphics viewers etc. because of these filenames - should I now ask every author of every app I use to add support for non-ansi in their programs, or is it better to ask you to stop DVBViewer produce the source of all these problems? :bounce:

Edited by ml 05019
Link to comment

BTW how do you swap out: 怎样才能在(just some random text I use for unicode test, I don't know where I got it or what it means) for ansi chars? :)

Link to comment

I knew you will be asking it :) add a toggle in settings so Chinese users can disable it users like me could enable it!

What is more, this swapping is already being done for EPG in Webinterface (remembering what subforum are we in), so it's not something new I ask you to write.

P.S. http://translate.google.lv/#auto|en|%E6%80...%83%BD%E5%9C%A8

Edited by ml 05019
Link to comment

Actually this swapping is done because I haven't had the time nor the energy to convert the webtemplates and the code behind to utf-8. It would also required the language files to be changed, the search stuff and several other things.

Most parts are unicode aware now in the service, the webinterface is the last thing I have to change and I'm not looking forward to it, because I'm not exactly the html expert. And you have to remember there is only one person working on the DVBservice and everything around it, me and there is only so much I can do at once... :)

Link to comment

Hi Lars. I have been doing some testing and with the current settings problem-free liveTV streaming really seems to be a procesor dependent process, therefore, I suggest that you don't waste your time in changing the code, because: I just hit the 2872 MHz Core Speed and the problem I have mentioned earlier has disappeared. I am running already the 10th minute and there seems to be NO PROBLEM any more. Excellent picture and sound in sync. So one must go at least over 2,700MHz core speed with AMD Dual core in order to keep up with the streaming. (Overclocking hints for those using AMD Athlon 64 X2 4850e: Core Voltage 1,264V, Multiplier x12.5, Bus Speed 230 MHz and let the LDT Bus speed at Auto => 2871 MHz core speed, running stable).

 

Thank for your efforts in sorting out the problem. For me overclocking has sorted out the problem of abrupt stopping of the stream. With Intel processor, as in your case, probably less horse power seems to be sufficient.

Edited by aht961
Link to comment

And what comes to the fact that Air Video Server could do the same job with less horsepower is probably due to the different version of ffmpeg used there. At least when it is streamimg I always have 2 instances of ffmpeg running in the task manager. Could that explain the differences between the two?

Edited by aht961
Link to comment

I don't know. what happens if you put the ffmpeg from airserver into the DVBViewer folder? Does it lessen the cpu load?

and remember TVlive conversion is always something completely different than conversion of recordings...

Link to comment

I have tried copying the ffmpeg (and also all other files to be on the safer side, including the airserver itself) to the DVBViewer folder - it just does not function. Ffmpeg starts, but after a few seconds it aborts itself.

Link to comment

Since the streaming problem is over for me, now I was wondering:

 

- if it is possible to have the subtitles (DVB or teletext) in the ffmpeg's output stream?

ps: I understood that there are some options implemented in ffmpeg concerning the subtitles (like -scodec, -slang). Could this be sorted out?

Link to comment

I did some homework and trial and error to no avail.

Using the 18639 build, I could map the subtitle correctly by using the following parameters: (-scodec dvbsub -slang fin). In the log I could see that the dvbsub stream is mapped correctly (red):

 

Input #0, mpegts, from 'http://192.168.0.10:7522/upnp/channelstream/2.ts':

12.02.10 16:50:45.096 FFMPEG Duration: N/A, start: 59997.494011, bitrate: 8784 kb/s

12.02.10 16:50:45.096 FFMPEG Program 2

12.02.10 16:50:45.096 FFMPEG Stream #0.0[0x201]: Video: mpeg2video, yuv420p, 720x576 [PAR 16:15 DAR 4:3], 8400 kb/s, 25 tbr, 90k tbn, 50 tbc

12.02.10 16:50:45.096 FFMPEG Stream #0.1[0x294](ita): Audio: mp2, 48000 Hz, stereo, s16, 224 kb/s

12.02.10 16:50:45.096 FFMPEG Stream #0.2[0x295](dut): Audio: mp2, 48000 Hz, stereo, s16, 160 kb/s

12.02.10 16:50:45.096 FFMPEG Stream #0.3[0x7eb](fin): Subtitle: dvbsub

12.02.10 16:50:45.096 FFMPEG [libx264 @ 0x197d0f0]using SAR=46/45

12.02.10 16:50:45.096 FFMPEG [libx264 @ 0x197d0f0]using cpu capabilities: MMX2 SSE2Slow

12.02.10 16:50:45.096 FFMPEG [libx264 @ 0x197d0f0]profile Baseline, level 2.1

12.02.10 16:50:45.096 FFMPEG Output #0, mpegts, to '\\.\pipe\Output{BED3F349-91B9-46AC-9E0A-A207DC2BF4BC}':

12.02.10 16:50:45.096 FFMPEG Stream #0.0: Video: libx264, yuv420p, 480x368 [PAR 46:45 DAR 4:3], q=2-28, 200 kb/s, 90k tbn, 25 tbc

12.02.10 16:50:45.096 FFMPEG Stream #0.1(ita): Audio: libmp3lame, 48000 Hz, stereo, s16, 160 kb/s

12.02.10 16:50:45.096 FFMPEG Stream #0.2(fin): Subtitle: dvbsub

12.02.10 16:50:45.096 FFMPEG Stream mapping:

12.02.10 16:50:45.096 FFMPEG Stream #0.0 -> #0.0

12.02.10 16:50:45.096 FFMPEG Stream #0.1 -> #0.1

12.02.10 16:50:45.096 FFMPEG Stream #0.3 -> #0.2

12.02.10 16:50:45.096 FFMPEG Press [q] to stop encoding

 

However, later I get the following error:

12.02.10 16:50:48.630 FFMPEG [dvbsub @ 0x219ac60]error, non monotone timestamps 820287 >= 727508

12.02.10 16:50:48.630 FFMPEG av_interleaved_write_frame(): Error while opening file

 

If I use a newer ffmpeg build, I get rid of this error but then get instead:

 

12.02.10 16:48:41.242 FFMPEG [mpeg2video @ 0x16dc310]mpeg_decode_postinit() failure

...

12.02.10 16:48:45.293 FFMPEG [mpegts @ 0x179b900]st:2 error, non monotone timestamps 698484 >= 673403

12.02.10 16:48:45.293 FFMPEG av_interleaved_write_frame(): Error while opening file

 

Tried, read, googled, did not help. I hope somebody could comment/help with this matter?

Edited by aht961
Link to comment

That's not the way to go. You're creating (copying it to) a third stream. But you want to decode an "imprint" the subtitles directly into the image. The iphone will not handle a dvbsub stream.

According to this table (Codecs) this is not possible.

Link to comment

I have made some investigation around the streaming and ffmpeg.

 

I upgraded to the latest svn version of ffmpeg and tried streaming to my iphone with that version using RS.

 

Running FFMpeg command line and redir output to a file instead of the pipe to dvbservice works like a charm. FFMpeg runs like it should

and doesn't stop. This is with both Low and High quality, the difference is Low 60-70% CPU vs High 80-90% CPU.

 

We have the same problem as before with streaming from RS to iPhone. The stream starts but then stops after approx 1 minute.

What I found out now is that whe nthe stream stops you can go back and hit the play button again and then see the stream start again (not from the beginning but at the current offset).

After 1 min the stream stops again and I can just go back and hit the play button to start it and the current offset. This works everytime now when the stream stops.

 

According to this fact I believe that FFMpeg and the CPU is not the problem. CPU is still able to handle both low and high < 90% utilisation and FFMpeg doesnt exit, it still encodes the stream as it should.

 

It seems like could be something between FFMpeg and DVBService or DVBService and Client (iPhone).

Hopefully this could help to find a solution to the problem where the stream stops when streaming to iphone?

 

Fyi,

FFmpeg version SVN-r21819, Copyright © 2000-2010 Fabrice Bellard, et al.

 

/ D

Link to comment

I tried this with a recording, but the same thing happens with live-tv.

 

No, wireshark was not used. Althought I did try the stream a few days ago with VLC. Then I viewed the source of the iphone streaming page and downloaded the playlist and opened a url in the playlist directly in vlc I got the same behaviour. The stream started and then stopped after a while. BUt I didnt try to start the stream again after it had stopped so maybe I can try that if that would help out?

Link to comment
Althought I did try the stream a few days ago with VLC.

Forget it. This kind of streaming is very special, because playlist is dynamic and the player loads the playlist everytime new and updates the files to play. VLC won't do it, it will stop after about 6 seconds because it doesn't renew the playlist.

 

Your description sound like the transcoding continues to work but the connection gets terminated... if you start again from the streaming page without stopping the streaming "server", the connection resumes, the player gets the next files from the playlist. But why does the connection break? :(

Link to comment

New update: Previously, I mentioned that the interruption of the stream was sorted out by overclocking the CPU (AMD X2 64 4850) over 2,7GHz. However, due to some standby/resume problems with the current mobo and the Win 7, today I had to upgrade the bios, and various Win 7 patches from Asus (M2A-VM mobo) as well as the new realtek gigabyte network card's driver. Cleared CMOS, returned to default.

 

Now the streaming is functioning w/o overclocking with the default CPU speed at 2,5GHz. Processor load is 26-34%, Memory use by the ffmpeg is around 15000kt and 12100kt by DVBVservice.exe. CPU temp around 41C.

 

I don't mean that if you are having problems with the streaming that you should upgrade your bios and else, however, this indicates clearly that there are tens of possible reasons for these problems. In addition, I am sorry if I lead you in wrong direction by drawing too much attention to the horsepower of the CPU :(

Edited by aht961
Link to comment

×
×
  • Create New...