Page 1 of 2
Flv files not playable

Posted:
Tue Jan 25, 2011 10:19 am
by pizzaguy541
I have a Sony BDP-S370 using the Sony US profile and I cannot get any flv files to play. They played fine while using the last 0.5 beta version but now they are not recognized at all.
Is anyone else having the same problem with these files?
Re: Flv files not playable

Posted:
Tue Jan 25, 2011 10:35 am
by patters
Yep - same problem. The ones I had worked but were muted with 0.5rc1 but now they don't play at all. Will troubleshoot later on.
Re: Flv files not playable

Posted:
Tue Jan 25, 2011 11:13 am
by pizzaguy541
It seems the rendered bitrate value has changed.
When it was working, my ffmpeg line was:
- Code:
ffmpeg.exe -threads 1 -i C:\Users\xxxxx\Videos\Kansas - Dust In The Wind.flv -y -vcodec mpeg2video -sameq -r 29.92 -g 15 -copyts -acodec mp2 -ab 192k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts C:\Windows\TEMP\Serviio\transcoding-temp-234-MPEG2TS.stf
Now, it has changed to this which produces an invalid bitrate error:
- Code:
ffmpeg.exe -threads 1 -i C:\Users\xxxxx\Videos\Kansas - Dust In The Wind.flv -y -vcodec mpeg2video -sameq -r 29.92 -g 15 -copyts -acodec mp2 -ab 111k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts C:\Windows\TEMP\Serviio\transcoding-temp-234-MPEG2TS.stf
Notice that the ab bitrate parameter went from 192k down to 111k.
Re: Flv files not playable

Posted:
Tue Jan 25, 2011 11:52 am
by zip
that's what we said, we should keep original bitrate if it's lower that 192, unless it's forced using aBitrate. You could try to add aBitrate="192" on the transcode config
Re: Flv files not playable

Posted:
Tue Jan 25, 2011 12:19 pm
by patters
I think the problem is that the ac3 encoder wants the bitrates to be multiples of 16.
Zip, did you implement
this change in the released 0.5?
Re: Flv files not playable

Posted:
Tue Jan 25, 2011 1:16 pm
by zip
Yes, but only for when source/target aCodec = LPCM or target aCodec = AC3
But the above problem is with bitrate, not sample rate
Re: Flv files not playable

Posted:
Tue Jan 25, 2011 1:43 pm
by pizzaguy541
zip wrote:that's what we said, we should keep original bitrate if it's lower that 192, unless it's forced using aBitrate. You could try to add aBitrate="192" on the transcode config
Thanks that worked for my flv files.
But, I do have one avi file that needs the audio sampling rate set to 48k. It will transcode perfectly if I add the -ar 48000 option to the ffmpeg line.
Is there an option to specify the sampling rate?
Re: Flv files not playable

Posted:
Tue Jan 25, 2011 2:59 pm
by zip
post ffmpeg -i for that file
Re: Flv files not playable

Posted:
Tue Jan 25, 2011 3:03 pm
by patters
zip wrote:Yes, but only for when source/target aCodec = LPCM or target aCodec = AC3
But the above problem is with bitrate, not sample rate
Cool. I guess we need a rule to change the sample rate to the nearest multiple of 16 if target aCodec = AC3 and aBitrate is not defined.
I have yet another suggestion

would you be able to gather standard error from FFMPEG when you launch it so we can see any errors in the Debug log? That would save having to find the command line and run it manually to track problems.
Re: Flv files not playable

Posted:
Tue Jan 25, 2011 3:12 pm
by zip
in the example file, bitrate is provided, but invalid (111kb). So rather than providing sample rate, it should use a valid bitrate (if lower than 192 and not multiple of 16 and no aBitrate is used).
Can you run the ffmpeg command with -ab 96 and -ab 112 ?
Re: Flv files not playable

Posted:
Wed Jan 26, 2011 10:47 am
by pizzaguy541
zip wrote:post ffmpeg -i for that file
Here is the ffmpeg info for that file:
- Code:
C:\Program Files (x86)\Serviio\lib>ffmpeg.exe -i "C:\Users\xxxxx\Videos\bath.av
i"
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
Input #0, avi, from 'C:\Users\xxxxx\Videos\bath.avi':
Duration: 00:01:07.26, start: 0.000000, bitrate: 258 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 320x240 [PAR 1:1 DAR 4:3], 15 tbr, 15 tb
n, 15 tbc
Stream #0.1: Audio: mp3, 22050 Hz, 1 channels, s16, 32 kb/s
At least one output file must be specified
Re: Flv files not playable

Posted:
Wed Jan 26, 2011 11:02 am
by pizzaguy541
zip wrote:in the example file, bitrate is provided, but invalid (111kb). So rather than providing sample rate, it should use a valid bitrate (if lower than 192 and not multiple of 16 and no aBitrate is used).
Can you run the ffmpeg command with -ab 96 and -ab 112 ?
Yes, the file transcodes without any errors being reported by ffmpeg. But, without adding the -ar 48000 option, the transcoded file produces no audio regardless if I had selected either mp2 or ac3 audio encoding.
If I don't make a profile rule for this avi file then my Sony will play the file natively without any problems. Since I have some Divx/Xvid files, I made a profile rule to have all avi files transcoded before playing them on my US BDP due to the Divx/Xvid playback restriction.
Re: Flv files not playable

Posted:
Wed Jan 26, 2011 11:17 am
by zip
Can you post ffmpeg -i for the flv file?
Re: Flv files not playable

Posted:
Thu Jan 27, 2011 10:59 am
by pizzaguy541
Here is the ffmpeg info for the example flv file:
- Code:
C:\Program Files (x86)\Serviio\lib>ffmpeg.exe -i "C:\Users\xxxxx\Videos\Kansas
- Dust In The Wind.flv"
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
[flv @ 0136bbe0] Estimating duration from bitrate, this may be inaccurate
Seems stream 0 codec frame rate differs from container frame rate: 59.92 (1498/2
5) -> 29.92 (359/12)
Input #0, flv, from 'C:\Users\xxxxx\Videos\Kansas - Dust In The Wind.flv':
Metadata:
duration : 200
starttime : 0
totalduration : 200
width : 480
height : 360
videodatarate : 460
audiodatarate : 109
totaldatarate : 577
framerate : 30
bytelength : 14428996
canseekontime : true
sourcedata : B4A7D0C08HH1283597576683564
purl :
pmsg :
Duration: 00:03:19.66, start: 0.000000, bitrate: 582 kb/s
Stream #0.0: Video: h264, yuv420p, 480x360 [PAR 1:1 DAR 4:3], 471 kb/s, 29.9
2 tbr, 1k tbn, 59.92 tbc
Stream #0.1: Audio: aac, 44100 Hz, stereo, s16, 111 kb/s
At least one output file must be specified
Re: Flv files not playable

Posted:
Thu Jan 27, 2011 11:37 am
by pizzaguy541
Zip, if you didn't want to encode everything at a fixed default bitrate (i.e 192k, 384k) then you could code something like this for each valid bitrate:
- Code:
if (calc_Abitrate > 96000 && calc_Abitrate <= 112000)
{ aBitrate = 112000; }
Of course, this wouldn't solve the problem of having to need a sampling rate of 48k before encoding the audio. I've read on other forums where people were having playback problems with audio files that were not encoded with a sampling rate of 48k.
Re: Flv files not playable

Posted:
Thu Jan 27, 2011 1:36 pm
by zip
That's weird as the source aac track has 44100 sample rate.
Any reason why you transcode it to mp2 and not ac3/mp3?
Re: Flv files not playable

Posted:
Fri Jan 28, 2011 9:13 am
by pizzaguy541
I'm sorry, I should have been more clear. I need a sampling rate of 48k for the avi file and not the flv file. As a test, I have used a sampling rate of 48k on both files and both files can be played with audio.
The main reason that I'm encoding in mp2 is that my A/V receiver switches over to Dolby when any file that I'm playing is encoded in ac3. How do you encode in mp3? Using either aCodec="mp3" in the profile, or the -acodec mp3 option from the command line, doesn't work.
If you can let me know how to encode using mp3 then I'll test it out on these two example files.
Re: Flv files not playable

Posted:
Fri Jan 28, 2011 9:42 am
by pizzaguy541
UPDATE: I'm not sure if I'm doing this right but I've tried using the -acodec libmp3lame option on the command line and it produces no audio regardless of the bitrate or sampling value that I use. I've even omitted specifying those values to try to use the original values from the file and that also produces no audio.
This test was done on both the avi and flv files.
Re: Flv files not playable

Posted:
Sun Jan 30, 2011 10:46 am
by pizzaguy541
Is there any update on what to do to fix the flv problem?
Re: Flv files not playable

Posted:
Sun Jan 30, 2011 4:15 pm
by zip
There is no way to change the sample rate via Serviio. The only tools you have are aBitrate and targetACodec. You can try combinations of those two (targetACodec="mp3|ac3|aac", you can try LPCM (look at the web to see the exact string).