Jump to content


Photo

FFMPEG Transcoding of m3u8 fails. No streams available

ffmpeg transcoding streaming m3u8

  • Please log in to reply
3 replies to this topic

#1 surprisejedi OFFLINE  

surprisejedi

    Newbie

  • Members
  • 9 posts
  • Local time: 06:52 AM

Posted 02 December 2019 - 05:55 PM

I have a .m3u8 file that looks something like this:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=614000,AVERAGE-BANDWIDTH=564000,RESOLUTION=480x270,CODECS="avc1.77.30,mp4a.40.2"
https://example.com/270/prog_index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1118000,AVERAGE-BANDWIDTH=1028000,RESOLUTION=640x360,CODECS="avc1.77.30,mp4a.40.2"
https://example.com/360/prog_index.m3u8

This is a valid streaming file and the servers are responding. The file works in VLC and using ffmpeg command line. However when trying to play the file in Emby it fails.

 

 

No compatible streams are currently available. Please try again later or contact your system administrator for details.

Here is my log (where [EXAMPLE_FILE] is emby's .mp4 output):

2019-12-02 21:28:36.671 Info App: ProcessRun 'StreamTranscode 3931b4' Execute: /opt/emby-server/bin/ffmpeg -loglevel +timing -f mp4 -i file:"/home/[EXAMPLE_FILE].mp4" -threads 0 -map 0:0 -map 0:1 -sn -c:v:0 libx264 -pix_fmt yuv420p  -maxrate 2914608 -bufsize 5829216 -preset veryfast -profile:v:0 high -level:v:0 4.1 -crf 23 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -g:v:0 72 -keyint_min:v:0 72 -sc_threshold:v:0 0  -copyts -vsync -1 -codec:a:0 libmp3lame -disposition:a:0 default -ac:a:0 2 -ab:a:0 63903  -f segment -max_delay 5000000 -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 -start_at_zero -segment_time 3  -individual_header_trailer 0 -segment_format mpegts -segment_write_temp 1 -segment_list_type m3u8 -segment_start_number 0 -segment_list "/var/lib/emby/transcoding-temp/cea4a7824123e700ac386c08c4969e3c.m3u8" -y "/var/lib/emby/transcoding-temp/cea4a7824123e700ac386c08c4969e3c%d.ts"
2019-12-02 21:28:36.759 Info App: ProcessRun 'StreamTranscode 3931b4' Process exited with code 1
2019-12-02 21:28:36.798 Error HttpServer: Error processing request
	*** Error Report ***
	Version: 4.3.0.30
	Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb
	Operating system: Unix 5.2.0.2
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Runtime: file:///opt/emby-server/system/System.Private.CoreLib.dll
	Processor count: 2
	Program data path: /var/lib/emby
	Application directory: /opt/emby-server/system
	System.Exception: System.Exception: Error starting ffmpeg
	   at Emby.Server.MediaEncoding.Api.BaseStreamingService.StartFfMpeg(StreamState state, String outputPath, CancellationTokenSource cancellationTokenSource, Boolean acquireResources)
	   at Emby.Server.MediaEncoding.Api.Hls.DynamicHlsService.GetDynamicSegment(StreamRequest request, String playlistId, String segmentId, Int32 subtitleStreamIndex)
	   at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
	   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
	Source: Emby.Server.MediaEncoding
	TargetSite: Void MoveNext()

I know the correct ffmpeg command for this (similar example):

ffmpeg -protocol_whitelist file,http,https,tcp,tls -i "org_file.m3u8" -c copy -bsf:a aac_adtstoasc output.mp4

If all else fails I can change the source code to match the above code.

 



#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 149391 posts
  • Local time: 01:52 AM

Posted 02 December 2019 - 06:05 PM

Hi, currently this is a known issue if the m3u8 contains m3u8 hls streams. This is resolved for the next release. Thanks.


  • surprisejedi likes this

#3 surprisejedi OFFLINE  

surprisejedi

    Newbie

  • Members
  • 9 posts
  • Local time: 06:52 AM

Posted 02 December 2019 - 06:39 PM

Awesome thanks! Is there a beta channel for Linux? The only one I could find is for Windows.



#4 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 149391 posts
  • Local time: 01:52 AM

Posted 02 December 2019 - 08:31 PM

Yes:

https://emby.media/download

 

The fix is not in the beta channel yet though.







Also tagged with one or more of these keywords: ffmpeg, transcoding, streaming, m3u8

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users