Jump to content


Photo

Cubox-i (i.MX6) transcode options/issues

cubox transcoding

  • Please log in to reply
11 replies to this topic

#1 Zoxfee OFFLINE  

Zoxfee

    Newbie

  • Members
  • 6 posts
  • Local time: 04:13 AM

Posted 04 December 2019 - 01:34 PM

Hello everyone

Recently discovered Emby and would like to get it running from my NAS-like setup

Could not find much guidance for cubox-specific help

 

Cubox-i4pro -> Armbian -> Emby Server (from armbian-config)

 

The cubox use to be my htpc with archlinuxarm until support fell off. Wasn't able to play most of my movies stutter-free

So I replaced it with an RPI3B+ and so far so good, now the cubox is a NAS server

Playing through the web interface on Chrome requires transcoding, right? Well the cubox is struggling to play certain videos smoothly

 

One test video came through as "direct play" as I guess transcoding was not necessary and played flawlessly on Chrome

 

 

Recently got the following hoping for one of these to properly utilize the hw decoder

gstreamer1.0-vaapi gstreamer1.0-libav libgstreamer1.0-0 libgstreamer1.0-dev gstreamer1.0-alsa gstreamer1.0-tools gstreamer1.0-pulseaudio gstreamer1.0-plugins-base libgstreamer-plugins-base1.0-0 gstreamer1.0-plugins-good gstreamer1.0-plugins-bad libgstreamer-plugins-bad1.0-0 gstreamer1.0-plugins-ugly

Rebooting and reviewing the transcode options in the web interface settings show no changes

 

Is there something I am missing for the cubox specifically to allow for full use of the hardware?

Or more specifically:

  • Is the cubox a capable Emby server with transcoding or should be reserved to direct stream?
  • If direct stream, is there another route to have Chrome play with audio?
  • If direct stream, can the RPI3B+ handle the transcoding itself?
  • If transcoding, how can I guarantee I am using the cubox hardware to it's full potential? 

 

Attached are playback logs, all with trancoding enabled and had skips/stutters

 

Any help is greatly appreciated

Attached Files



#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 146246 posts
  • Local time: 04:13 AM

Posted 04 December 2019 - 01:40 PM

Hi, in these remux logs there's no video transcoding happening. It's just re-packaging into a new container, and you can see the issue is that it's just not able to go fast enough:

11:56:11.671 frame= 1023 fps= 14 q=-1.0 size=   32151kB time=00:24:18.00 bitrate= 180.6kbits/s throttle=off speed=20.5x    
11:56:12.170 frame= 1057 fps= 15 q=-1.0 size=   33219kB time=00:24:19.59 bitrate= 186.4kbits/s throttle=off speed=20.4x    
11:56:12.671 frame= 1093 fps= 15 q=-1.0 size=   34163kB time=00:24:21.12 bitrate= 191.5kbits/s throttle=off speed=20.3x    
11:56:13.175 frame= 1131 fps= 16 q=-1.0 size=   35249kB time=00:24:22.71 bitrate= 197.4kbits/s throttle=off speed=20.2x  

Is the disk really slow?



#3 Zoxfee OFFLINE  

Zoxfee

    Newbie

  • Members
  • 6 posts
  • Local time: 04:13 AM

Posted 04 December 2019 - 02:19 PM

Thanks for the fast response @Luke

 

I only assumed it to be transcode related as when I disable any transcode options the video playback is without stutter but appears to be a steadily lower framerate

 

Drive is mounted so I couldn't run hdparm but

$ /usr/sbin/bonnie++ -d /MOVIES/
Version  1.98       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Name:Size etc        /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
CuboxServ        4G   57k  97 64.9m  86 38.5m  65  311k  97 92.9m  74 232.7  33
Latency               166ms    3335ms     280ms   52938us     100ms    6551ms
Version  1.98       ------Sequential Create------ --------Random Create--------
CuboxServ           -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16 2124052708  90 +++++ +++ 1790690523  84 222370568  91 +++++ +++ -2112812462  88
Latency              3764us    2767us    3249us     555us     139us     853us


$ sync && time dd if=/MOVIES/American\ Psycho/cddhd-american_psycho_dvd5_x264_bluray.mkv of=/dev/null bs=8k
569494+1 records in
569494+1 records out
4665299174 bytes (4.7 GB, 4.3 GiB) copied, 44.991 s, 104 MB/s

real    0m45.028s
user    0m0.656s
sys     0m32.908s


#4 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 146246 posts
  • Local time: 04:13 AM

Posted 04 December 2019 - 02:20 PM

Yea it's a question of both the read performance of the drive holding the media, as well as the write performance of the server's transcoding temp folder.



#5 Zoxfee OFFLINE  

Zoxfee

    Newbie

  • Members
  • 6 posts
  • Local time: 04:13 AM

Posted 04 December 2019 - 03:24 PM

Looking into the remux log again I can see it establishes a transcode file

/opt/emby-server/bin/ffmpeg -loglevel +timing -ss 00:23:36.000 -f matroska -noaccurate_seek -i file:"/MOVIES/American Psycho/cddhd-american_psycho_dvd5_x264_bluray.mkv" -threads 0 -map 0:0 -map 0:1 -sn -c:v:0 copy -bsf:v h264_mp4toannexb -copyts -vsync -1 -codec:a:0 libmp3lame -metadata:s:a:0 language=eng -disposition:a:0 default -ac:a:0 2 -ab:a:0 192000 -af:a:0 "volume=2" -f segment -max_delay 5000000 -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 -start_at_zero -segment_time 6 -segment_time_delta -1416 -individual_header_trailer 0 -break_non_keyframes 1 -segment_format mpegts -segment_write_temp 1 -segment_list_type m3u8 -segment_start_number 236 -segment_list "/var/lib/emby/transcoding-temp/f47ac4f5bdfc202829a10b053cd18a36.m3u8" -y "/var/lib/emby/transcoding-temp/f47ac4f5bdfc202829a10b053cd18a36%d.ts"
[...]
Output #0, segment, to '/var/lib/emby/transcoding-temp/f47ac4f5bdfc202829a10b053cd18a36%d.ts':

/var/lib/emby/ is on microSD, the boot drive

$ sync & time sudo dd bs=1M count=256 if=/dev/zero of=test conv=sync
256+0 records in
256+0 records out
268435456 bytes (268 MB, 256 MiB) copied, 60.8133 s, 4.4 MB/s

real 1m0.948s
user 0m0.027s
sys 0m4.786s

Relocated transcode folder, didn't seem to help much (log attached)

 

Attached Files


Edited by Zoxfee, 04 December 2019 - 03:42 PM.


#6 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 146246 posts
  • Local time: 04:13 AM

Posted 05 December 2019 - 12:47 AM

Well actually the fps in this log is much better. What exactly happened?



#7 Zoxfee OFFLINE  

Zoxfee

    Newbie

  • Members
  • 6 posts
  • Local time: 04:13 AM

Posted 05 December 2019 - 01:12 PM

Well actually the fps in this log is much better. What exactly happened?

 

I had not noticed that but I can confirm there was still stutters (1-2 seconds of frozen frame & audio before continuing)

Turned off transcoding and tried with "Emby on Kodi" on the RPI3B+, ran smooth

 

Can try again with transcode to see if the issue is my Chrome not playing well or if the Cubox isn't cutting it

 

Would it be suggested to try a differently compiled ffmpeg, one better suited for Cubox hardware?



#8 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 146246 posts
  • Local time: 04:13 AM

Posted 18 December 2019 - 01:08 AM

@Zoxfee i don't think a different ffmpeg will make a difference. Have you tried some of our Emby apps that can direct play more formats without the need for transcoding? Emby Theater for example, or our android or iOS apps.



#9 Zoxfee OFFLINE  

Zoxfee

    Newbie

  • Members
  • 6 posts
  • Local time: 04:13 AM

Posted 19 December 2019 - 08:08 PM

Direct stream has been working well with an RPi3

I have not tried replacing ffmpeg or any form of transcoding since last I posted

 

I can try Emby Theatre on my Windows machine but if it is direct stream I am sure it will be functional

Transcode was more for quick Chrome access, on either linux or Windows machines

But I've circumvented it with using VLC & network/smb/upnp options



#10 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 146246 posts
  • Local time: 04:13 AM

Posted 20 December 2019 - 12:51 AM

Thanks for the feedback.



#11 tdiguy OFFLINE  

tdiguy

    Advanced Member

  • Members
  • 1192 posts
  • Local time: 04:13 AM

Posted 29 December 2019 - 03:01 PM

Direct stream has been working well with an RPi3

I have not tried replacing ffmpeg or any form of transcoding since last I posted

 

I can try Emby Theatre on my Windows machine but if it is direct stream I am sure it will be functional

Transcode was more for quick Chrome access, on either linux or Windows machines

But I've circumvented it with using VLC & network/smb/upnp options

Are you using the rpi as a client device? Somewhere on the threads here there was a build for emby theater on the rpi. VLC as an external player is also a great option.

Otherwise if you want a beefier setup you dont have to break the bank to build a computer capable of transcoding to a couple devices. There are embeded motherboard / cpu devices out there under 200$ that support hardware acceleration for transcoding.



#12 Zoxfee OFFLINE  

Zoxfee

    Newbie

  • Members
  • 6 posts
  • Local time: 04:13 AM

Posted 30 December 2019 - 10:32 AM

@tdiguy

Yes, I have one rpi3+ as the client and another rpi3 client. Both wifi with OSMC & Emby. Direct stream works without any hitches so far (knock on wood)

On my Windows & linux machines I have been using VLC and the uPNP/Network Stream option. Also wifi but also no issues from what I have seen

 

For my use-case: I guess I do not need transcoding. I was interested in the idea of just logging into the web portal from my network to watch movies but it has since become moot

Should I ever require server-side transcoding I would build a more dedicated system. This was hobbled together from old hardware as I was not ready to drop money on equipment at this time

Hoping to find a used Shield locally for that

 

Cheers







Also tagged with one or more of these keywords: cubox, transcoding

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users