How to fix error "Encoding Failed" using FFMPEG? - laravel

I am using FFMPEG for converting mp4 to m3u8 format on an Ubuntu local machine. But I am facing an error Encoding Failed.
My controller code is:
FFMpeg::open(public_path()."/uploads/".$filename)
->exportForHLS()
->addFormat($lowBitrate)
->addFormat($midBitrate)
->addFormat($highBitrate)
->toDisk(env('APP_ENV'))
->save(public_path().'/converted/adaptive_steve.m3u8');
The error is:
Config file is
How can I solve this? Thanks

Related

Download encrypted m3u8 with ffmpeg "HTTP error 403 Forbidden"

I have been using ffmepg and many tools to download online videos but I have the following case:
The main m3u8 file from the streaming server shows different resolutions:
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=133241,RESOLUTION=426x240, CODECS="avc1.42e00a,mp4a.40.2"
240.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=216379,RESOLUTION=640x360, CODECS="avc1.42e00a,mp4a.40.2"
360.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=239756,RESOLUTION=852x480, CODECS="avc1.42e00a,mp4a.40.2"
480.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=408978,RESOLUTION=1280x720, CODECS="avc1.42e00a,mp4a.40.2"
720.m3u8
Then for every resolution there are 2 files, for example let us pick the 720:
720.m3u8
720.key
The 720.m3u8 has the segments and the 720.key has base64 encrypted key
Now when I use ffmpeg I got the following error:
[https # 0x7fc00a40e0c0] HTTP error 403 Forbidden
[hls # 0x7fc00a204100] Unable to open key file https://hls2.videos.*****/video/720.key
I was sure that I added all the required headers in my ffmpeg command:
-user_agent
-referer
I am not sure what is the problem and I have tested all other tools like yt-dlp, yotube-dl and streamlink

Why is ffmpeg and vlc able run RTSP stream but gstreamer is unable to?

I have a RTSP server streaming out h264 video. Both ffmpeg (ffplay uri)and vlc are able to stream the video but gstreamer is unable to.
Below is the output of gstreamer when gst-play uri is launched:
ERROR Your GStreamer installation is missing a plug-in. for rtsp://---- ERROR debug information: ../gst/playback/gsturidecodebin.c(1028): no_more_pads_full (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0: no suitable plugins found: ../gst/rtsp/gstrtspsrc.c(7691): gst_rtspsrc_setup_streams_start (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source Reached end of play list.
Am I missing certain gstreamer plugins or is my RTSP video stream set up wrongly?
Appreciate any advice! Thank you!

Meshlabserver error: unable to save when editing mesh in the commandline

I am trying to edit a mesh in MeshLab through the command line and am using meshlab server through windows10 cmd:
meshlabserver -i inputfile.obj -o outputfile.stl
Basically what happens is that the output file is unable to save for some reason. The error is as follows (After it says that loading in the input and the conversion both work):
Failed Saving
Output mesh :C/Program Files/VCG/MeshLab/outputfile.stl has NOT been saved
Any help is greatly appreciated.
Have you checked if you have permission to write in that folder?

Is this format supported: avc1.77.40,mp4a.40.34

I'm getting this error when playing an m3u8 file on the Chromecast
Uncaught NotSupportedError: Failed to execute 'addSourceBuffer' on 'MediaSource': The type provided ('video/mp2t; codecs="avc1.77.40,mp4a.40.34"') is unsupported.
I know in the past I was given a line to replace avc1.66.* with .30 codecs when processing the manifest, should I do the same for this?
Thanks.

Understanding about Rails 3 Mini MagicK Validation failed?

ActiveRecord::RecordInvalid in ProfilesController#upload_image
Validation failed: Avatar Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: Command ("gm identify -ping -quiet
-format "%w %hn" "/tmp/mini_magick20130215-9791-f87uvk.jpg"") failed: {:status_code=>1, :output=>"gm identify: Unrecognized option (-quiet).\n"}
will be shown while uploading an image
even the image present and all the directory are available but i dont know why this happens?
anyone explain how to clear this Validation failed error.
my gem version
mini_magick 3.4
Thanks in advance.

Resources