[mythtv-users] sequentally play video files

Artem Astafyev artem.astafyev at gmail.com
Wed Jul 13 21:41:05 UTC 2011


2011/7/11 Artem Astafyev <artem.astafyev at gmail.com>

> 2011/7/11 Michael T. Dean <mtdean at thirdcontact.com>
>
> On 07/11/2011 06:06 AM, Artem Astafyev wrote:
>> > 2011/7/11 Nick Rout
>> >> Frankly I have no need for this feature, I can understand it if you
>> >> have, eg, a load of music videos and want to keep playing music videos
>> >> continuously.
>> >>
>> >> But i use mythvideo for movies and tv programmes, and don't want some
>> >> random video popping up after the latest movie I watched.
>> >>
>> >> A system that automatically started the next video in some arbitrary
>> >> order would p*** me off. In fact my LG tv accessing mythvideo via DLNA
>> >> does that, which makes me hate it.
>> > I just want to know if it's possible before writing a patch :) By the
>> way it
>> > may be configurable whether to play next video automatically.
>> > But writing custom script is a good idea. I'll have to use external
>> player
>> > but it's better then nothing.
>>
>> There are some upcoming major changes to the database schema, that will
>> allow using of MythVideo video data the same as MythTV recordings.  At
>> this point, it's quite possible that we'll consolidate much of the
>> handling code--including the Watch Recordings playlist feature.
>>
>> Once this is done, I plan to do some changes that a) add tag support to
>> recordings (/video) that allow the user to assign any number of tags to
>> each media file MythTV handles and filter lists by any number of tags
>> (using and or or grouping), b) modify the playlist support to allow
>> creating playlists based on similar tag filtering as well as create
>> "dynamic" playlists using various "commonly useful" criteria (which I
>> haven't yet defined).  I can't tell you when these changes will be
>> finished, but I can tell you it won't be soon.  As mentioned, the
>> database schema change is major, so will not happen before 0.25.
>>
>
> Great news Mike! I'm looking forward.
>

For those who need this feature I provide script that plays files
sequentally starting from given file. Maybe someone who is more experienced
in shell may optimize it.

#!/bin/bash

DIR=`dirname "$1"`
declare -a files
declare -a playlist
files=( "${DIR}"/* )

i=0;
playlist[$i]=$1;
for file in "${files[@]}"; do
    if [ "$file" == "$1" ]; then
        ((i++));
    elif test -f "$file" && (($i>0)) ; then
        playlist[$i]=$file;
        ((i++));
    fi;
done

mplayer -fs "${playlist[@]}"

-- 
Best regards,
Artem Astafyev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mythtv.org/pipermail/mythtv-users/attachments/20110714/10335091/attachment.html 


More information about the mythtv-users mailing list