FAQ  •  Register  •  Login

MKV file fails to transcode/play

<<

PMI

User avatar

DLNA master

Posts: 156

Joined: Tue Jan 03, 2012 3:32 am

Location: Milwaukee, Wisconsin

Post Sat Jan 14, 2012 5:53 pm

MKV file fails to transcode/play

Thanks in advance for any help or suggestions!

Please see below ffmpeg output for two similar MKV files w. mpeg2video and AC3 audio. The first one does not seem to transcode correctly, the second one transcodes and plays fine.

I actually only want to "remux" the files into an mpeg-ts container, w. the same video and audio, so the overhead should be minimal. (I am able to do this manually myself, and then play the file, but I would prefer to save that step.) I found a "possible error" (see yellow highlite) in the serviio log for this transcode attempt, but not sure what it means:

From Serviio Log:
2012-01-13 18:45:37,714 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: I:\DVD_Video\Casino_Royale\t00_Casino_Royale.mkv
2012-01-13 18:45:37,714 DEBUG [ProcessExecutor] Starting C:\Program Files (x86)\Serviio\bin\\..\lib/ffmpeg.exe -i I:\DVD_Video\Casino_Royale\t00_Casino_Royale.mkv -y -async 1 -vcodec copy -copyts -acodec copy -map 0:0 -map 0:1 -sn -f vob C:\Windows\TEMP\Serviio\transcoding-temp-2423-MPEG2PS.stf
2012-01-13 18:45:37,765 WARN [ProcessExecutor] Process cmd has a return code of 1! This is a possible error.
2012-01-13 18:45:37,765 DEBUG [TranscodingJobListener] Transcoding finished; successful: false


This file does not work (corresponds to above log):
ffmpeg version N-31480-g8bc3a48, Copyright (c) 2000-2011 the FFmpeg developers
built on Jul 14 2011 23:37:53 with gcc 4.4.2
configuration: --enable-static --disable-shared --disable-ffplay --disable-ffs
erver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='
-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enab
le-pthreads --target-os=mingw32 --cross-prefix=i686-mingw32- --pkg-config=pkg-co
nfig
libavutil 51. 11. 0 / 51. 11. 0
libavcodec 53. 8. 0 / 53. 8. 0
libavformat 53. 6. 0 / 53. 6. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 25. 0 / 2. 25. 0
libswscale 2. 0. 0 / 2. 0. 0
[matroska,webm @ 01538be0] max_analyze_duration 5000000 reached at 5024000
[matroska,webm @ 01538be0] Estimating duration from bitrate, this may be inaccur
ate

Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/
1001) -> 59.94 (60000/1001)
Input #0, matroska,webm, from 't00_Casino_Royale.mkv':
Metadata:
title : Casino Royale
Duration: 02:24:11.57, start: 0.000000, bitrate: 10248 kb/s
Chapter #0.0: start 0.000000, end 411.411000
Metadata:
title : Chapter 00
Chapter #0.1: start 411.411000, end 572.505267
Metadata:
title : Chapter 01
...
...
...

Chapter #0.27: start 8186.611767, end 8651.576000
Metadata:
title : Chapter 27
Stream #0.0(eng): Video: mpeg2video (Main), yuv420p, 720x480 [PAR 32:27 DAR
16:9], 9800 kb/s, PAR 186:157 DAR 279:157, 29.97 fps, 59.94 tbr, 1k tbn, 59.94 t
bc (default)
Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s (default)
Metadata:
title : 3/2+1
Stream #0.2(eng): Subtitle: dvdsub (default)
Stream #0.3(fre): Subtitle: dvdsub
At least one output file must be specified



This file works (transcodes and plays):
ffmpeg version N-31480-g8bc3a48, Copyright (c) 2000-2011 the FFmpeg developers
built on Jul 14 2011 23:37:53 with gcc 4.4.2
configuration: --enable-static --disable-shared --disable-ffplay --disable-ffs
erver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='
-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enab
le-pthreads --target-os=mingw32 --cross-prefix=i686-mingw32- --pkg-config=pkg-co
nfig
libavutil 51. 11. 0 / 51. 11. 0
libavcodec 53. 8. 0 / 53. 8. 0
libavformat 53. 6. 0 / 53. 6. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 25. 0 / 2. 25. 0
libswscale 2. 0. 0 / 2. 0. 0
[matroska,webm @ 013a8be0] Estimating duration from bitrate, this may be inaccur
ate
Input #0, matroska,webm, from 't01_casino_Royale.mkv':
Metadata:
title : Casino Royale
Duration: 00:02:32.65, start: 0.000000, bitrate: 8448 kb/s
Chapter #0.0: start 0.000000, end 151.151000
Metadata:
title : Chapter 01
Chapter #0.1: start 151.151000, end 152.652000
Metadata:
title : Chapter 02
Stream #0.0(eng): Video: mpeg2video (Main), yuv420p, 720x480 [PAR 32:27 DAR
16:9], 8000 kb/s, PAR 186:157 DAR 279:157, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 t
bc (default)
Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s (default)
Metadata:
title : 3/2+1
At least one output file must be specified
Peter
Beta Tester Group
Wiki | FAQ

Panasonic Viera TC-L32E3 LCD | Panasonic DMP-BDT210 | 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
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sat Jan 14, 2012 8:53 pm

Re: MKV file fails to transcode/play

the ffmpeg error is not what is actually failing, but you probably didn't enter the command properly (couldn't find the output file). tyr it again:

  Code:
ffmpeg.exe -i I:\DVD_Video\Casino_Royale\t00_Casino_Royale.mkv -y -async 1 -vcodec copy -copyts -acodec copy -map 0:0 -map 0:1 -sn -f vob C:\Windows\TEMP\Serviio\transcoding-temp-2423-MPEG2PS.stf
<<

moltra

DLNA master

Posts: 1871

Joined: Thu Mar 24, 2011 11:00 pm

Location: Ohio USA

Post Sat Jan 14, 2012 8:54 pm

Re: MKV file fails to transcode/play

You can customize the profile of the device you are streaming to.

You can try the DirectTV DVR profile since it transcodes everything and see if the videos work.
Mark
Beta Tester Group
http://www.serviidb.com Online media resource repository

Netgear EVA2000 | Samsung BD-D5300 | XBOX 360 | Windows 7 | Mint Debian 12 | Raxz Maxx
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
<<

PMI

User avatar

DLNA master

Posts: 156

Joined: Tue Jan 03, 2012 3:32 am

Location: Milwaukee, Wisconsin

Post Sun Jan 15, 2012 1:49 am

Re: MKV file fails to transcode/play

zip wrote:the ffmpeg error is not what is actually failing, but you probably didn't enter the command properly (couldn't find the output file). tyr it again:

  Code:
ffmpeg.exe -i I:\DVD_Video\Casino_Royale\t00_Casino_Royale.mkv -y -async 1 -vcodec copy -copyts -acodec copy -map 0:0 -map 0:1 -sn -f vob C:\Windows\TEMP\Serviio\transcoding-temp-2423-MPEG2PS.stf

I will try that, but not sure I understand... I did not enter the command, those were a few lines from the serviio log... maybe not the right ones, or not enough info? I searched the log using text search on the name of the file. When I said I can make it work, I meant, I can use another program, to put the data into a container that will play.

moltra wrote:You can customize the profile of the device you are streaming to.

Done that.
moltra wrote:You can try the DirectTV DVR profile since it transcodes everything and see if the videos work.

Did not think of that, I will try that also. However, i would prefer not to transcode the whole thing, just need another container (not sure of the right terminology here). Thanks.

edit:

Tried that profile w. the same mkv file, and it does not play. Only diff. I can see is that the DirecTV profile selects mpeg-ps, instead of the mpeg-ts I was trying to use.
Peter
Beta Tester Group
Wiki | FAQ

Panasonic Viera TC-L32E3 LCD | Panasonic DMP-BDT210 | 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
<<

PMI

User avatar

DLNA master

Posts: 156

Joined: Tue Jan 03, 2012 3:32 am

Location: Milwaukee, Wisconsin

Post Sun Jan 15, 2012 3:21 pm

Re: MKV file fails to transcode/play

zip wrote:the ffmpeg error is not what is actually failing, but you probably didn't enter the command properly (couldn't find the output file). tyr it again:

  Code:
ffmpeg.exe -i I:\DVD_Video\Casino_Royale\t00_Casino_Royale.mkv -y -async 1 -vcodec copy -copyts -acodec copy -map 0:0 -map 0:1 -sn -f vob C:\Windows\TEMP\Serviio\transcoding-temp-2423-MPEG2PS.stf


Yes, the above works if I enter it from the command line.

Log of failed attempt using MKV file (tried same file several times):
2012-01-15 07:05:32,172 DEBUG [WebServer] Incoming connection from /192.168.1.101:64913
2012-01-15 07:05:32,172 DEBUG [ResourceTransportRequestHandler] GET /resource/2423/MEDIA_ITEM/MPEG_TS_SD_NA_ISO$0 HTTP/1.1, headers = [Host: 192.168.1.100:8895,TimeSeekRange.dlna.org: npt=00:00:00.000-,transferMode.dlna.org: Streaming,Connection: keep-alive]]
2012-01-15 07:05:32,173 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.1.101
2012-01-15 07:05:32,173 DEBUG [ResourceTransportRequestHandler] Resource request accepted. Using client 'IPAddress=/192.168.1.101, Profile=Panasonic Viera'
2012-01-15 07:05:32,173 DEBUG [ResourceTransportRequestHandler] Request for resource 2423 and type 'MEDIA_ITEM' received
2012-01-15 07:05:32,173 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 2423 (local)
2012-01-15 07:05:32,174 DEBUG [VideoDeliveryEngine] Delivering item '2423' for client 'IPAddress=/192.168.1.101, Profile=Panasonic Viera'
2012-01-15 07:05:32,174 DEBUG [VideoDeliveryEngine] Delivering file 't00_Casino_Royale.mkv' using transcoding
2012-01-15 07:05:32,174 DEBUG [AbstractTranscodingDeliveryEngine] A suitable transcoding job already exists, re-use it for client 'IPAddress=/192.168.1.101, Profile=Panasonic Viera'
2012-01-15 07:05:32,174 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.transcode.FileBasedTranscodingDeliveryStrategy.createInputStream(FileBasedTranscodingDeliveryStrategy.java:47)
at org.serviio.delivery.resource.transcode.AbstractTranscodingDeliveryEngine.retrieveTranscodedResource(AbstractTranscodingDeliveryEngine.java:129)
at org.serviio.delivery.resource.AbstractDeliveryEngine.deliver(AbstractDeliveryEngine.java:96)
at org.serviio.delivery.MediaResourceRetrievalStrategy.retrieveResource(MediaResourceRetrievalStrategy.java:121)
at org.serviio.upnp.webserver.ResourceTransportRequestHandler.handleRequest(ResourceTransportRequestHandler.java:116)
at org.serviio.upnp.webserver.AbstractRequestHandler.handle(AbstractRequestHandler.java:54)
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)


Log of successfull attempt using mpeg-ts container of same file, produced using the command string posted above by zip (ffmpeg not being invoked, since file is already in desired container format):
2012-01-15 07:05:35,592 DEBUG [WebServer] Incoming connection from /192.168.1.101:58232
2012-01-15 07:05:35,593 DEBUG [ResourceTransportRequestHandler] GET /resource/2468/MEDIA_ITEM/MPEG_TS_SD_EU_ISO$0 HTTP/1.1, headers = [Host: 192.168.1.100:8895,Range: bytes=0-,transferMode.dlna.org: Streaming,Connection: keep-alive]]
2012-01-15 07:05:35,593 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.1.101
2012-01-15 07:05:35,593 DEBUG [ResourceTransportRequestHandler] Resource request accepted. Using client 'IPAddress=/192.168.1.101, Profile=Panasonic Viera'
2012-01-15 07:05:35,593 DEBUG [ResourceTransportRequestHandler] Request for resource 2468 and type 'MEDIA_ITEM' received
2012-01-15 07:05:35,593 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 2468 (local)
2012-01-15 07:05:35,594 DEBUG [VideoDeliveryEngine] Delivering item '2468' for client 'IPAddress=/192.168.1.101, Profile=Panasonic Viera'
2012-01-15 07:05:35,594 DEBUG [VideoDeliveryEngine] Delivering file 't00_Casino_Royale.ts' in native format
2012-01-15 07:05:35,596 DEBUG [LocalContentCacheDecorator] Cleared cache (local_resetafterplay)
2012-01-15 07:05:35,596 DEBUG [ResourceTransportRequestHandler] Creating stream entity with length: 6425875532
2012-01-15 07:05:35,596 DEBUG [ResourceTransportRequestHandler] Sending file back
2012-01-15 07:05:35,596 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 206 Partial Content, headers = [[Content-Type: video/mpeg,Content-Range: bytes 0-6425875531/6425875532,Content-Length: 6425875532,Date: Sun, 15 Jan 2012 13:05:35 GMT,Server: Windows 7, UPnP/1.0 DLNADOC/1.50, Serviio/0.6.1,Cache-control: no-cache,transferMode.dlna.org: Streaming]]


Log of attempt with a different MKV file with similar content, and ffmpeg working, and playing video in the correct container:
2012-01-14 22:46:49,169 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.1.101
2012-01-14 22:46:49,175 DEBUG [ContentDirectory] Browse() called for renderer HD TV (profile 12) with parameters: objectID = V_F^FOL_R7$F270, browseFlag = BrowseDirectChildren, filter = dc:title,dc:date,res,res@protocolInfo,res@size,res@duration,res@resolution,res@dlna:ifoFileURI,res@pv:subtitleFileType,res@pv:subtitleFileUri,upnp:albumArtURI,upnp:album,upnp:artist, startIndex = 0, count = 20, sortCriteria =
2012-01-14 22:46:49,187 DEBUG [VideoDeliveryEngine] Retrieving resource information for item 2472 and profile Panasonic Viera
2012-01-14 22:46:49,187 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file title00.mkv: MPEG_TS_SD_EU_ISO
2012-01-14 22:46:49,187 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file title00.mkv: MPEG_TS_SD_NA_ISO
2012-01-14 22:46:49,187 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file title00.mkv: MPEG_TS_SD_KO_ISO
2012-01-14 22:46:49,189 DEBUG [LocalContentCacheDecorator] Stored entry in the cache (local_default), returning it
2012-01-14 22:46:49,196 DEBUG [ServiceControlRequestHandler] Returning OK SOAP message
2012-01-14 22:46:49,341 DEBUG [WebServer] Incoming connection from /192.168.1.101:36110
2012-01-14 22:46:49,342 DEBUG [ResourceTransportRequestHandler] GET /resource/2472/MEDIA_ITEM/MPEG_TS_SD_NA_ISO$0 HTTP/1.1, headers = [Host: 192.168.1.100:8895,TimeSeekRange.dlna.org: npt=00:00:00.000-,transferMode.dlna.org: Streaming,Connection: keep-alive]]
2012-01-14 22:46:49,342 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.1.101
2012-01-14 22:46:49,342 DEBUG [ResourceTransportRequestHandler] Resource request accepted. Using client 'IPAddress=/192.168.1.101, Profile=Panasonic Viera'
2012-01-14 22:46:49,342 DEBUG [ResourceTransportRequestHandler] Request for resource 2472 and type 'MEDIA_ITEM' received
2012-01-14 22:46:49,343 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 2472 (local)
2012-01-14 22:46:49,343 DEBUG [VideoDeliveryEngine] Delivering item '2472' for client 'IPAddress=/192.168.1.101, Profile=Panasonic Viera'
2012-01-14 22:46:49,343 DEBUG [VideoDeliveryEngine] Delivering file 'title00.mkv' using transcoding
2012-01-14 22:46:49,343 DEBUG [AbstractTranscodingDeliveryEngine] Stopping previous transcoding job of file 'transcoding-temp-2423-MPEG2TS.stf'
2012-01-14 22:46:49,344 DEBUG [TranscodingJobListener] Deleted temp file 'C:\Windows\TEMP\Serviio\transcoding-temp-2423-MPEG2TS.stf': true
2012-01-14 22:46:49,344 DEBUG [AbstractTranscodingDeliveryEngine] No suitable transcoding job exists yet, start one for client 'IPAddress=/192.168.1.101, Profile=Panasonic Viera'
2012-01-14 22:46:49,345 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: I:\DVD_Video\LOTR\title00.mkv
2012-01-14 22:46:49,345 DEBUG [ProcessExecutor] Starting C:\Program Files (x86)\Serviio\bin\\..\lib/ffmpeg.exe -i I:\DVD_Video\LOTR\title00.mkv -y -async 1 -vcodec copy -copyts -acodec copy -map 0:0 -map 0:1 -sn -f mpegts C:\Windows\TEMP\Serviio\transcoding-temp-2472-MPEG2TS.stf

2012-01-14 22:46:49,352 DEBUG [WebServer] Incoming connection from /192.168.1.101:53537
2012-01-14 22:46:49,353 DEBUG [ResourceTransportRequestHandler] GET /resource/2276/COVER_IMAGE HTTP/1.1, headers = [User-Agent: Panasonic MIL DLNA CP UPnP/1.0 DLNADOC/1.50,Host: 192.168.1.100:8895,transferMode.dlna.org: Interactive]]
2012-01-14 22:46:49,353 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.1.101
2012-01-14 22:46:49,354 DEBUG [ResourceTransportRequestHandler] Resource request accepted. Using client 'IPAddress=/192.168.1.101, Profile=Panasonic Viera'
2012-01-14 22:46:49,354 DEBUG [ResourceTransportRequestHandler] Request for resource 2276 and type 'COVER_IMAGE' received
2012-01-14 22:46:49,354 DEBUG [CoverImageRetrievalStrategy] Retrieving Cover image with id 2276
2012-01-14 22:46:49,354 DEBUG [ResourceTransportRequestHandler] Creating stream entity with length: 6172
2012-01-14 22:46:49,355 DEBUG [ResourceTransportRequestHandler] Sending file back

2012-01-14 22:46:49,355 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 200 OK, headers = [[Content-Type: image/jpeg,Content-Length: 6172,Date: Sun, 15 Jan 2012 04:46:49 GMT,Server: Windows 7, UPnP/1.0 DLNADOC/1.50, Serviio/0.6.1,Cache-control: no-cache,transferMode.dlna.org: Interactive]]
2012-01-14 22:46:49,845 DEBUG [FileBasedTranscodingDeliveryStrategy] Sending transcoding stream
2012-01-14 22:46:49,845 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file title00.mkv: MPEG_TS_SD_EU_ISO
2012-01-14 22:46:49,845 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file title00.mkv: MPEG_TS_SD_NA_ISO
2012-01-14 22:46:49,845 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file title00.mkv: MPEG_TS_SD_KO_ISO
2012-01-14 22:46:49,846 DEBUG [LocalContentCacheDecorator] Cleared cache (local_resetafterplay)
2012-01-14 22:46:49,847 DEBUG [ResourceTransportRequestHandler] Creating stream entity with length: 50000000000
2012-01-14 22:46:49,847 DEBUG [ResourceTransportRequestHandler] Creating entity with chunked transfer
2012-01-14 22:46:49,847 DEBUG [ResourceTransportRequestHandler] Sending file back
2012-01-14 22:46:49,847 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 200 OK, headers = [[Content-Type: video/mpeg,TimeSeekRange.dlna.org: npt=0.0-10700.0/10700,Date: Sun, 15 Jan 2012 04:46:49 GMT,Server: Windows 7, UPnP/1.0 DLNADOC/1.50, Serviio/0.6.1,Cache-control: no-cache,transferMode.dlna.org: Streaming]]
2012-01-14 22:46:50,214 DEBUG [WebServer] Incoming connection from /192.168.1.101:11736
2012-01-14 22:46:50,214 DEBUG [ResourceTransportRequestHandler] GET /resource/2472/MEDIA_ITEM/MPEG_TS_SD_NA_ISO$0 HTTP/1.1, headers = [Host: 192.168.1.100:8895,TimeSeekRange.dlna.org: npt=00:00:00.000-,transferMode.dlna.org: Streaming,Connection: keep-alive]]
Peter
Beta Tester Group
Wiki | FAQ

Panasonic Viera TC-L32E3 LCD | Panasonic DMP-BDT210 | 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
<<

PMI

User avatar

DLNA master

Posts: 156

Joined: Tue Jan 03, 2012 3:32 am

Location: Milwaukee, Wisconsin

Post Sun Jan 15, 2012 3:30 pm

Re: MKV file fails to transcode/play

For good measure, here is a link to a post by someone who had the same experience, with the same MKV container file and "mpeg2 video codec, the AC3 audio codec". Different player, different circumstances, but same issue with same MKV file (gotta love those search engines!).

viewtopic.php?f=12&t=2667&p=16329&hilit=makemkv#p16329
Peter
Beta Tester Group
Wiki | FAQ

Panasonic Viera TC-L32E3 LCD | Panasonic DMP-BDT210 | 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

Return to Transcoding

Who is online

Users browsing this forum: No registered users and 28 guests

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