Page 1 of 1

Samsung B transcoding 0.5 problem

PostPosted: Sun Jan 30, 2011 8:11 am
by Ray
Hi - first thx for all the effort you have put in for 0.5 - it's clearly got some nice improvements.

I was previously using 0.42, and had a transcoding profile set up to handle some picky .mp4 files i have that wouldn't play natively on my Samsung b-series screen. The transcoding worked fine, and was configured by changing the basic profile to the following:

<Video targetContainer="mpegts" targetACodec="ac3">
<Matches container="mp4" vCodec="h264" />
</Video>

(i.e. make all mp4 with h264 get audio transcoded to ac3)

Following the upgrade to 0.5, I made the same change, but the transcoding doesn't seem to work any more. I've browsed the forums, and seen that sometimes this is caused by the library not being complete. As such I reduced my library to one file, and confirmed that it was finished in both the GUI and the process manager. However, still no transcoding.

Looking in the log file I see:
2011-01-30 15:48:19,453 WARN [ProcessExecutor] Process C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe has a return code of 1! This is a possible error.
2011-01-30 15:48:26,765 ERROR [ResourceTransportRequestHandler] Error while processing resource, sending back 500 error. Message: FFmpeg execution failed
java.io.IOException: FFmpeg execution failed
at org.serviio.delivery.resource.VideoDeliveryEngine.retrieveTranscodedResource(VideoDeliveryEngine.java:160)
at org.serviio.delivery.resource.VideoDeliveryEngine.retrieveTranscodedResource(VideoDeliveryEngine.java:54)
at org.serviio.delivery.resource.AbstractDeliveryEngine.deliver(AbstractDeliveryEngine.java:90)
at org.serviio.delivery.MediaResourceRetrievalStrategy.retrieveResource(MediaResourceRetrievalStrategy.java:116)
at org.serviio.upnp.webserver.ResourceTransportRequestHandler.handleRequest(ResourceTransportRequestHandler.java:126)
at org.serviio.upnp.webserver.AbstractRequestHandler.handle(AbstractRequestHandler.java:52)
at org.apache.http.protocol.HttpService.doService(HttpService.java:293)
at org.serviio.upnp.webserver.ServiioHttpService.doService(ServiioHttpService.java:58)
at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:212)
at org.serviio.upnp.webserver.WebServer$WorkerThread.run(WebServer.java:187)

I have tried using different versions of FFmpeg, but they do not work.

When I roll back to 4.2 it works.

Is there anything you could recommend to fix this?

Many thanks

Ray

Re: Samsung B transcoding 0.5 problem

PostPosted: Sun Jan 30, 2011 10:15 am
by Zek
Hey Ray,

Maybe a long shot but I had some issues with sound in 0.5. Did you try forcing transcoding to "Downmix to Stereo"?

Cheers,
Zek

Re: Samsung B transcoding 0.5 problem

PostPosted: Sun Jan 30, 2011 12:23 pm
by Ray
Hey Zek, thx for the suggestion.

Just tried - but unfortunately no luck. Also tried changing number of CPU's, and turning transcoding on and off to make sure it was set correctly. However, these didn't fix the issue either.

Any other ideas?

Cheers, Ray.

Re: Samsung B transcoding 0.5 problem

PostPosted: Sun Jan 30, 2011 3:57 pm
by zip
enable detailed logging, and try running the ffmpeg command it uses manually. post here the results

Re: Samsung B transcoding 0.5 problem

PostPosted: Mon Jan 31, 2011 11:53 am
by Ray
Hi Zip,

From the debug file:
2011-01-31 19:31:14,640 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode file: D:\filmtest\Alfie.mp4
2011-01-31 19:31:14,640 DEBUG [ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -threads 2 -i D:\filmtest\Alfie.mp4 -y -vcodec mpeg2video -sameq -r 29.97 -g 15 -copyts -acodec ac3 -ab 159k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts C:\WINDOWS\TEMP\Serviio\transcoding-temp-21-MPEG2TS.stf
2011-01-31 19:31:15,312 WARN [ProcessExecutor] Process C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe has a return code of 1! This is a possible error.

From cmd when running manually:
C:\Program Files\Serviio\lib>ffmpeg.exe -threads 2 -i d:\filmtest\alfie.mp4 -y -
vcodec mpeg2video -sameq -r 29.97 -g 15 -copyts -acodec ac3 -ab 159k -ac 2 -map
0:0 -map 0:1 -sn -f mpegts c:\windows\temp\serviio\transcoding-temp-21.mpegts.st
f
FFmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers
built on Jan 10 2011 21:46:22 with gcc 4.4.2
configuration: --enable-static --disable-shared --disable-shared --disable-ffp
lay --disable-ffserver --enable-memalign-hack --enable-libmp3lame --arch=x86 --e
nable-runtime-cpudetect --enable-w32threads --target-os=mingw32 --cross-prefix=i
686-mingw32-
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 0 / 0.16. 0
libavcodec 52.108. 0 / 52.108. 0
libavformat 52.92. 0 / 52.92. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1.72. 0 / 1.72. 0
libswscale 0.12. 0 / 0.12. 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 015fcf70] max_analyze_duration reached

Seems stream 0 codec frame rate differs from container frame rate: 47.95 (48000/
1001) -> 29.97 (30000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd:\filmtest\alfie.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42isom
creation_time : 2010-04-25 15:37:17
encoder : HandBrake 0.9.3 2008112300
Duration: 01:44:59.09, start: 0.000000, bitrate: 1480 kb/s
Chapter #0.0: start -0.050083, end 755.054313
Metadata:
title : Chapter 1
Chapter #0.1: start 755.054313, end 1501.867042
Metadata:
title : Chapter 2
Chapter #0.2: start 1501.867042, end 2326.090438
Metadata:
title : Chapter 3
Chapter #0.3: start 2326.090438, end 3221.818604
Metadata:
title : Chapter 4
Chapter #0.4: start 3221.818604, end 3971.701083
Metadata:
title : Chapter 5
Chapter #0.5: start 3971.701083, end 4802.164042
Metadata:
title : Chapter 6
Chapter #0.6: start 4802.164042, end 5579.607375
Metadata:
title : Chapter 7
Chapter #0.7: start 5579.607375, end 6299.092771
Metadata:
title : Chapter 8
Stream #0.0(eng): Video: h264, yuv420p, 720x352 [PAR 11:12 DAR 15:8], 1092 k
b/s, 29.97 fps, 29.97 tbr, 48k tbn, 47.95 tbc
Metadata:
creation_time : 2010-04-25 15:37:17
Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 159 kb/s
Metadata:
creation_time : 2010-04-25 15:37:17
Stream #0.2(eng): Audio: ac3, 48000 Hz, 6 channels, s16, 224 kb/s
Metadata:
creation_time : 2010-04-25 15:37:17
Stream #0.3(eng): Subtitle: text / 0x74786574
Metadata:
creation_time : 2010-04-25 15:37:17
[buffer @ 01750000] w:720 h:352 pixfmt:yuv420p
[ac3 @ 016f0bc0] No channel layout specified. The encoder will guess the layout,
but it might be incorrect.
[ac3 @ 016f0bc0] invalid bit rate
Output #0, mpegts, to 'c:\windows\temp\serviio\transcoding-temp-21.mpegts.stf':
Stream #0.0(eng): Video: mpeg2video, yuv420p, 720x352 [PAR 11:12 DAR 15:8],
q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
Metadata:
creation_time : 2010-04-25 15:37:17
Stream #0.1(eng): Audio: ac3, 48000 Hz, stereo, flt, 159 kb/s
Metadata:
creation_time : 2010-04-25 15:37:17
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.1 - maybe incorrect parameters
such as bit_rate, rate, width or height

Thanks for the help

Ray.

Re: Samsung B transcoding 0.5 problem

PostPosted: Mon Jan 31, 2011 12:34 pm
by zip
This is a bug (https://bitbucket.org/xnejp03/serviio/i ... nt-support). You can get around it by adding aBitrate="192" to the transcoding configuration elements.

Re: Samsung B transcoding 0.5 problem

PostPosted: Mon Jan 31, 2011 12:40 pm
by Ray
Thx Zip - this has solved the problem. Really appreciate the help.

Ray.

Re: Samsung B transcoding 0.5 problem

PostPosted: Mon Jan 31, 2011 9:52 pm
by Drag
HI ZIP!

First i would thanks your work with servvio.

I have a Samsung B650 LCD.
some mkv file write not suported format

Example:
  Code:
  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 0 /  0.16. 0
  libavcodec    52.108. 0 / 52.108. 0
  libavformat   52.92. 0 / 52.92. 0
  libavdevice   52. 2. 3 / 52. 2. 3
  libavfilter    1.72. 0 /  1.72. 0
  libswscale     0.12. 0 /  0.12. 0
[matroska,webm @ 017cbde0] max_analyze_duration reached
[matroska,webm @ 017cbde0] Estimating duration from bitrate, this may be inaccur
ate

Seems stream 0 codec frame rate differs from container frame rate: 47.95 (48000/
1001) -> 23.98 (48000/2002)
Input #0, matroska,webm, from 'H:\Media_Tar\Filmek\Scott.Pilgrim.Vs.the.World.20
10.1080p.BluRay.DTS.x264.HUN-HDbox.mkv':
  Duration: 01:52:23.77, start: 0.000000, bitrate: 1920 kb/s
    Stream #0.0(eng): Video: h264, yuv420p, 1920x1040, PAR 1:1 DAR 24:13, 23.98
fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Metadata:
      title           : 12500 kbps
    Stream #0.1(hun): Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
    Metadata:
      title           : 5.1 AC3 384kbps
    Stream #0.2(eng): Audio: dca, 48000 Hz, 5.1, s16, 1536 kb/s
    Metadata:
      title           : 5.1 DTS 1.5mbit
    Stream #0.3(hun): Subtitle: ass
    Stream #0.4(hun): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.5(eng): Subtitle: [0][0][0][0] / 0x0000
    Stream #0.6: Attachment: [0][0][0][0] / 0x0000
    Metadata:
      filename        : calibriz.ttf
    Stream #0.7: Attachment: [0][0][0][0] / 0x0000
    Metadata:
      filename        : calibrii.ttf
    Stream #0.8: Attachment: [0][0][0][0] / 0x0000
    Metadata:
      filename        : calibrib.ttf
    Stream #0.9: Attachment: [0][0][0][0] / 0x0000
    Metadata:
      filename        : calibri.ttf
At least one output file must be specified


Can i play with my tv over DLNA or i always convert it on computer before play on tv?

thx

Re: Samsung B transcoding 0.5 problem

PostPosted: Tue Feb 01, 2011 12:20 am
by zip
Could be that the H264 profile is too high for the TV to play. Otherwise MKV is supported.