ystv / PiVT

PiVT Video Server (based on OMXPlayer)
7 stars 2 forks source link

problems with config #9

Closed deedos closed 10 years ago

deedos commented 10 years ago

Hi @samdnic , this is my config file https://gist.github.com/deedos/8587770 , good to note that your pre-compiled seamless loop binary "/home/pi/src/omx_seamless_loop/omxplayer" is working fine.

thanks in advance

samdbmg commented 10 years ago

Can you pull the change I've made in the last few minutes and then edit line 23 of PiVT.py to say: LOG_LEVEL = logging.DEBUG

Once you've done that can you rerun PiVT and attach the log output; it should show exactly what OMXPlayer returned when it tried to get the length of the stopvideo.

deedos commented 10 years ago

Hi! Thank you very much for the attention. Done that and the debug output follows

DEBUG:Unable to match duration from data: file : /home/pi/videos/stopvideo.mp4 result 6 format mov,mp4,m4a,3gp,3g2,mj2 audio streams 1 video streams 1 chapters 0 subtitles 0 length 4

ffmpeg returns this about the video file:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'stopvideo.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 1970-01-01 00:00:00 title : esc-trecho-loop-ok.mp4 encoder : Lavf53.24.0 Duration: 00:00:04.27, start: 0.000000, bitrate: 1940 kb/s Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 580x340 [SAR 1:1 DAR 29:17], 1837 kb/s, 28.06 fps, 28.06 tbr, 28064 tbn, 1073741824 tbc Metadata: creation_time : 1970-01-01 00:00:00 handler_name : VideoHandler Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 160 kb/s Metadata: creation_time : 1970-01-01 00:00:00 handler_name : SoundHandler

Seems like a problem with the file.. what should I try ?

thanks again

deedos commented 10 years ago

Hi. Updating here.. I tried with 2 other online sample video files, using those as stopvideos http://techslides.com/demos/sample-videos/small.mp4 and http://a1408.g.akamai.net/5/1408/1388/2005110403/1a1a1ad948be278cff2d96046ad90768d848b41947aa1986/sample_iPod.m4v.zip (renamed to .mp4) With the first I got the same error as before. With the second, I get stuck in

2014-01-24 10:05:56,596:INFO:Getting playlist item durations... for ages (tried to connect with the cliente and nothing..). Just go over that with ctrl-c that telss me:

2014-01-24 10:06:55,105:ERROR:Failed to get duration for /home/pi/videos/stopvideo.mp4 Traceback (most recent call last): File "/home/pi/src/PiVT/pivtfilelist.py", line 72, in get_omx_duration data = subprocess.check_output([_OMX_COMMAND, '-i', item], shell=False, stderr=subprocess.STDOUT) File "/usr/lib/python2.7/subprocess.py", line 538, in check_output output, unused_err = process.communicate() File "/usr/lib/python2.7/subprocess.py", line 746, in communicate stdout = _eintr_retry_call(self.stdout.read) File "/usr/lib/python2.7/subprocess.py", line 478, in _eintr_retry_call return func(*args) KeyboardInterrupt 2014-01-24 10:06:55,124:ERROR:Unable to read the stopvideo or any playlist items. Shutting down 2014-01-24 10:06:55,129:ERROR:Exception caught, shutting down

thanks

samdbmg commented 10 years ago

Thanks for these. I've had a go with some of my own videos and the two links you provided, and I can't reproduce your problem. I've made a minor tweak which might fix the freezing up problem, but I don't think so.

Has pivtfilelist.py been modified at all? Is there a vanilla OMXPlayer in /usr/bin to use for getting the durations? What happens if you use vanilla OMXPlayer with seamless loop turned off?

Thanks

deedos commented 10 years ago

Hi Sam! 1 - pivtfilelist.py is the original one. 2 - Had tried with both omxplayer vanilla and seamless loop omxplayer.. With both set to "True" and "False" for cleanloop in config.yaml.

I had a go with a 4 video playlist, cleanloop set to False and vanilla omxplayer, here what I get:

python PiVT.py --config config.yaml 2014-01-27 09:39:11,457:INFO:PiVT starting up 2014-01-27 09:39:11,643:WARNING:Ignoring redundant stopvideo as a playlist was set 2014-01-27 09:39:11,648:INFO:Setting up logging to pivtlog.log 2014-01-27 09:39:11,652:INFO:Configuration loaded 2014-01-27 09:39:11,656:INFO:Getting playlist item durations... 2014-01-27 09:39:11,914:DEBUG:Unable to match duration from data: file : /home/pi/videos/stopvideo.mp4 result 23 format mov,mp4,m4a,3gp,3g2,mj2 audio streams 1 video streams 1 chapters 0 subtitles 0 length 85

have a nice day ;)

2014-01-27 09:39:12,264:DEBUG:Unable to match duration from data: file : /home/pi/videos/esc-trecho-demo2.mp4 result 6 format mov,mp4,m4a,3gp,3g2,mj2 audio streams 1 video streams 1 chapters 0 subtitles 0 length 221

have a nice day ;)

2014-01-27 09:39:12,865:DEBUG:Unable to match duration from data: file : /home/pi/videos/isags-trecho-demo2.mp4 result 4 format mov,mp4,m4a,3gp,3g2,mj2 audio streams 1 video streams 1 chapters 0 subtitles 0 length 25

have a nice day ;)

2014-01-27 09:39:13,064:DEBUG:Unable to match duration from data: File "/home/pi/videos/sementeira-trecho-demo3.mp4" not found.

2014-01-27 09:39:13,070:ERROR:Unable to read the stopvideo or any playlist items. Shutting down 2014-01-27 09:39:13,075:ERROR:Exception caught, shutting down

mybe is a problem with raspbian ? It's almost vanilla, besides some packages installed (like gstreamer..)

thanks again for the patience

deedos commented 10 years ago

Hi again! Good news! I did open pivtfilelist.py to check it and did not know i could set omxplayer binary trough _OMX_COMMAND there as well (I though the one from config.xml was mandatory..) anyway, I changed that to the seamless lopp omxplayer binary and everything works now! For sure it ś something wrong with my vanilla omxplayer ! Thanks a lot

samdbmg commented 10 years ago

Hi,

I'll modify the way configs are read so the binary in the configuration file is used for both. As for your vanilla OMXPlayer, that's an odd puzzle as its returning something different in response to omxplayer -i FILENAME which isn't being matched - can you do omxplayer -v and post the version info?

Glad you got it working!

kornerb commented 10 years ago

Glad you got it working @deedos ! somewhat unrelated: what codecs/settings are you all using for your files? I am trying to playout h.264 .mp4 files with aac 44.1 audio and I get video just fine, but no audio. I am using the -o hdmi. This is with both the seamless and the regular omxplayer.

kornerb commented 10 years ago

Nevermind, figured it out. Had to force HDMI mode in config.txt

deedos commented 10 years ago

with omxplayer I use always -p option that gives me audio, besides, I have not tested that option with PiVT yet.

Cheers @kornerb

2014-01-27 kornerb notifications@github.com

Nevermind, figured it out. Had to force HDMI mode in config.txt

— Reply to this email directly or view it on GitHubhttps://github.com/YSTV/PiVT/issues/9#issuecomment-33424801 .

Daniel Roviriego (21) 35920701 (21) 99561654