Unfortunately, most Linux distributions strip SDL to the minimum point where "we installed SDL" is just about still true. SDL itself isn't that hard to compile, you could just install your own version into /user/local or something similar.

The other option (the one i recommend because it is more flexible in the long run) is to use a minimal webserver and display the video in a video element. On the bonus side, the playback device doesn't need any special software installed, just a browser.

With a bit more work (converting the video into a M3U8 stream) and using something like the hls.js javascript library, the client doesn't need to load the WHOLE video, but loads it in 5/10/whatever second increments in the background while you play. And it's easy to manipulate the M3U8 file on the fly, so you can stream multiple videos, livestream etc. (Even give your significant other the ability to insert ads/reminders to feed the trash and take out the dog).

At the moment, i don't have a very nice example of this, only the stuff i did some time ago that's integrated into my own web framework.

Not sure if this still works, but here's a snipped from the one-off converter i used to convert my youtube export videos to M3U8 files:

... my $dirpath = '/media/blogvideos/youtube/ffmpegconverted/' . $line- +>{video_id}; $line->{video_path} =~ s/^\.\///g; my $command = 'ffmpeg -i "/media/blogvideos/youtube/' . $line->{vi +deo_path} . '" -hls_list_size 0 "' . $dirpath . '/takeout.m3u8"'; my $mvcommand = 'mv ' . $dirpath . '/takeout.m3u8 ' . $dirpath . ' +/index.m3u8'; print "ID: ", $line->{video_id}, "\n"; print "DIR: ", $dirpath, "\n"; print "CMD: ", $command, "\n"; print "MV: ", $mvcommand, "\n"; mkdir $dirpath; `$command`; `$mvcommand`; print "\n\n"; ...

The index (text) file will look something like this:

#EXTM3U #EXT-X-VERSION:3 #EXT-X-TARGETDURATION:10 #EXT-X-MEDIA-SEQUENCE:0 #EXTINF:5.840000, /XXXPATHXXX/takeout0.ts #EXTINF:1.400000, /XXXPATHXXX/takeout1.ts #EXTINF:3.600000, /XXXPATHXXX/takeout2.ts #EXTINF:9.400000, /XXXPATHXXX/takeout3.ts #EXTINF:3.960000, /XXXPATHXXX/takeout4.ts ...

The XXXPATHXXX path is just a convenient placeholder for my scripts, because file access maps different that URLs, and the corresponding scripts replace as required. This is the index file that gets regularly reloaded by the player, and makes it decide with video segment to play next. The player pretends that the whole list is one single big video, but on the backend you can mix&match as you please.

#EXTM3U #EXT-X-VERSION:3 #EXT-X-TARGETDURATION:10 #EXT-X-MEDIA-SEQUENCE:0 #EXTINF:5.840000, /XXXPATHXXX/takeout0.ts #EXTINF:1.400000, /XXXPATHXXX/takeout1.ts #EXTINF:10.00000, /wife/reminders/feedthedog.ts #EXTINF:9.400000, /XXXPATHXXX/takeout3.ts #EXTINF:60.00000, /wife/reminders/take_out_the_trash_NOW.ts #EXTINF:3.960000, /XXXPATHXXX/takeout4.ts ...

Hope that helps.

PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP

In reply to Re: Installing SDL::SMPEG by cavac
in thread Installing SDL::SMPEG by Ashx

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.