FAQ  •  Register  •  Login

Bad transcoding video quality + audio out of sync

<<

Darius_bd

Serviio newbie

Posts: 3

Joined: Sun Jan 15, 2012 11:00 pm

Post Sun Jan 15, 2012 11:23 pm

Bad transcoding video quality + audio out of sync

.
Hi there ppl! Just bought a LCD TV (Panasonic TC-L37E3 [L]) for the first time and I thought of using a DLNA server on my pc to stream video content over Ethernet. Serviio looks the best, both powerful and flexible. Regrettably I dont understand much of this flexible video/audio configs.

After reading the boards for some days I understand now that I need to edit my Viera profile as it addresses many Panny tvs. Seems doable, but I thought it was here where I also edited the FFMPEG commands, yet I cant find where to change that.

Because right now, when I try the DirectTV Profile to transcode everything, the video is just bad. Looks like looking double, but vertically. Changing the "produce best quality" doesnt seems to change a thing and Ive changed from 1 core to 4 cores on my i5 2500K with no difference. The CPU usage goes around 10-15% so I guess I need to change the FFMPEG settings. Additionally the audio in the transcoded files are out of sync, slowly coming out later and later. Yet if I skip 30 seconds, the audio is corrected, to slowly outsync again. (When playing files over generic DLNA profile, the supported ones plays flawlessly)

So what could be the FFMPEG options that could improve this? And where do I change them?

(The idea later is to build my own TV profile, once I get which files plays and which doesnt)

Many thanks and forgive my english!
<<

Cerberus

User avatar

DLNA master

Posts: 4114

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Mon Jan 16, 2012 11:42 am

Re: Bad transcoding video quality + audio out of sync

try a toshiba regza profile with your tv.
Phil Bennett
Beta Tester Group
Wiki | FAQ

Samsung LE40C750 LCD | Samsung BD-C5900 | Sony PS3 | Windows 7 |
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Mon Jan 16, 2012 1:18 pm

Re: Bad transcoding video quality + audio out of sync

Darius_bd wrote:So what could be the FFMPEG options that could improve this? And where do I change them?

If you enable detailed logging, you will find the ffmpeg command line used for transcoding.
You can post the comman line here, and we could talk about ffmpeg options.
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

Darius_bd

Serviio newbie

Posts: 3

Joined: Sun Jan 15, 2012 11:00 pm

Post Fri Jan 20, 2012 12:58 am

Re: Bad transcoding video quality + audio out of sync

.
First of all thanks for que quick replies, and sorry for taking this long to reply back.

Anyway, I tried the Regza profile and the video quality is as bad as with DirectTV. This is what the logs shows up for conversion:

  Code:
[ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -i F:\Samples\hddvd_demo_1080p.avi -y -threads 4 -async 1 -vcodec mpeg2video -sameq -r 30000/1001 -g 15 -copyts -acodec ac3 -ab 112k -ac 2 -map 0:0 -map 0:1 -sn -f vob E:\VCR\Serviio\transcoding-temp-18621-MPEG2PS.stf

When I try the DirectTV profile, I get this execution:

  Code:
[ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -i F:\Samples\hddvd_demo_1080p.avi -y -threads 4 -async 1 -vcodec mpeg2video -sameq -b 8192k -maxrate 8192k -bufsize 8192k -r 30000/1001 -g 15 -copyts -acodec mp2 -ab 112k -ac 2 -map 0:0 -map 0:1 -sn -f vob E:\VCR\Serviio\transcoding-temp-18621-MPEG2PS.stf

I also noticed that the audio gets out of sync with some MP4s with this:

  Code:
[ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -i F:\Samples\Joy.mp4 -y -threads 4 -async 1 -vcodec mpeg2video -sameq -b 8192k -maxrate 8192k -bufsize 8192k -r 25 -g 15 -copyts -acodec mp2 -ab 96k -ac 2 -map 0:0 -map 0:1 -sn -f vob E:\VCR\Serviio\transcoding-temp-18869-MPEG2PS.stf


Video quality is again very low. In fact, is like an artifact. Looks like it's duplicated one "line" up and one "line" down. Like it was an interlaced video badly resolved. Higly noticeable on text or anything that shows horizontal lines.

A ffmpeg -i to the file gives me this:

  Code:
ffmpeg version 0.9, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 13 2011 20:46:11 with gcc 4.4.2
  configuration: --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enable-pthreads --target-os=mingw32 --cross-prefix=i686-mingw32- --pkg-config=pkg-config
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 42. 0 / 53. 42. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 53. 0 /  2. 53. 0
  libswscale    2.  1. 0 /  2.  1. 0

Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 25.00 (25/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Joy.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2011-02-01 17:45:46
    encoder         : HandBrake 0.9.5 2011010300
  Duration: 00:29:01.72, start: 0.000000, bitrate: 746 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 624x352 [SAR 1:1 DAR 39:22], 646 kb/s, 25 fps, 25 tbr, 90k tbn, 180k tbc
    Metadata:
      creation_time   : 2011-02-01 17:45:46
      handler_name    :
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 96kb/s
    Metadata:
      creation_time   : 2011-02-01 17:45:46
      handler_name    :
At least one output file must be specified


Thanks for all the help!
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Fri Jan 20, 2012 11:34 am

Re: Bad transcoding video quality + audio out of sync

The bad video quality is due to -maxrate option, when -maxrate is present -sameq option is ignored.
Read that topic:
viewtopic.php?f=7&t=4711
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

Darius_bd

Serviio newbie

Posts: 3

Joined: Sun Jan 15, 2012 11:00 pm

Post Sun Jan 22, 2012 8:18 pm

Re: Bad transcoding video quality + audio out of sync

.
I've come with that topic before, and it was one of the first thing to try, but it's one of the doubts I have. Where do I change that? They mention pearl scripts but I cant find any. A bit/lot lost in that part :/
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Mon Jan 23, 2012 11:10 am

Re: Bad transcoding video quality + audio out of sync

Darius_bd wrote:Where do I change that? They mention pearl scripts but I cant find any. A bit/lot lost in that part :/

This is not an official installation scripts, so you could not find this perl script.

Some beta users like me or digitalhack, install perl and create a script to wrap the official serviio/ffmpeg command line and customize the options (this is for testing purpose).

But, you can also try the customized command line in a terminal locally and add the resulting output file to serviio library to check the result (but it is a bit boring).
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator

Return to Transcoding

Who is online

Users browsing this forum: No registered users and 9 guests

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