Jump to content

Containers, MACVLAN & LiveTV stream problem?


GWTPqZp6b

Recommended Posts

GWTPqZp6b

I recently migrated Emby into a containerized setup using the official beta container and am facing a challenge with LiveTV streaming.
I have identical settings configured in my VM based Emby and the containerized Emby re M3U/XMLTV,  firewall is appropriately configured but my containerized setup fails where as my VM based one works correctly. I suspect the issue is the MACVLAN interface and multicast traffic, has anyone run into issues like this before, and any tips to resolve. 

Link to comment
Share on other sites

GWTPqZp6b

Hi Luke, thanks for checking in. I think this issue could be related to the other transcode issue that I raised in another thread. I followed up there with Softworkz who was looking at that issue. But yes, the issue still exists that a CIFS mounted transcode folder doesnt work with liveTV, but does work movies/TV content). Theres logs in the linked thread. 
 

Link to comment
Share on other sites

Actually no, I think this error is simply your file system denying write access:

	System.AggregateException: System.AggregateException: One or more errors occurred. (Access to the path '/mnt/Transcode/transcoding-temp/52d4eb3b26a84aa28220eebff3d5bfe5.ts' is denied.)
	 ---> System.UnauthorizedAccessException: Access to the path '/mnt/Transcode/transcoding-temp/52d4eb3b26a84aa28220eebff3d5bfe5.ts' is denied.
	 ---> System.IO.IOException: Permission denied
	   --- End of inner exception stack trace ---

So that's something you'll need to look into.

Link to comment
Share on other sites

GWTPqZp6b

Thanks Luke. Can you help guide where I should look as I verified the user that Emby is running at can read/write to the specified folder. Transcoded TV/Movies are also handled without issue and they record to the same mount. Is LiveTV processed with a different UID/GID? I'm kinda scratching my head at the moment. 
 

Link to comment
Share on other sites

GWTPqZp6b

For example, if I log into my container I can verify I can read/write as user 1001 in the /mnt/transcode folder. This is why I believed the issue was something to do with LiveTV being different from TV?Movies etc 

[root@dockerhost ~]# docker exec -it emby sh
/ # ps | grep Emby
  196 1001      0:21 /system/EmbyServer -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3


/ # ls -lR /mnt/Transcode/
/mnt/Transcode/:
total 0
drwxrwxr-x    2 1001     1001             0 Nov 15 18:53 transcoding-temp
/mnt/Transcode/transcoding-temp:
total 0


/ # echo hello! > /mnt/Transcode/transcoding-temp/ForLuke


/ # cd /mnt/Transcode/transcoding-temp/
/mnt/Transcode/transcoding-temp # ls -l
total 1
-rw-rw-r--    1 1001     1001             7 Nov 15 18:54 ForLuke


/mnt/Transcode/transcoding-temp # cat ForLuke
hello!

 

Edited by GWTPqZp6b
tidied code for readability
Link to comment
Share on other sites

GWTPqZp6b

Working movie playback https://hastebin.base8.org/ovepakayek.coffeescript

specifically the ffmpeg string 

/bin/ffmpeg -loglevel +timing -y -print_graphs_file "/config/logs/ffmpeg-transcode-a0d30ed0-47e5-4230-a904-0ad081025951_1graph.txt" -copyts -start_at_zero -init_hw_device "cuda=cud0:0" -filter_hw_device cud0 -f matroska,webm -c:v:0 hevc -i "/opt/gd-media/Movies/2 Fast 2 Furious (2003)/2.Fast.2.Furious.2003.2160p.UHD.BluRay.REMUX.HDR.HEVC.DTS-X-EPSiLON.mkv" -filter_complex "[0:0]hwupload_cuda@f1,scale_cuda@f2=w=1280:h=720:format=nv12,setsar@f3=sar=sar[f3_out0]" -map [f3_out0] -map 0:1 -sn -c:v:0 h264_nvenc -b:v:0 3616002 -g:v:0 72 -maxrate:v:0 3616002 -bufsize:v:0 7232004 -sc_threshold:v:0 0 -keyint_min:v:0 72 -profile:v:0 high -c:a:0 libmp3lame -ab:a:0 192000 -ac:a:0 2 -metadata:s:a:0 language=eng -filter:a:0 "volume=2" -disposition:a:0 default -max_delay 5000000 -avoid_negative_ts disabled -f segment -map_metadata -1 -map_chapters -1 -segment_format mpegts -segment_list "/mnt/Transcode/transcoding-temp/7A7935.m3u8" -segment_list_type m3u8 -segment_time 3 -segment_start_number 0 -individual_header_trailer 0 -write_header_trailer 0 -segment_write_temp 1 "/mnt/Transcode/transcoding-temp/7A7935_%d.ts"

and successfully writing

19:10:37.991 Output #0, segment, to '/mnt/Transcode/transcoding-temp/7A7935_%d.ts':
19:10:37.991   Metadata:
19:10:37.991     encoder         : Lavf58.35.100
19:10:37.991     Stream #0:0: Video: h264 (h264_nvenc) (High), cuda, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 3616 kb/s, 23.98 fps, 90k tbn, 23.98 tbc (default)
19:10:37.991     Metadata:
19:10:37.991       encoder         : Lavc58.62.100 h264_nvenc
19:10:37.991     Side data:
19:10:37.991       cpb: bitrate max/min/avg: 3616002/0/3616002 buffer size: 7232004 vbv_delay: N/A
19:10:37.991     Stream #0:1(eng): Audio: mp3 (libmp3lame), 48000 Hz, stereo, fltp (24 bit), 192 kb/s (default)
19:10:37.991     Metadata:
19:10:37.991       encoder         : Lavc58.62.100 libmp3lame

I'll grab the LiveTV logs now

 

Edited by GWTPqZp6b
Link to comment
Share on other sites

GWTPqZp6b

LiveTV stream here

I think the file access error is a symptom of something else failing, possibly in relation to xteve? Is this possibly related? 

2020-11-15 19:19:03.986 Error GraphRunner: GraphRunnerTimestampFixup
Edited by GWTPqZp6b
Link to comment
Share on other sites

  • 2 weeks later...
GWTPqZp6b

I am although I haven't looked at this again after having debugged it to the point that I couldn't figure out what was wrong with it. Emby has the ability to read/write the SMB mounted share (the same as it does correctly with TV/Movies) but it doesn't work with Live TV for some reason. I had hoped it might just start working with the latest beta but its still broken in 4.6.0.6 in my system. 

EDIT: I have a non containerized version of 4.6.0.6 running with identical LiveTV setup and a identical SMB mounted folder that works fine so whatever it is is limited to my containerized setup, LiveTV and only with a SMB share.  

Edited by GWTPqZp6b
Link to comment
Share on other sites

GWTPqZp6b

@Luke Thank you. I noticed this morning that programs recorded from my VM based Emby can be replayed on my containerized version (direct play or transcoded) so its just LiveTV watching or recording thats causing the problems.  

Link to comment
Share on other sites

  • 1 month later...
GWTPqZp6b

@Luke I have been unable to identify the root cause of this problem to date however as a NFS share works correctly I have a low impact work around. 

 

Link to comment
Share on other sites

36 minutes ago, GWTPqZp6b said:

@Luke I have been unable to identify the root cause of this problem to date however as a NFS share works correctly I have a low impact work around. 

 

Thanks for the feedback.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...