[mythtv-users] Internal player won't play video streamed to file on my MythTV system
Stephen Worthington
stephen_agent at jsw.gen.nz
Sat Nov 17 03:05:30 UTC 2018
On Fri, 16 Nov 2018 13:39:21 -0600 (CST), you wrote:
>This post refers to a MythTV 0.28 BE/FE installation that runs under
>Gentoo. I sometimes "record" on this system a video/audio stream from the
>internet (rtmp) by using mplayer -dumpstream -dumpfile myfile.flv
>rtmp://target.URL (not sure if I'm assigning the right extension for this
>file). mplayer is able to play back the resulting file just fine on this
>system, btw.
>
>But I can't if, say, I copy the file to the videos folder, seem to get the
>file to play using MythTV's internal player via the frontend. If, using
>the MythTV frontend interface, I navigate to videos and select the file
>for playback, it appears to start; but the screen just goes black and the
>system seems to freeze for a bit, staying that way until it eventually
>responds to pressing the "escape" key. So I'm trying to discover whether
>there is some way I will be able to play this file using MythTV.
>
>Here's mediainfo output for one such file, in case it will be helpful:
>
>General
>Complete name : /var/lib/mythtv/videos/myfile.flv
>Format : Flash Video
>File size : 2.16 GiB
>Duration : 11 h 3 min
>Overall bit rate : 467 kb/s
>_Server : NGINX RTMP (github.com/arut/nginx-rtmp-module)
>_displayWidth : 1280.000
>_displayHeight : 720.000
>_fps : 60.000
>
>Video
>Format : AVC
>Format/Info : Advanced Video Codec
>Format profile : High at L3.1
>Format settings : CABAC / 1 Ref Frames
>Format settings, CABAC : Yes
>Format settings, ReFrames : 1 frame
>Codec ID : 7
>Duration : 11 h 3 min
>Bit rate : 4 600 kb/s
>Width : 1 280 pixels
>Height : 720 pixels
>Display aspect ratio : 16:9
>Frame rate mode : Constant
>Frame rate : 60.000 FPS
>Color space : YUV
>Chroma subsampling : 4:2:0
>Bit depth : 8 bits
>Scan type : Progressive
>Bits/(Pixel*Frame) : 0.083
>Stream size : 21.3 GiB
>
>Audio
>Format : AAC
>Format/Info : Advanced Audio Codec
>Format profile : LC
>Codec ID : 10-2
>Duration : 11 h 3 min
>Bit rate : 125 kb/s
>Channel(s) : 2 channels
>Channel positions : Front: L R
>Sampling rate : 48.0 kHz
>Frame rate : 46.875 FPS (1024 SPF)
>Compression mode : Lossy
>Delay relative to video : -1 s 9 ms
>Stream size : 593 MiB (27%)
>
>Some of that information is clearly wrong: duration of this video is
>actually around 1 hour, not 11 hours and some minutes. I'm uncertain what
>"Stream size" under "Video" is supposed to be referring to, but it
>certainly doesn't correlate to the file's size on disk (the file's
>size-on-disk is about 1/10th of the value shown). The "Stream size" item
>under "Audio" also seems way out of proportion.
>
>So, will some sort of re-encoding be required before the internal player
>will play this file? Is some adjustment to the player's settings
>necessary? Tips on things I might do to enable my system to play this file
>using MythTV's internal player via the frontend will be appreciated. It
>would be a lot more convenient to play this sort of file using the MythTV
>interface rather than having to page to a different virtual desktop
>(evilwm) and invoke mplayer from the command line there. Thanks.\
Mediainfo is not showing anything that is particularly problematic.
The file however is 60 frames per second progressive - if you have a
display that is only 50 Hz output and can not switch, that can cause
problems. But I think it is unlikely to be what is making the file
not play. To get more (different) information about the file, you
might like to try "ffprobe myfile.flv" and "mythffprobe myfile.flv".
Since you are recording from a stream, the lengths of things in the
headers will likely be wrong as they will have been written when the
recording process started. Normally, they would be overwritten with
the correct data at the end of the recording process, but that is
probably not happening when you stop mplayer at the end of the
recording - I am guessing that you are using Ctrl-C to stop it, and
that may be preventing mplayer from doing any tidy up when it stops
the recording (if it actually does do that). You might like to try
stopping mplayer using a different signal. Run the "kill -l" command
to see all the available signals, and "man 7 signal" to get the
meanings of them. Use "ps -e | grep mplayer" to find the PID of your
mplayer command, and then use "kill -<n> <pid>" to send the signal you
want to try. I would try -3 (SIGQUIT) to start with, then any others
that seem likely as a less violent termination signal than Ctrl-C
which I think sends -2 (SIGQUIT).
Mythfrontend may be logging messages that can tell you what problems
it sees when it tries to play your file. That will likely not help
you getting mythfrontend to play it, but it could help the developers
if you want to file a bug report about it (along with a short test
file for them to use). If mythfrontend is not logging for you (I am
not sure how it is set up in Gentoo), you can try using a command like
this from your frontend user:
mythavtest myfile.flv
Mythavtest is a special MythTV program that has the same videoplayer
code in it as mythfrontend and will play files from the command line
and send its log output to the display when run that way.
This command should show the output on the display and also log it to
a file:
mythavtest myfile.flv 2>&1 | tee mythavtest.log
You can set up mplayer to be run as the alternate video player in
mythfrontend, which is what I do to play files mythfrontend can not
handle. In mythfrontend, go to Settings > Media Settings > Videos
Settings > Player Settings and fill in the Alternate Player field with
the command to run mplayer, something like:
mplayer -fs -vo vdpau %s
The %s is substituted with the name of the video file to be played.
The -fs option is for full screen operation, and -vo vdpau makes
mplayer use VDPAU to display its output.
If you are using lirc for your remote, make sure your
$HOME/.lirc/mplayer file has the right settings in it to work with
mplayer. See below for mine.
Then when you want to run mplayer on a file, select the file and do I
> Play > Play in Alternate Player.
Here is my $HOME/.lirc/mplayer file, for my devinput driver remotes
(Hauppauge and MCE):
# lircrc for devinput with Hauppauge Nova TD-500 and Hauppauge
HVR-900R2 remotes (with lirc 0.9.0).
# Save it in ~/.lircrc
begin
remote = devinput
prog = mplayer
button = KEY_PLAY
config = pause
repeat = 0
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_OK
config = pause
repeat = 0
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_RIGHT
config = seek +6 0
repeat = 1
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_LEFT
config = seek -6 0
repeat = 1
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_DOWN
config = seek -60 0
repeat = 0
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_UP
config = seek +60 0
repeat = 0
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_PREVIOUSSONG
config = seek -15 0
repeat = 0
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_NEXTSONG
config = seek +15 0
repeat = 0
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_STOP
config = quit
repeat = 0
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_PAUSE
config = pause
repeat = 0
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_PLAY
config = pause
repeat = 0
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_REWIND
config = seek -30 0
repeat = 0
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_FASTFORWARD
config = seek +30 0
repeat = 0
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_VOLUMEDOWN
config = volume -1
repeat = 1
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_VOLUMEUP
config = volume +1
repeat = 1
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_MUTE
config = mute
repeat = 0
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_SELECT
config = vo_fullscreen
repeat = 0
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_POWER2
config = quit
repeat = 0
delay = 0
end
begin
remote = devinput
prog = mplayer
button = KEY_ENTER
config = pause
repeat = 0
delay = 0
end
### Added by JSW
begin
remote = devinput
prog = mplayer
button = KEY_MENU
config = O
repeat = 0
delay = 0
end
# Aspect
begin
remote = devinput
prog = mplayer
button = KEY_CLEAR
repeat = 0
config = switch_ratio 1.33333
config = switch_ratio 1.77778
config = switch_ratio 1
end
# panscan
begin
remote = devinput
prog = mplayer
button = KEY_TEXT
# config = panscan -1
# config = panscan -0.5
config = panscan 0
config = panscan 0.3
config = panscan 0.5
config = panscan 0.7
config = panscan 1
# #config = change_rectangle 1 -50
# #config = change_rectangle 1 -100
# #config = change_rectangle 1 -180
# #config = change_rectangle 1 -300
end
begin
remote = devinput
prog = mplayer
button = KEY_EXIT
config = quit
repeat = 0
delay = 0
end
More information about the mythtv-users
mailing list