Closed wehbs closed 1 year ago
Its worth trying it, you are suggesting that this be added to tje Onlyremuxmp4 parameters ? if globalConfig.Video.OnlyRemuxMp4 { cmd = exec.Command("ffmpeg", "-i", inputFile, "-c", "copy", outputFile)
if globalConfig.Video.OnlyRemuxMp4 { cmd = exec.Command("ffmpeg", "-i", inputFile, "-c", "copy", "-hls_segment_type", "fmp4", outputFile) }
I think that should do it.
This has been implemented in the pre release i mentioned in the other issue
Ok, so I tried it out but it still didn't work. Spent some time messing with ffmpeg and I finally got it to work. Can you please change to:
if globalConfig.Video.OnlyRemuxMp4 { cmd = exec.Command("ffmpeg", "-i", inputFile, "-c:v", "copy", "-c:a", "aac", "-tag:v", "hvc1", "-movflags", "+faststart", "-hls_segment_type", "fmp4", outputFile) }
When i run ffmpeg -i a.ts -c:v copy -c:a aac -tag:v hvc1 -movflags +faststart -hls_segment_type fmp4 b.mp4
i get an error
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 130 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Press [q] to stop, [?] for help [mp4 @ 0x12ef068a0] Tag hvc1 incompatible with output codec id '27' (avc1) [out#0/mp4 @ 0x600000a600c0] Could not write header (incorrect codec parameters ?): Invalid data found when processing input [aost#0:1/aac @ 0x12ef07ef0] Error initializing output stream: [aac @ 0x12ef081c0] Qavg: nan Conversion failed!
Seems like maybe because -tag:v hvc1 only works on HEVC (h265)
So maybe this should be another option in the config for h265 users?
Yup, im gonna see if i can dynamically get this info
So when stream info is pulled, it gets the codec name, for me it shows up as 'h264' when "printDebug": true, is enabled in config i am assuming for your stream it would show h265 or something similar ? If thats the case then i can use that to determine ffmpeg options
"codec_name": "hevc", "codec_long_name": "H.265 / HEVC (High Efficiency Video Coding)",
Thanks, You can try it here https://github.com/8ff/firescrew/releases/download/onnx_test_release/firescrew.darwin.arm64
Ok, so it's improved, in that it allows me to press play and plays the audio but still no video in Safari. However, if I open the .mp4 file directly from drive with either quicktime or safari directly it does now play when it wouldn't before. When I download said video through the web gui it downloads a .TS version that also does not play in Safari or quicktime.
Are you able to provide a sample video file ?
sorry that seems broken, will try elsewhere
You can try https://transfer.sh
345270
345270
Im getting The key is invalid or has expired
Nice will bookmark the one you suggested, and will upload to it now.
New revelation, it does work on mobile safari.. lol.. Which is really what matters the most in this scenario since it also still works very well in Chrome.
Thanks for that, i think the issue was the filename was being requested with .ts extension but later served with as mp4 i have fixed it (atleast on my safari 😄 ) https://github.com/8ff/firescrew/releases/download/onnx_test_release/firescrew.darwin.arm64
BOOM! Solid!
Let me know if i can close this
good to close 💪
So h265 works great in chrome but would love to view on ios. I came across this post
https://www.reddit.com/r/ShinobiCCTV/comments/hh4ueo/howto_get_h265_playback_working_on_safari/?utm_source=share&utm_medium=ios_app&utm_name=ioscss&utm_content=2&utm_term=1
Seems like a simple solution?