GiP mp4s and Panasonic PVR

Vangelis forthnet northmedia1 at the.forthnet.gr
Thu Nov 26 14:34:24 PST 2015


On Sun Nov 22 11:42:52 GMT 2015, Nick Payne wrote:

> can also function as a DLNA client
> - I run Serviio on my PC as the server
> I can use the DLNA client on the PVR to play MP4s
> I create myself, but if I try to play any of the MP4s
> downloaded by GiP, I just get a "Please wait"
> message on the TV screen
> and the file never starts playing.
> ...
> Any suggestions on any command line options
> I can try to get around this problem?

Hi; I know I am very late in this, and Peter has already
come up with a solution you most probably can live with,
but some additional technical info/suggestions:

The MP4 muxer GiP uses to put the downloaded
streams inside the MP4 container is FFmpeg; this
by default places the "moov" atom at the end of the
MP4 structure/file. This is OK for software players,
but is likely to be incompatible with some hardware
media players and most certainly is unsuitable for
streaming the MP4 file.

Furthermore, the MP4 file is later tagged by
AtomicParsley, which also rearranges in some
way the MP4 architecture...

If you want to stick to the MP4 container,
some choices are available to you:
1. If using flash/hlsmodes to fetch TV, then add:
--ffmpeg-tv-opts="-movflags faststart"
to your CLI command.

The switch above will instruct ffmpeg (a fairly recent
build is needed) to place the moov atom at the start of
the MP4 file, making it streamable.

Better avoid mp4 tagging with --no-tag

2. For existing downloaded MP4 files, you could
again use FFmpeg to relocate mov atom losslessly:

ffmpeg -i "moov-at-end.mp4" -c copy -movflags faststart "moov-at-start.mp4"

or use for the same job the standalone
qt-faststart tool:

https://walterebert.com/blog/start-playing-mp4-videos-before-download-has-finished/
http://multimedia.cx/eggs/improving-qt-faststart/
https://ffmpeg.zeranoe.com/blog/?p=59
http://ffmpeg.zeranoe.com/builds/qt-faststart/

or GPAC's MP4Box:

mp4box "moov-at-end.mp4" -out "moov-at-start.mp4"

If you wish to move away from the MP4 container, then:
1. if your DLNA client (on the PVR) does have support
for the MPEG TS container (in all probability it should),
then continue to use the hls tvmodes but add --raw to
your command; you'll end up with a .ts file, which is by
definition streamable (ts = transport stream).
2. Using the --mkv switch will instruct ffmpeg to remux
downloaded elementary streams inside the Matroska container;
due to its altogether different (to the MP4) architecture, it doesn't
have (as you've found out) the streaming restrictions the default
MP4 files created by FFmpeg do...

On Tue Nov 24 01:05:07 GMT 2015, Peter S Kirk wrote:

> Thanks too for sharing the --mkv command line option
> which I did not know about.

in GiP 2.94:

get_iplayer --long-help | FindStr /l "Output" =>

 --mkv                            Output video in MKV container instead of 
MP4.
There is no metadata tagging support for MKV output.

Kind regards,
Vangelis. 




More information about the get_iplayer mailing list