Problems streaming certain file types (.mp4)
Closed this issue Β· 13 comments
I've just started testing out rclone explorer, but I ran into some problems when trying to stream certain file types like mp4s. Streaming other file types like .mkv, .mp3, .jpg, and .flac seems to be fine. Don't know if this is relevant, but calling ffplay video.mp4
works fine for local playback of .mp4s too.
I'm not sure where to begin troubleshooting, but this is the console output when I try to stream an .mp4 using rclone explorer, so hopefully it helps:
ffplay version N-82966-g6993bb4 Copyright (c) 2003-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 43.100 / 55. 43.100
libavcodec 57. 70.100 / 57. 70.100
libavformat 57. 61.100 / 57. 61.100
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 68.100 / 6. 68.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000d993c0] stream 1, offset 0x30: partial file
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000d993c0] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 1024x768, 30601 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
date : 2016
encoder : Lavf57.41.100
Duration: 00:00:15.11, bitrate: N/A
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), none, 1024x768, 30601 kb/s, 59.78 fps, 59.94 tbr, 60k tbn, 120k tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 196 kb/s (default)
Metadata:
handler_name : SoundHandler
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000d993c0] stream 1, offset 0x30: partial file
Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000d993c0] stream 1, offset 0x30: partial file
Last message repeated 2 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000d993c0] stream 1, offset 0x30: partial file
Last message repeated 2 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000d993c0] stream 1, offset 0x30: partial file
Last message repeated 2 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000d993c0] stream 1, offset 0x30: partial file
Last message repeated 2 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000d993c0] stream 1, offset 0x30: partial file
Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000d993c0] stream 1, offset 0x30: partial file
Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000d993c0] stream 1, offset 0x30: partial file
Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000d993c0] stream 1, offset 0x30: partial file
Last message repeated 2 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000d993c0] stream 1, offset 0x30: partial file
Last message repeated 2 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000d993c0] stream 1, offset 0x30: partial file
Last message repeated 2 times
if there is any additional information that you'd like me to provide please let me know
I think this is due to how the MP4 (and similar) containers work, metadata is stored at the end of the file so it can't be played until the whole file is downloaded
this can be solved by adding transcoding to rcloneExplorer which adds dependency to ffmpeg
or worked around by pre-modifying your media to have the metadata at the start with qtfaststart
I'm most likely going to expand the streaming stuff to a configurable menu in the future which could be used to force transcoding via ffmpeg as solution, would be nice to have custom filetype associations ie
extension | assoc |
---|---|
mp4 | ffmpeg -i file.mp4 -pix_fmt yuv420p -f rawvideo - | ffplay -f rawvideo -pix_fmt yuv420p -s 720x480 - |
mov | ffplay - |
Oh okay I see, thanks for the explanation! So we won't need to modify our media with qtfaststart in the future?
and I don't know if it's separate enough to warrant a new issue, so I figured I would ask you here: are you planning on adding support for streaming through other media players besides ffplay (like mpv or VLC for example)?
Nah hopefully not, it'll all be configurable π
in those configurations you'll be able to set any command you want ie vlc in place of ffplay - I only used ffplay it'll play basically anything you throw at it so it's a good catch all - the lack of gui and controls isn't great but it's more of a 'look what this can do' thing
Awesome, I'm really looking forward to those features. Keep up the great work!
adding release soon
@andrewiankidd I'm not sure if I've done something wrong. I downloaded the new release and replaced the old .exe, but now I'm unable to stream any files. The console also no longer appears when I try to stream, so I don't have an error message or anything to provide for reference. Have I missed a step in upgrading rcloneExplorer versions?
@emyarod
It's probably been me :)
If you go to Settings menu (which is new) it now let's you define specific commands for different filetypes - there should be some example ones - if not then that's a bug
@andrewiankidd Sorry I'm still a bit confused...haven't been able to stream any file types on the latest release yet. I do have example commands in my settings menu. Do I just follow those examples and add my own commands or are those examples already working?
That's weird you can't stream anything at all, I've added ffplay fallback to this test version
http://server.andrewiankidd.co.uk/rcloneExplorer.exe
the way it works is when you click stream:
- it grabs the filetype extension (example: mkv)
- it runs rclone cat (which spits the file out to cmd out as it downloads)
- the output is then sent to whatever program is associated with that extension (vlc, ffplay)
mp4 still wont work yet, having a lot of trouble getting it 'streamable' and it seems a common issue, but mkv, mov etc should defo still work - maybe VLC is installed in a different path on your machine than it is on mine?
We can work this out - if you're willing, can be quite tedious!
@andrewiankidd Your test version works just as you described: mp4 is not working yet, and .mkv, .mov, .flac, and .mp3's are all streamable. also I was testing with mpv rather than VLC, but my results match up with what you were describing
I had only just gotten around to trying your test version, apologies for the late reply!
No worries, that's perfect, thankyou!
θΏζ―ε δΈΊθ§ι’ζδ»Άζ―εη