FAQ  •  Register  •  Login

New to transcoding

<<

AndrewW

Serviio lover

Posts: 81

Joined: Sat Mar 19, 2011 8:15 am

Post Sun Dec 18, 2016 11:32 am

New to transcoding

I'm new to transcoding, so I may have missed something really simple.

I have some mp4 files
with the the following meta data

Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.58.100
Duration: 00:19:35.56, start: 0.000000, bitrate: 1498 kb/s
Chapter #0:0: start 0.000000, end 220.120000
Metadata:
title : Chapter 01
Chapter #0:1: start 220.120000, end 630.280000
Metadata:
title : Chapter 02
Chapter #0:2: start 630.280000, end 1081.240000
Metadata:
title : Chapter 03
Chapter #0:3: start 1081.240000, end 1149.640000
Metadata:
title : Chapter 04
Chapter #0:4: start 1149.640000, end 1175.560000
Metadata:
title : Chapter 05
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 722 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 384 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream #0:2(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 384 kb/s
Metadata:
handler_name : SoundHandler
Side data:
audio service type: main
Stream #0:3(eng): Data: bin_data (text / 0x74786574)
Metadata:
handler_name : SubtitleHandler

Trying to play back on a roku device. Typically i get no audio (which i think is to do the the AAC being 5.1, The other symptom is something the files plays at fast forward speed all the time someimes.

I have been trying to which part of the transcoding section is used, but cant see to see where this is selected
see below


2016-12-18 11:20:31,865 DEBUG [ServiioHttpService] Incoming request from /192.168.0.224:34415: GET /resource/385294/MEDIA_ITEM/AVC_TS_MP_SD_AAC_MULT5_ISO-0/ORIGINAL HTTP/1.1, headers = [Connection: close,Host: 192.168.0.253:8895,user-agent: Roku/DVP-6.x]]
2016-12-18 11:20:31,865 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.0.224
2016-12-18 11:20:31,865 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.0.224
2016-12-18 11:20:31,865 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.0.224
2016-12-18 11:20:31,866 DEBUG [ResourceDeliveryProcessor] Resource request accepted. Using client 'Identifier=192.168.0.224, Profile=Roku Media Player, Name=Roku Media Player'
2016-12-18 11:20:31,866 DEBUG [ResourceDeliveryProcessor] Request for resource 385294 and type 'MEDIA_ITEM' received
2016-12-18 11:20:31,866 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 385294 (local)
2016-12-18 11:20:31,866 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 385294)
2016-12-18 11:20:31,868 DEBUG [VideoDAOImpl] Reading a Video (id = 385294)
2016-12-18 11:20:31,868 DEBUG [VideoDeliveryEngine] Retrieving resource information for item 385294, format AVC_TS_MP_SD_AAC_MULT5_ISO and profile Roku Media Player
2016-12-18 11:20:31,868 DEBUG [AbstractAVTranscodingDeliveryEngine] Getting media info for transcoded version of file test.mp4
2016-12-18 11:20:31,869 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file "test.mp4": AVC_TS_MP_SD_AAC_MULT5_ISO
2016-12-18 11:20:31,869 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 385294 (local)
2016-12-18 11:20:31,870 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 385294)
2016-12-18 11:20:31,870 DEBUG [VideoDAOImpl] Reading a Video (id = 385294)
2016-12-18 11:20:31,870 DEBUG [VideoDeliveryEngine] Delivering item '385294' for client 'Identifier=192.168.0.224, Profile=Roku Media Player, Name=Roku Media Player'
2016-12-18 11:20:31,870 DEBUG [VideoDeliveryEngine] Delivering file 'test.mp4' using transcoding
2016-12-18 11:20:31,871 DEBUG [AbstractAVTranscodingDeliveryEngine] No other client uses transcoding job of file 'transcoding-temp-b1d2b8da12ce773e1768e96dfefba4e4.stf', will stop the job
2016-12-18 11:20:31,871 DEBUG [AbstractAVTranscodingDeliveryEngine] Stopping previous transcoding job of file 'transcoding-temp-b1d2b8da12ce773e1768e96dfefba4e4.stf'
2016-12-18 11:20:31,871 DEBUG [ProcessExecutor] Stopping external process: Thread[Thread-2960,5,main]
2016-12-18 11:20:31,910 DEBUG [ProcessUtils] Sending kill -9 to the Unix process: 892
2016-12-18 11:20:31,910 DEBUG [ProcessExecutor] Starting kill -9 892
2016-12-18 11:20:31,993 DEBUG [TranscodingJobListener] Transcoding finished; successful: true
2016-12-18 11:20:31,996 DEBUG [TranscodingJobListener] Deleted temp file '/tmp/Serviio/transcoding-temp-b1d2b8da12ce773e1768e96dfefba4e4.stf': true
2016-12-18 11:20:31,996 DEBUG [AbstractAVTranscodingDeliveryEngine] Removing transcoding job 'transcoding-temp-b1d2b8da12ce773e1768e96dfefba4e4.stf' of client 'Identifier=192.168.0.224, Profile=Roku Media Player, Name=Roku Media Player'
2016-12-18 11:20:31,996 DEBUG [AbstractAVTranscodingDeliveryEngine] No suitable transcoding job exists yet, start one for client 'Identifier=192.168.0.224, Profile=Roku Media Player, Name=Roku Media Player'
2016-12-18 11:20:31,997 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: /test.mp4
2016-12-18 11:20:32,012 DEBUG [ProcessExecutor] Starting ffmpeg -threads 0 -i /test.mp4 -y -c:v libx264 -pix_fmt yuv420p -b:v 12000k -maxrate:v 12000k -bufsize:v 12000k -profile:v baseline -level 3 -preset:v veryfast -crf 10 -r 25 -g 15 -bsf:v h264_mp4toannexb -flags -global_header -c:a:0 copy -map 0:0 -map 0:1 -sn -f mpegts /tmp/Serviio/transcoding-temp-3c1d9415ffc457adc6886aae2861b159.stf
2016-12-18 11:20:32,515 DEBUG [FileBasedTranscodingDeliveryStrategy] Sending transcoding stream
2016-12-18 11:20:32,516 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file "test.mp4": AVC_TS_MP_SD_AAC_MULT5_ISO
2016-12-18 11:20:32,516 DEBUG [GETMethodProcessor] Stream entity has length: 50000000000
2016-12-18 11:20:32,516 DEBUG [ResourceTransportRequestHandler] Creating entity with chunked transfer
2016-12-18 11:20:32,516 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 200 OK, headers = [[Content-Type: video/vnd.dlna.mpeg-tts,Cache-control: no-cache,Connection: close,Date: Sun, 18 Dec 2016 11:20:32 GMT,realTimeInfo.dlna.org: DLNA.ORG_TLAG=*,Server: Linux, UPnP/1.0 DLNADOC/1.50, Serviio/1.8,transferMode.dlna.org: Streaming]]
2016-12-18 11:20:32,516 INFO [PlaybackEventsManager] Playback of media item 385294 has started at 0% on Identifier=192.168.0.224, Profile=Roku Media Player, Name=Roku Media Player
2016-12-18 11:20:35,195 DEBUG [DiscoverySSDPMessageListener] Received a valid NOTIFY (ssdp:alive) message from Renderer 93b2abac-cb6a-4857-b891-0019f5810c84 from address 192.168.0.123
2016-12-18 11:20:35,195 DEBUG [RendererManager] Retrieve device description from http://192.168.0.123:54417/93b2abac-cb6 ... 810c84.xml
2016-12-18 11:20:36,645 DEBUG [SearchManager] Committing search index
2016-12-18 11:20:37,620 DEBUG [DiscoverySSDPMessageListener] Received a valid NOTIFY (ssdp:alive) message from Renderer 93b2abac-cb6a-4857-b891-0019f5810c84 from address 192.168.0.123
2016-12-18 11:20:37,620 DEBUG [RendererManager] Retrieve device description from http://192.168.0.123:54417/93b2abac-cb6 ... 810c84.xml
2016-12-18 11:20:40,044 DEBUG [DiscoverySSDPMessageListener] Received a valid NOTIFY (ssdp:alive) message from Renderer 93b2abac-cb6a-4857-b891-0019f5810c84 from address 192.168.0.123
2016-12-18 11:20:40,048 DEBUG [RendererManager] Retrieve device description from http://192.168.0.123:54417/93b2abac-cb6 ... 810c84.xml

I have tried to manually convert the files to aac stereo but still get no sound

To start with i'm just trying to find out where in the logs is the output which shows which transcoding section is selected. I cant seem to find it. Also changing the obvious section for 5.1 passthough makes no difference.

Any ideas how I found out which part of the profile be being selected and if possible the issue on my profile

Thanks
<<

AndrewW

Serviio lover

Posts: 81

Joined: Sat Mar 19, 2011 8:15 am

Post Mon Dec 26, 2016 6:04 am

Re: New to transcoding

Got a little further, my original ffmpeg command to convert an mkv was
/usr/local/bin/ffmpeg -loglevel quiet -i "${filename}" -map 0:v -map 0:a -map 0:a -y -vcodec libx264 -c:a:0 libfdk_aac -b:a:0 384k -c:a:1 copy -disposition:a:1 0 -disposition:a:0 default "$DestFile" < /dev/null >/dev/null

and produced an mp4 with the following output

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.58.100
Duration: 00:41:14.76, start: 0.000000, bitrate: 1462 kb/s

Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 685 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 384 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream #0:2(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 384 kb/s




If I changed my conversion command to

/usr/local/bin/ffmpeg -loglevel quiet -i "${filename}" -map 0:v -map 0:a -map 0:a -y -vcodec libx264 -c:a:0 libfdk_aac -c:a:1 ac3 -b:a:0 384k -b:a:1 384k -ac:a:0 2 -ac:a:1 2 -disposition:a:1 0 -disposition:a:0 default "${file
name}" < /dev/null >/dev/null


I get the below which works

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.58.100
Duration: 00:41:14.76, start: 0.000000, bitrate: 1462 kb/s

Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 685 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 384 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream #0:2(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, stereo, fltp, 384 kb/s



I tried playing with the Serviio profile especially the parts which specifically talk about Roku devices not supporting 5.1, but nothing works, always no sound, and sometimes the video speeds up for some reason.
Any ideas what i can change in the Roku profile to fix it, and remove the need to remove 5.1 sound from all videos ?
<<

atc98092

User avatar

DLNA master

Posts: 5205

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Mon Dec 26, 2016 11:59 pm

Re: New to transcoding

As you noted, the Roku will only play AAC audio in stereo. You would have the best success if you used ac3 as your audio, which the Roku supports in 5.1. You could of course also transcode using the normal Roku profile, which by default limits the bitrate and changes the audio to 2 channel.

What Roku player are you using? Do you have an AVR between the Roku and the TV to handle the audio? If so, how is it connected? HDMI or audio cables only?
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

AndrewW

Serviio lover

Posts: 81

Joined: Sat Mar 19, 2011 8:15 am

Post Tue Dec 27, 2016 5:52 am

Re: New to transcoding

I used to have just ac3 on some videos , and none of these videos played with audio, but the aac ones did. I found some documents on the net which i read as ac3 only works in pass though mode.
As i did not want to modify the original video or audio I thought the best way was just to add a track and change the default selection. Most videos started to work at that point, then i found a few with aac 5.1 which still did no work, and neither did transcoding using Serviio with the Roku profile selected.

My Roku is Roku 3 4200x with v 7.5 build 4096-04 and is connected via HDMI.

I have also tried to change the roku profile both following the comments in the profile and some of my own but whatever i changed did not work. I always copy the original profile back after any failed changes.

Any ideas would be much appreciated
<<

atc98092

User avatar

DLNA master

Posts: 5205

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Wed Dec 28, 2016 5:28 am

Re: New to transcoding

I'm in the process of creating a bunch of Roku profiles. The existing profile is transcoding far more than necessary for the newer boxes, and doesn't account for 4K support for several Roku players. The profiles I am developing are designed to be used with an AVR, as I am not restricting the audio to AAC or stereo. I'll probably add a modified line so the user can switch to AAC stereo when only using TV audio. I'm just finalizing the Roku TV (non-4K) profile, although the only change a 4K Roku TV will need is to not transcode h265 video.

I'll be posting them here as I get them tested, but of course I don't have every model Roku so will need user feedback to tell if certain boxes need special configuration. Also, all Roku players identify themselves the same way, so the user will need to manually select the proper profile. But that only has to be done once, then Serviio will remember the setting, even after installed a new version of Serviio.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

AndrewW

Serviio lover

Posts: 81

Joined: Sat Mar 19, 2011 8:15 am

Post Fri Dec 30, 2016 7:35 am

Re: New to transcoding

Let me know if you need any help with testing on the roku device i have
<<

atc98092

User avatar

DLNA master

Posts: 5205

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Fri Dec 30, 2016 8:56 pm

Re: New to transcoding

AndrewW wrote:Let me know if you need any help with testing on the roku device i have


What device do you have (model number, not name)?
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

AndrewW

Serviio lover

Posts: 81

Joined: Sat Mar 19, 2011 8:15 am

Post Wed Jan 11, 2017 5:59 pm

Re: New to transcoding

apologises here are the details
Roku 3 4200x with v 7.5 build 4096-04

Return to Transcoding

Who is online

Users browsing this forum: No registered users and 33 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.