My new transcode settings don't seem to be working

Need help? Post your questions here.

Moderator: moderators

Re: My new transcode settings don't seem to be working

Postby ytechie » Sun Jan 29, 2012 10:25 pm

This is part of the streamController.java file:

Code: Select all
            // If "path" request parameter is set, this is a request for a single file
            // (typically from the embedded Flash player). In that case, create a separate
            // playlist (in order to support multiple parallel streams). Also, enable
            // partial download (HTTP byte range).
            String path = request.getParameter("path");
            boolean isSingleFile = path != null;
            LongRange range = null;

            if (isSingleFile) {
                Playlist playlist = new Playlist();
                MusicFile file = musicFileService.getMusicFile(path);
                playlist.addFiles(true, file);
                player.setPlaylist(playlist);

                response.setHeader("ETag", StringUtil.utf8HexEncode(path));
                response.setHeader("Accept-Ranges", "bytes");

                long contentLength;
                range = getRange(request, file);
                if (range != null) {
                    response.setStatus(HttpServletResponse.SC_PARTIAL_CONTENT);
                    contentLength = file.length() - range.getMinimumLong();
                    LOG.info("Got range: " + range);
                } else {
                    contentLength = file.length();
                }

                boolean transcodingRequired = transcodingService.isTranscodingRequired(file, player);
                boolean downsamplingRequired = transcodingService.isDownsamplingRequired(file, player, maxBitRate);
                if (!transcodingRequired && !downsamplingRequired) {
                    Util.setContentLength(response, contentLength);
                    if (range != null) {
                        long entityLength = file.length();
                        long firstBytePos = range.getMinimumLong();
                        long lastBytePos = entityLength - 1;
                        response.setHeader("Content-Range", "bytes " + firstBytePos + "-" + lastBytePos + "/" + entityLength);
                    }
                }

                String transcodedSuffix = transcodingService.getSuffix(player, file, preferredTargetFormat);
                response.setContentType(StringUtil.getMimeType(transcodedSuffix));

                if (file.isVideo()) {
                    videoTranscodingSettings = createVideoTranscodingSettings(file, request);
                }
            }


I don't really know what's going on.
User avatar
ytechie
 
Posts: 547
Joined: Sun Dec 12, 2010 5:05 am
Location: Manhattan, New York

Re: My new transcode settings don't seem to be working

Postby Impyy » Sun Jan 29, 2012 10:35 pm

*sighs* it's all so confusing. What's a similar/good quality setting I can use then similar to V0 settings?
Impyy
 
Posts: 15
Joined: Fri Jan 20, 2012 12:14 am

Re: My new transcode settings don't seem to be working

Postby ytechie » Sun Jan 29, 2012 10:37 pm

What's wrong with the default settings?
User avatar
ytechie
 
Posts: 547
Joined: Sun Dec 12, 2010 5:05 am
Location: Manhattan, New York

Re: My new transcode settings don't seem to be working

Postby Impyy » Sun Jan 29, 2012 10:45 pm

You're right I guess, haha. Just use these settings for most others things! Nevermind, thank you for your help anyway!
Impyy
 
Posts: 15
Joined: Fri Jan 20, 2012 12:14 am

Previous

Return to Help

Who is online

Users browsing this forum: No registered users and 30 guests