FAQ  •  Register  •  Login

Transcoded audio out of sync when 48000Hz 112kb/s

<<

spawn57

Serviio newbie

Posts: 11

Joined: Fri Oct 01, 2010 3:59 pm

Post Mon Nov 15, 2010 4:15 pm

Transcoded audio out of sync when 48000Hz 112kb/s

When I try to play a avi file with the following audio encoding, the audio is always out of sync with the video. It's always about 1 second behind. I've tried this out on 2-3 video files already.:

Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 112 kb/s


The problem occurs on both the PS3 and a Sony Bravia TV W5500
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17037

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Nov 15, 2010 10:35 pm

Re: Transcoded audio out of sync when 48000Hz 112kb/s

what do you transcode into? or is it just rewrapping? is your PC strong enough to transcode in real time?
<<

spawn57

Serviio newbie

Posts: 11

Joined: Fri Oct 01, 2010 3:59 pm

Post Tue Nov 16, 2010 4:50 am

Re: Transcoded audio out of sync when 48000Hz 112kb/s

I'm not sure if it's rewrapping.

My PC is definitely strong enough handle the transcoding, I've played different movies about the same quality and it played them without a hitch. Also I checked the processor usage and it's around the 60%.

It's transcoding to mpeg2 for my TV. I set serviio's profile to Sony Bravia TV.

I've also played the movie on my ps3 using another DLNA framework (coherence) which does not do any transcoding. The movie plays without any audio.
<<

Illico

User avatar

DLNA master

Posts: 4649

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Tue Nov 16, 2010 8:22 am

Re: Transcoded audio out of sync when 48000Hz 112kb/s

spawn57 wrote:The problem occurs on both the PS3 and a Sony Bravia TV W5500

Could you check the detailed serviio.log file ? viewtopic.php?f=5&t=7
Look at the line where ffmpeg transcode the source file into a temporary directories, something like:
2010-10-12 20:40:33,000 DEBUG [ProcessExecutor] Starting C:\Serviio\bin\\..\lib/ffmpeg.exe -i <input_file> -y -vcodec copy -copyts -acodec ac3 -ab 192k -vbsf h264_mp4toannexb -sn -f mpegts C:\WINDOWS\TEMP\Serviio\transcoding-temp-1071-MPEG2TS.stf
And post the section (10 lines before, and 10 lines after) here, please.
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
<<

spawn57

Serviio newbie

Posts: 11

Joined: Fri Oct 01, 2010 3:59 pm

Post Thu Nov 18, 2010 4:41 pm

Re: Transcoded audio out of sync when 48000Hz 112kb/s

Got the l


2010-11-19 00:37:13,389 DEBUG [ResourceTransportRequestHandler] GET /resource/8390/MEDIA_ITEM/MPEG_TS_SD_EU_ISO HTTP/1.1, headers = [TimeSeekRange.dlna.org: npt=0.000-, getcontentFeatures.dlna.org: 1, Pragma: getIfoFileURI.dlna.org, transferMode.dlna.org: Streaming, Host: 192.168.1.2:8895, ]
2010-11-19 00:37:13,390 DEBUG [ResourceTransportRequestHandler] Resource request accepted. Using client 'IPAddress=/192.168.1.100, Profile=Sony Bravia TV'og,
2010-11-19 00:37:13,390 DEBUG [ResourceTransportRequestHandler] Request for resource 8390 and type 'MEDIA_ITEM' received
2010-11-19 00:37:13,390 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 8390)
2010-11-19 00:37:13,390 DEBUG [VideoDAOImpl] Reading a Video (id = 8390)
2010-11-19 00:37:13,391 DEBUG [VideoDeliveryEngine] Delivering item '8390' for client 'IPAddress=/192.168.1.100, Profile=Sony Bravia TV'
2010-11-19 00:37:13,391 DEBUG [VideoDeliveryEngine] Delivering file 'Pineapple Express.avi' using transcoding
2010-11-19 00:37:13,391 DEBUG [VideoDeliveryEngine] Stopping previous transcoding job of file '/var/tmp/Serviio/transcoding-temp-8391-MPEG2TS.stf'
2010-11-19 00:37:13,391 DEBUG [ProcessExecutor] Stopping external process: Thread[Thread-150,5,main]
2010-11-19 00:37:13,391 DEBUG [TranscodingJobListener] Transcoding finished; successful: false
2010-11-19 00:37:13,392 DEBUG [VideoDeliveryEngine] Deleted temp file '/var/tmp/Serviio/transcoding-temp-8391-MPEG2TS.stf': true
2010-11-19 00:37:13,392 DEBUG [VideoDeliveryEngine] No suitable transcoding job exists yet, start one for client 'IPAddress=/192.168.1.100, Profile=Sony Bravia TV'
2010-11-19 00:37:13,392 DEBUG [MediaItemDAOImpl] Getting file of media item 8390
2010-11-19 00:37:13,392 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode file: /home/share/movies/Pineapple Express.avi
2010-11-19 00:37:13,397 DEBUG [ProcessExecutor] Starting ffmpeg -threads 1 -i /home/share/movies/Pineapple Express.avi -y -vcodec mpeg2video -sameq -r 23.98 -g 15 -copyts -acodec ac3 -ab 192k -sn -f mpegts /var/tmp/Serviio/transcoding-temp-8390-MPEG2TS.stf
2010-11-19 00:37:13,405 WARN [OutputTextReader] Error reading output of an external command:Bad file descriptor
2010-11-19 00:37:13,898 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file Pineapple Express.avi: MPEG_TS_SD_EU_ISO
2010-11-19 00:37:13,898 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file Pineapple Express.avi: MPEG_TS_SD_NA_ISO
2010-11-19 00:37:13,898 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file Pineapple Express.avi: MPEG_TS_SD_KO_ISO
2010-11-19 00:37:13,898 DEBUG [VideoDeliveryEngine] Sending transcoding stream
2010-11-19 00:37:13,898 DEBUG [MediaItemDAOImpl] Marking MediaItem (id = 8390) as read
2010-11-19 00:37:13,929 DEBUG [LocalContentCacheDecorator] Cleared cache (local_resetafterplay)
2010-11-19 00:37:13,929 DEBUG [ResourceTransportRequestHandler] Creating stream entity with length: 9000000000
2010-11-19 00:37:13,929 DEBUG [ResourceTransportRequestHandler] Creating entity with chunked transfer
2010-11-19 00:37:13,929 DEBUG [ResourceTransportRequestHandler] Sending file back
2010-11-19 00:37:13,929 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 200 OK, headers = [Content-Type: video/mpeg, TimeSeekRange.dlna.org: npt=0-6724/6724, Date: Thu, 18 Nov 2010 16:37:13 GMT, Server: Linux, UPnP/1.0 DLNADOC/1.50, Serviio/0.4.2, Cache-control: no-cache, contentFeatures.dlna.org: DLNA.ORG_PN=MPEG_TS_SD_EU_ISO;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000, transferMode.dlna.org: Streaming, ]
2010-11-19 00:37:16,824 DEBUG [WebServer] I/O error: Connection reset
2010-11-19 00:37:16,837 DEBUG [WebServer] Incoming connection from /192.168.1.100:61603
2010-11-19 00:37:16,838 DEBUG [ResourceTransportRequestHandler] GET /resource/8390/MEDIA_ITEM/MPEG_TS_SD_EU_ISO HTTP/1.1, headers = [TimeSeekRange.dlna.org: npt=362.002-, getcontentFeatures.dlna.org: 1, Pragma: getIfoFileURI.dlna.org, transferMode.dlna.org: Streaming, Host: 192.168.1.2:8895, ]
2010-11-19 00:37:16,839 DEBUG [ResourceTransportRequestHandler] Resource request accepted. Using client 'IPAddress=/192.168.1.100, Profile=Sony Bravia TV'
2010-11-19 00:37:16,839 DEBUG [ResourceTransportRequestHandler] Request for resource 8390 and type 'MEDIA_ITEM' received
2010-11-19 00:37:16,839 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 8390)
2010-11-19 00:37:16,840 DEBUG [VideoDAOImpl] Reading a Video (id = 8390)
2010-11-19 00:37:16,840 DEBUG [VideoDeliveryEngine] Delivering item '8390' for client 'IPAddress=/192.168.1.100, Profile=Sony Bravia TV'
2010-11-19 00:37:16,840 DEBUG [VideoDeliveryEngine] Delivering file 'Pineapple Express.avi' using transcoding
2010-11-19 00:37:16,841 DEBUG [VideoDeliveryEngine] A suitable transcoding job already exists, re-use it for client 'IPAddress=/192.168.1.100, Profile=Sony Bravia TV'
2010-11-19 00:37:16,841 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file Pineapple Express.avi: MPEG_TS_SD_EU_ISO
2010-11-19 00:37:16,841 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file Pineapple Express.avi: MPEG_TS_SD_NA_ISO
2010-11-19 00:37:16,841 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file Pineapple Express.avi: MPEG_TS_SD_KO_ISO
2010-11-19 00:37:16,841 DEBUG [VideoDeliveryEngine] Sending transcoding stream
2010-11-19 00:37:16,841 DEBUG [ResourceTransportRequestHandler] Creating stream entity with length: 1017696206
2010-11-19 00:37:16,841 DEBUG [ResourceTransportRequestHandler] Creating entity with chunked transfer
2010-11-19 00:37:16,841 DEBUG [ResourceTransportRequestHandler] Sending file back
2010-11-19 00:37:16,842 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 200 OK, headers = [Content-Type: video/mpeg, TimeSeekRange.dlna.org: npt=362-6724/6724, Date: Thu, 18 Nov 2010 16:37:16 GMT, Server: Linux, UPnP/1.0 DLNADOC/1.50, Serviio/0.4.2, Cache-control: no-cache, contentFeatures.dlna.org: DLNA.ORG_PN=MPEG_TS_SD_EU_ISO;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000, transferMode.dlna.org: Streaming,
<<

Illico

User avatar

DLNA master

Posts: 4649

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Thu Nov 18, 2010 7:38 pm

Re: Transcoded audio out of sync when 48000Hz 112kb/s

Could you transcode the avi file localy with following comand line
ffmpeg -i /home/share/movies/Pineapple Express.avi -y -vcodec mpeg2video -sameq -r 23.98 -g 15 -copyts -acodec ac3 -ab 192k -sn -f mpegts /var/tmp/Serviio/Test_192k.ts
Try to read Test_192k.ts file with WMP, VLC or MediaPlayerClassic on PC, and add it into Serviio library to check direct streaming to the TV.

You could also try with this audio option
ffmpeg -i /home/share/movies/Pineapple Express.avi -y -vcodec mpeg2video -sameq -r 23.98 -g 15 -copyts -acodec ac3 -ab 384k -sn -f mpegts /var/tmp/Serviio/Test_384k.ts
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
<<

Illico

User avatar

DLNA master

Posts: 4649

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Thu Nov 18, 2010 7:49 pm

Re: Transcoded audio out of sync when 48000Hz 112kb/s

Oh what is your OS ? ffmpeg version ?
Could you also provide the ffmpeg -i /home/share/movies/Pineapple Express.avi command result?
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
<<

spawn57

Serviio newbie

Posts: 11

Joined: Fri Oct 01, 2010 3:59 pm

Post Fri Nov 19, 2010 2:10 am

Re: Transcoded audio out of sync when 48000Hz 112kb/s

Using ubuntu 10.04 LTS. I'll provide you with the ffmpeg -i version as soon as I get a chance...
<<

Illico

User avatar

DLNA master

Posts: 4649

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Fri Nov 19, 2010 8:13 am

Re: Transcoded audio out of sync when 48000Hz 112kb/s

Its probably a ffmpeg version issue, have a look on this http://www.serviio.org/download
This release includes FFmpeg (rev. 23013, incl. a patch) compiled using this source code.
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
<<

spawn57

Serviio newbie

Posts: 11

Joined: Fri Oct 01, 2010 3:59 pm

Post Fri Nov 19, 2010 4:51 pm

Re: Transcoded audio out of sync when 48000Hz 112kb/s

FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 1 / 52.20. 1
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 4 2010 12:35:30, gcc: 4.4.3
Input #0, avi, from '/home/share/movies/Pineapple Express.avi':
Duration: 01:52:04.68, start: 0.000000, bitrate: 875 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 664x268 [PAR 1:1 DAR 166:67], 23.98 tbr, 23.98 tbn, 23.98 tbc
Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 112 kb/s
At least one output file must be specified
<<

spawn57

Serviio newbie

Posts: 11

Joined: Fri Oct 01, 2010 3:59 pm

Post Sat Nov 27, 2010 12:29 pm

Re: Transcoded audio out of sync when 48000Hz 112kb/s

Hi,

I've tried the following command:

ffmpeg -i /home/share/movies/Pineapple Express.avi -y -vcodec mpeg2video -sameq -r 23.98 -g 15 -copyts -acodec ac3 -ab 192k -sn -f mpegts /var/tmp/Serviio/Test_192k.ts

It plays fine, but the audio is still out of sync. Anythign else I can try?
<<

Illico

User avatar

DLNA master

Posts: 4649

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Sat Nov 27, 2010 12:54 pm

Re: Transcoded audio out of sync when 48000Hz 112kb/s

spawn57 wrote:Hi,...It plays fine, but the audio is still out of sync. Anythign else I can try?

Do you try this ?
ffmpeg -i /home/share/movies/Pineapple Express.avi -y -vcodec mpeg2video -sameq -r 23.98 -g 15 -copyts -acodec ac3 -ab 384k -sn -f mpegts /var/tmp/Serviio/Test_384k.ts
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
<<

tombert

User avatar

DLNA master

Posts: 217

Joined: Wed Oct 13, 2010 8:01 pm

Post Mon Nov 29, 2010 7:09 am

Re: Transcoded audio out of sync when 48000Hz 112kb/s

some of my videos went out of sync when I forced a framerate ... you could try to ommit -r option
<<

spawn57

Serviio newbie

Posts: 11

Joined: Fri Oct 01, 2010 3:59 pm

Post Tue Nov 30, 2010 2:27 am

Re: Transcoded audio out of sync when 48000Hz 112kb/s

Illico wrote:
spawn57 wrote:Hi,...It plays fine, but the audio is still out of sync. Anythign else I can try?

Do you try this ?
ffmpeg -i /home/share/movies/Pineapple Express.avi -y -vcodec mpeg2video -sameq -r 23.98 -g 15 -copyts -acodec ac3 -ab 384k -sn -f mpegts /var/tmp/Serviio/Test_384k.ts


didn't work either. The video is still out of sync.
<<

Illico

User avatar

DLNA master

Posts: 4649

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Tue Nov 30, 2010 8:06 am

Re: Transcoded audio out of sync when 48000Hz 112kb/s

spawn57 wrote:Didn't work either. The video is still out of sync.

Did you change your ffmpeg version with FFmpeg (rev. 23013, incl. a Serviio patch)?
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
<<

mbrust

Serviio newbie

Posts: 3

Joined: Sun Dec 05, 2010 11:10 am

Post Sun Dec 05, 2010 11:12 am

Re: Transcoded audio out of sync when 48000Hz 112kb/s

same problem, but I did not change the ffmpeg version yet.
reason: I am not able to compile the source code.
Is there is binary version for a QNAP 119 available somewhere?
thanks
Mike

Return to Transcoding

Who is online

Users browsing this forum: No registered users and 1 guest

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