FAQ  •  Register  •  Login

Transcode of MP4 files; ffmpeg error

<<

donbuc

Serviio newbie

Posts: 2

Joined: Mon Feb 14, 2011 1:47 am

Post Mon Feb 14, 2011 2:19 am

Transcode of MP4 files; ffmpeg error

Getting a ffmpeg error when transcode is needed for MP4 files. Here are the details. Was previously using Serviio 4.2 successfully; just installed 0.5. System is Windows 7 Pro 64 bit.

========== ffmpeg run from command prompt: ==========

c:\Program Files (x86)\Serviio\lib>ffmpeg.exe -threads 1 -i "C:\Users\Public\Videos\Video Misc\ChicoPiano1.mp4" -y -vcodec mpeg2video -sameq -r 25.0 -
g 15 -copyts -acodec ac3 -ab 47k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts C:\Windows\TEMP\Serviio\transcoding-temp-18-MPEG2TS.stf
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-ffplay --disable-ffserver --enable-memalign-hack --enable-libmp3lame --ar
ch=x86 --enable-runtime-cpudetect --enable-w32threads --target-os=mingw32 --cross-prefix=i686-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
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Public\Videos\Video Misc\ChicoPiano1.mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
creation_time : 2010-12-23 06:31:10
Duration: 00:02:17.67, start: 0.000000, bitrate: 2400 kb/s
Stream #0.0(und): Video: h264, yuv420p, 296x240 [PAR 75:74 DAR 5:4], 2355 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc
Metadata:
creation_time : 2010-12-23 06:31:10
Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 47 kb/s
Metadata:
creation_time : 2010-12-23 06:31:11
[buffer @ 03245230] w:296 h:240 pixfmt:yuv420p
[ac3 @ 03244b70] invalid bit rate
Output #0, mpegts, to 'C:\Windows\TEMP\Serviio\transcoding-temp-18-MPEG2TS.stf':
Stream #0.0(und): Video: mpeg2video, yuv420p, 296x240 [PAR 75:74 DAR 5:4], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Metadata:
creation_time : 2010-12-23 06:31:10
Stream #0.1(und): Audio: ac3, 44100 Hz, stereo, flt, 47 kb/s
Metadata:
creation_time : 2010-12-23 06:31:11
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

c:\Program Files (x86)\Serviio\lib>



========== Serviio log (DEBUG on); full log attached ======================

2011-02-13 17:05:21,850 DEBUG [VideoDeliveryEngine] Retrieving resource information for item 18, format MPEG_TS_SD_KO_ISO and profile Samsung TV (A-series)
2011-02-13 17:05:21,850 DEBUG [VideoDeliveryEngine] Getting media info for transcoded version of file ChicoPiano1.mp4
2011-02-13 17:05:21,850 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file ChicoPiano1.mp4: MPEG_TS_SD_EU_ISO
2011-02-13 17:05:21,851 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file ChicoPiano1.mp4: MPEG_TS_SD_NA_ISO
2011-02-13 17:05:21,851 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file ChicoPiano1.mp4: MPEG_TS_SD_KO_ISO
2011-02-13 17:05:21,851 DEBUG [ResourceTransportRequestHandler] Sending HEAD response back
2011-02-13 17:05:21,851 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 200 OK, headers = [[Content-Type: video/mpeg,Content-Length: 9000000000,Date: Mon, 14 Feb 2011 01:05:21 GMT,Server: Windows 7, UPnP/1.0 DLNADOC/1.50, Serviio/0.5,Cache-control: no-cache,contentFeatures.dlna.org: DLNA.ORG_PN=MPEG_TS_SD_KO_ISO;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000,transferMode.dlna.org: Streaming]]
2011-02-13 17:05:21,863 DEBUG [WebServer] Incoming connection from /192.168.1.102:4091
2011-02-13 17:05:21,864 DEBUG [ResourceTransportRequestHandler] GET /resource/18/MEDIA_ITEM/MPEG_TS_SD_KO_ISO HTTP/1.0, headers = [getcontentFeatures.dlna.org: 1,transferMode.dlna.org: Streaming,getMediaInfo.sec: 1,TimeSeekRange.dlna.org: npt=0.000-,Host: 192.168.1.110:8895]]
2011-02-13 17:05:21,864 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.1.102
2011-02-13 17:05:21,865 DEBUG [ResourceTransportRequestHandler] Resource request accepted. Using client 'IPAddress=/192.168.1.102, Profile=Samsung TV (A-series)'
2011-02-13 17:05:21,865 DEBUG [ResourceTransportRequestHandler] Request for resource 18 and type 'MEDIA_ITEM' received
2011-02-13 17:05:21,865 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 18)
2011-02-13 17:05:21,866 DEBUG [VideoDAOImpl] Reading a Video (id = 18)
2011-02-13 17:05:21,867 DEBUG [VideoDeliveryEngine] Delivering item '18' for client 'IPAddress=/192.168.1.102, Profile=Samsung TV (A-series)'
2011-02-13 17:05:21,867 DEBUG [VideoDeliveryEngine] Delivering file 'ChicoPiano1.mp4' using transcoding
2011-02-13 17:05:21,867 DEBUG [VideoDeliveryEngine] No suitable transcoding job exists yet, start one for client 'IPAddress=/192.168.1.102, Profile=Samsung TV (A-series)'
2011-02-13 17:05:21,869 DEBUG [MediaItemDAOImpl] Getting file of media item 18
2011-02-13 17:05:21,871 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode file: C:\Users\Public\Videos\Video Misc\ChicoPiano1.mp4
2011-02-13 17:05:21,871 DEBUG [ProcessExecutor] Starting C:\Program Files (x86)\Serviio\bin\\..\lib/ffmpeg.exe -threads 1 -i C:\Users\Public\Videos\Video Misc\ChicoPiano1.mp4 -y -vcodec mpeg2video -sameq -r 25.0 -g 15 -copyts -acodec ac3 -ab 47k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts C:\Windows\TEMP\Serviio\transcoding-temp-18-MPEG2TS.stf
2011-02-13 17:05:22,129 WARN [ProcessExecutor] Process C:\Program Files (x86)\Serviio\bin\\..\lib/ffmpeg.exe has a return code of 1! This is a possible error.
2011-02-13 17:05:22,130 DEBUG [TranscodingJobListener] Transcoding finished; successful: false
2011-02-13 17:05:29,372 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)

2011-02-13 17:05:32,540 DEBUG [WebServer] Incoming connection from /192.168.1.102:4316
2011-02-13 17:05:32,541 DEBUG [ResourceTransportRequestHandler] HEAD /resource/19/MEDIA_ITEM/MPEG_TS_SD_KO_ISO HTTP/1.0, headers = [getCaptionInfo.sec: 1]]
2011-02-13 17:05:32,541 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.1.102
2011-02-13 17:05:32,542 DEBUG [ResourceTransportRequestHandler] Resource request accepted. Using client 'IPAddress=/192.168.1.102, Profile=Samsung TV (A-series)'
2011-02-13 17:05:32,542 DEBUG [ResourceTransportRequestHandler] Request for resource 19 and type 'MEDIA_ITEM' received
2011-02-13 17:05:32,542 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 19)
2011-02-13 17:05:32,542 DEBUG [VideoDAOImpl] Reading a Video (id = 19)
2011-02-13 17:05:32,543 DEBUG [VideoDeliveryEngine] Retrieving resource information for item 19, format MPEG_TS_SD_KO_ISO and profile Samsung TV (A-series)
2011-02-13 17:05:32,543 DEBUG [VideoDeliveryEngine] Getting media info for transcoded version of file ChicoPiano4.mp4
2011-02-13 17:05:32,544 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file ChicoPiano4.mp4: MPEG_TS_SD_EU_ISO
2011-02-13 17:05:32,544 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file ChicoPiano4.mp4: MPEG_TS_SD_NA_ISO
2011-02-13 17:05:32,544 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file ChicoPiano4.mp4: MPEG_TS_SD_KO_ISO
2011-02-13 17:05:32,544 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 19)
2011-02-13 17:05:32,545 DEBUG [MediaItemDAOImpl] Getting file of media item 19
2011-02-13 17:05:32,546 DEBUG [ResourceTransportRequestHandler] Sending HEAD response back
2011-02-13 17:05:32,547 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 200 OK, headers = [[Content-Type: video/mpeg,Content-Length: 9000000000,Date: Mon, 14 Feb 2011 01:05:32 GMT,Server: Windows 7, UPnP/1.0 DLNADOC/1.50, Serviio/0.5,Cache-control: no-cache,transferMode.dlna.org: Streaming,contentFeatures.dlna.org: DLNA.ORG_PN=MPEG_TS_SD_KO_ISO;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000]]
2011-02-13 17:05:32,559 DEBUG [WebServer] Incoming connection from /192.168.1.102:2778
2011-02-13 17:05:32,559 DEBUG [ResourceTransportRequestHandler] HEAD /resource/19/MEDIA_ITEM/MPEG_TS_SD_KO_ISO HTTP/1.0, headers = [getcontentFeatures.dlna.org: 1,Host: 192.168.1.110:8895]]
2011-02-13 17:05:32,559 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.1.102
2011-02-13 17:05:32,560 DEBUG [ResourceTransportRequestHandler] Resource request accepted. Using client 'IPAddress=/192.168.1.102, Profile=Samsung TV (A-series)'
2011-02-13 17:05:32,560 DEBUG [ResourceTransportRequestHandler] Request for resource 19 and type 'MEDIA_ITEM' received


========== Clip Details as reported by Mediacoder ==========

General
Complete name : C:\Users\Public\Videos\Video Misc\ChicoPiano1.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 39.4 MiB
Duration : 2mn 17s
Overall bit rate : 2 400 Kbps
Encoded date : UTC 2010-12-23 06:31:10
Tagged date : UTC 2010-12-23 06:31:10

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.0
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Format settings, GOP : M=1, N=32
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 2mn 17s
Bit rate mode : Variable
Bit rate : 2 356 Kbps
Nominal bit rate : 3 000 Kbps
Maximum bit rate : 4 695 Kbps
Width : 296 pixels
Height : 240 pixels
Display aspect ratio : 5:4
Original display aspect ratio : 5:4
Frame rate mode : Constant
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 1.326
Stream size : 38.6 MiB (98%)
Title : Imported with GPAC 0.4.6-DEV (internal rev. 5)
Writing library : x264 core 110 r1804 e89c4cf
Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=3000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Encoded date : UTC 2010-12-23 06:31:10
Tagged date : UTC 2010-12-23 06:31:11

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Codec ID : 40
Duration : 2mn 17s
Bit rate mode : Variable
Bit rate : 48.0 Kbps
Maximum bit rate : 61.5 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 44.1 KHz
Compression mode : Lossy
Stream size : 792 KiB (2%)
Title : Imported with GPAC 0.4.6-DEV (internal rev. 5)
Encoded date : UTC 2010-12-23 06:31:11
Tagged date : UTC 2010-12-23 06:31:11
Attachments
serviio.zip
Serviio log
(90.08 KiB) Downloaded 278 times
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Mon Feb 14, 2011 10:01 am

Re: Transcode of MP4 files; ffmpeg error

The source file has a very low audio bitrate (<64k).
You probably have to change audio bitrate to be between 64k to 448k (multiple of 64k)...try with 64k, 128k, 192k, etc
Could you try this:
  Code:
c:\Program Files (x86)\Serviio\lib>ffmpeg.exe -threads 1 -i "C:\Users\Public\Videos\Video Misc\ChicoPiano1.mp4" -y -vcodec mpeg2video -sameq -r 25.0 -
g 15 -copyts -acodec ac3 -ab 128k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts C:\Windows\TEMP\Serviio\transcoding-temp-18-MPEG2TS.stf
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
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Feb 14, 2011 11:14 am

Re: Transcode of MP4 files; ffmpeg error

It's because the audio bitrate is 47 kb/s which is not a valid value. This has been fixed for 0.5.1
<<

donbuc

Serviio newbie

Posts: 2

Joined: Mon Feb 14, 2011 1:47 am

Post Mon Feb 14, 2011 8:42 pm

Re: Transcode of MP4 files; ffmpeg error

Thanks. The suggested command worked. I eagerly await Serviio 0.51!

C:\Users\don>"c:\Program Files (x86)\Serviio\lib\ffmpeg.exe" -threads 1 -i "C:\Users\Public\Videos\Video Misc\ChicoPiano1.mp4" -y -vcodec mpeg2video -
sameq -r 25.0 -g 15 -copyts -acodec ac3 -ab 128k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts C:\Windows\TEMP\Serviio\transcoding-temp-18-MPEG2TS.stf
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-ffplay --disable-ffserver --enable-memalign-hack --enable-libmp3lame --ar
ch=x86 --enable-runtime-cpudetect --enable-w32threads --target-os=mingw32 --cross-prefix=i686-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
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Public\Videos\Video Misc\ChicoPiano1.mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
creation_time : 2010-12-23 06:31:10
Duration: 00:02:17.67, start: 0.000000, bitrate: 2400 kb/s
Stream #0.0(und): Video: h264, yuv420p, 296x240 [PAR 75:74 DAR 5:4], 2355 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc
Metadata:
creation_time : 2010-12-23 06:31:10
Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 47 kb/s
Metadata:
creation_time : 2010-12-23 06:31:11
[buffer @ 0105ec40] w:296 h:240 pixfmt:yuv420p
[mpegts @ 01066e20] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'C:\Windows\TEMP\Serviio\transcoding-temp-18-MPEG2TS.stf':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
creation_time : 2010-12-23 06:31:10
encoder : Lavf52.92.0
Stream #0.0(und): Video: mpeg2video, yuv420p, 296x240 [PAR 75:74 DAR 5:4], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Metadata:
creation_time : 2010-12-23 06:31:10
Stream #0.1(und): Audio: ac3, 44100 Hz, stereo, flt, 128 kb/s
Metadata:
creation_time : 2010-12-23 06:31:11
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 3433 fps=193 q=0.0 Lsize= 19235kB time=137.28 bitrate=1147.8kbits/s dup=1 drop=0
video:15187kB audio:2151kB global headers:0kB muxing overhead 10.939381%

C:\Users\don>

Return to Samsung

Who is online

Users browsing this forum: No registered users and 15 guests

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