Page 1 of 1

x264 soft-SRT identified as undf, only via streaming

Posted: 20 May 2012 00:33
by ratnu
Hi there,

Intro
It seems there's some kind of weird bug or a very dumb error by myself with subtitle handling (which is less likely, I have tried several corner cases, even another video player that had any issues).

TLDR
Downloading the file to my desktop PC makes VLC happy, it recognizes subtitles.
Watching via HTTP streaming, makes VLC unhappy. It doesn't recognize subtitles.

UPDATE!
It seems there's a ticket on this from 8 months ago, reported on 1.2:
http://trac.videolan.org/vlc/ticket/5365

Problem
I have some video files (avi, mkv and mp4) on a server I want to use for streaming purposes.

The video files aren't prepared to streaming so I reencode every single file with x264 moving MOOV atom to the beginning of the file.
Also I'm adding SRT subtitles to some files because their aren't on my language.

All the reencoding, muxing and that is done with HandBrakeCLI on the server.
Example:

Code: Select all

$ HandBrakeCLI -Z="High Profile" -i file1.mkv -o file1.mp4 -O --srt-file file1.srt --srt-codeset ISO-8859-1 --srt-offset 0 --srt-lang spa --srt-default=1
Everything but subtitles works like a charm, VLC can't recognize them.

I've tried:
- Changing SRT files enconding; from ISO-8859-1 to UTF-8. DIDN'T WORK.
- Changing newlines to Windows/Linux style but nothing worked. DIDN'T WORK.
- Using Media Player Classic (via streaming). IT WORKED! DAFUQ, I WAS SAD. I HATE MPC :( (also, it handles subs awfully)

Here's a screenshot of the codec information of one of the reencoded files (GUI is in spanish):
Image

Aside
If devs require it I can provide some of the files for debugging purposes.

Here's MediaInfo output:

Code: Select all

General Complete name : I:\Experimentos\file1.mp4 Format : MPEG-4 Format profile : Base Media / Version 2 Codec ID : mp42 File size : 148 MiB Duration : 55mn 42s Overall bit rate mode : Variable Overall bit rate : 372 Kbps Encoded date : UTC 2012-05-19 22:15:11 Tagged date : UTC 2012-05-19 22:17:33 Writing application : HandBrake 0.9.6 2012022900 Video ID : 1 Format : MPEG-4 Visual Format profile : Simple@L1 Format settings, BVOP : No Format settings, QPel : No Format settings, GMC : No warppoints Format settings, Matrix : Default (H.263) Codec ID : 20 Duration : 55mn 42s Bit rate mode : Variable Bit rate : 990 Kbps Maximum bit rate : 10.6 Mbps Width : 720 pixels Height : 404 pixels Display aspect ratio : 16:9 Frame rate mode : Variable Frame rate : 23.976 fps Minimum frame rate : 23.974 fps Maximum frame rate : 23.981 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Compression mode : Lossy Bits/(Pixel*Frame) : 0.142 Stream size : 394 MiB Writing library : Lavc53.15.0 Encoded date : UTC 2012-05-19 22:15:11 Tagged date : UTC 2012-05-19 22:17:30 Color primaries : BT.709-2, SMPTE 274M, SMPTE 296M Transfer characteristics : BT.709-2, SMPTE 170M, SMPTE 274M, SMPTE 293M, SMPTE 296M Matrix coefficients : BT.470-4 System B, BT.470-4 System G, BT.601-4, SMPTE 170M, SMPTE 293M Audio ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : 40 Duration : 55mn 42s Bit rate mode : Variable Bit rate : 160 Kbps Maximum bit rate : 269 Kbps Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 KHz Compression mode : Lossy Stream size : 63.7 MiB (43%) Encoded date : UTC 2012-05-19 22:15:11 Tagged date : UTC 2012-05-19 22:17:30 Text ID : 3 Format : Timed text Muxing mode : sbtl Codec ID : tx3g Duration : 54mn 31s Bit rate mode : Variable Bit rate : 77 bps Stream size : 30.7 KiB (0%) Language : Spanish Encoded date : UTC 2012-05-19 22:15:11 Tagged date : UTC 2012-05-19 22:17:30
Thanks for making VLC!
It's been my main and only video player for a long time.



EDIT: Fixed typo.
EDIT 2: Changed title from "x264 files with soft srt subtitles, identifies subs as undf" to "x264 soft-SRT identified as undf, only via streaming".
EDIT 3: Fixed more typos. Added update.

Re: x264 soft-SRT identified as undf, only via streaming

Posted: 21 May 2012 16:31
by Jean-Baptiste Kempf
Look at the VLC logs, it will tell you what is happening.

Re: x264 soft-SRT identified as undf, only via streaming

Posted: 22 May 2012 01:41
by ratnu
Thanks Jean,

Here's a the log playing some Game of Thrones file via streaming: http://pastebin.com/SMWiXqun
Here's the log playing the same file right after downloading it to my hdd: http://pastebin.com/LsBFcHX8

In both scenarios I manually chose subtitles from the list.

EDIT: I have checked the same scenario using mkv as container and it works perfectly in both cases (streaming and download).

Re: x264 soft-SRT identified as undf, only via streaming

Posted: 22 May 2012 16:58
by Jean-Baptiste Kempf
private paste. It does not help.

Re: x264 soft-SRT identified as undf, only via streaming

Posted: 23 May 2012 01:13
by ratnu
private paste. It does not help.
Damn it, I'm sorry.

I fixed the visibility of the links, try again. They work fine now.

Re: x264 soft-SRT identified as undf, only via streaming

Posted: 23 May 2012 14:35
by Jean-Baptiste Kempf
We do not support text embedded, with the avformat/mp4 demuxer, indeed.

Re: x264 soft-SRT identified as undf, only via streaming

Posted: 23 May 2012 15:22
by ratnu
We do not support text embedded, with the avformat/mp4 demuxer, indeed.
I changed to mkv files because they are good for my purposes, but if it's unsupported for mp4's why does it work when the file is on my hdd?

It shouldn't work for in any way (streaming or reading file from hdd), right?

Re: x264 soft-SRT identified as undf, only via streaming

Posted: 23 May 2012 16:23
by Jean-Baptiste Kempf
Because it does not use the same module for demuxing.

Re: x264 soft-SRT identified as undf, only via streaming

Posted: 23 May 2012 16:53
by ratnu
Understood, feel free to close the post.
I'll delete the pastes.

Thanks for your time Jean.

Re: x264 soft-SRT identified as undf, only via streaming

Posted: 23 May 2012 17:42
by Jean-Baptiste Kempf
Still, we would need to fix that...

Re: x264 soft-SRT identified as undf, only via streaming

Posted: 24 May 2012 00:18
by ratnu
Still, we would need to fix that...
I can provide you as many logs as you want but via MP, they expose too much info about my system.
It's just for the family so I don't want to get too much attention on it.

Spam me as much as you need.