Jump to content

Conversion Error


Recommended Posts

tcjones5305
Posted

I did not mean to confuse things by adding additional logs.
I thought it was a different error from the previous logs I posted, so I thought it might help troubleshoot.

So I recorded a show in Emby on a channel I know I am having trouble with (.ts), and I also recorded it using the direct URL method (.mpeg).
Then I tried to convert the .ts file in Emby, which failed (ffmpeg-transcode-d309dd9e-952f-44c1-94d4-de19cf3fa509_1.txt).
I copied the .mpeg file into that same folder and had Emby convert it, which also failed (ffmpeg-transcode-83236d75-12d0-455b-baab-6d8de189f101_1.txt).
I have uploaded both logs.

Both failed with a similar error:
17:09:11.584 Too many packets buffered for output stream 0:2
and
16:42:57.790 Too many packets buffered for output stream 0:2

I am pretty sure I have never had a show convert successfully on this channel.

 

Attached is yet another log (ffmpeg-transcode-2d228e8d-bb1e-4300-83d6-67ad2a48b586_1.txt).
I do know I have had the same show on the same channel convert successfully.
It has this error:
15:43:29.856 Error while filtering: Device or resource busy
15:43:29.856 Failed to inject frame into filter network: Device or resource busy
15:43:29.856 Error while processing the decoded data for stream #0:0

 

So maybe I have 2 different issues going on?

All files (.ts, .mpeg) play fine on Emby.
Emby does transcode both files (MPEG2VIDEOto H.264) when I play them on my computer.

 

Do these logs help determine my issues with converting?

ffmpeg-transcode-d309dd9e-952f-44c1-94d4-de19cf3fa509_1.txt ffmpeg-transcode-83236d75-12d0-455b-baab-6d8de189f101_1.txt ffmpeg-transcode-2d228e8d-bb1e-4300-83d6-67ad2a48b586_1.txt

tcjones5305
Posted

Some additional information, hopefully to help the troubleshooting.

Handbrake errors out immediately when trying to convert the .ts and the .mpeg file with this error:
ERROR: avio_open2 failed, errno -13

MKVToolNix will convert both the .ts and the .mpeg file to .mkv files, they both have this warning:
Found at least one B frame without second reference in a non closed GOP.

The resulting files from MKVToolNix (the .mkv file from the .ts file and the .mkv file from .mpeg file) both fail when Emby tries to convert them with this error:
16:42:16.241 Error while filtering: Device or resource busy
16:42:16.241 Failed to inject frame into filter network: Device or resource busy
16:42:16.241 Error while processing the decoded data for stream #0:0

Posted

Are the files playable in VLC after using MKVToolNix on them?

tcjones5305
Posted

Yes, all MKVToolNix converted files are playable in VLC.

As mentioned earlier, the .ts and the .mpeg file are also playable on VLC.

 

Update on my Handbrake conversions - Handbrake will successfully convert all files - the .ts file, the .mpeg file, and the .mkv files.
It was an error on my part, I was trying to save them to an invalid directory.

Posted

Thanks for the feedback.

tcjones5305
Posted

I have been doing some troubleshooting.
I think the problem might be in the audio streams on the channel that I get this error in the Emby conversion log:
16:42:57.790 Too many packets buffered for output stream 0:2

When I run ffmpeg from a command prompt with minimal options, it converts fine to mkv.
When I add a delay parameter (-itsoffset), it fails.
It appears to be failing because the french audio stream is empty, see attached log.

    Stream #1:1[0x64](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
    Stream #1:2[0x65](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 96 kb/s
    Stream #1:3[0x66](fre): Audio: ac3 (AC-3 / 0x332D4341), 0 channels, fltp
[matroska @ 000001dd62bef400] sample rate not set
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:3 --

Maybe this is why the Emby conversion is failing on recordings from this channel?

When I have (-itsoffset) parameter and have it only include the eng stream (-map 1:a:1), it converts successfully.

I am just passing along what information I have found so far.

ffmpeg-cmdline-01.txt

  • Like 1
Posted

Thanks for the feedback on what you found.

tcjones5305
Posted

Another update on this topic of getting my recorded TV to direct play on Roku.
Maybe this will help others with the same goal.

I have removed the recorded TV conversion from Emby due to all the failures I was getting.
I have created a DOS batch file to do the conversion with ffmpeg and have added the batch file as the "Recording Post Processing" "Post-processing application".
The batch file has some variables and error checking, but the main execution of ffmpeg is really simple and is basically:

ffmpeg.exe -n -i "%recorded_file_name%.ts"  -c copy "%converted_file_name%.mkv"

The conversion is fast and must not be doing much as the file size is about the same.
But Roku will direct play the resulting mkv file, which is all I really want.

Maybe a simple conversion option could be added to Emby in the future?

Thanks to the people that have programmed such a cool application.
(But I hope for functionality that makes Emby look and feel just like Windows Media Center, it still hasn't been beat for it's simplicity and wife approval factor)

Posted

That should be doing a simple remux or container change from ts to mkv while copying all streams. It should be very fast doing this!

  • Like 1
Posted

Has this helped? Are you still having an issue with this?

tcjones5305
Posted

The conversion in Emby fails, so I have switched to calling a batch file after the TV recording that does this simple ffmpeg conversion, as described in my previous post.

  • 4 weeks later...
Posted
On 1/6/2021 at 10:47 AM, tcjones5305 said:

I have been doing some troubleshooting.
I think the problem might be in the audio streams on the channel that I get this error in the Emby conversion log:
16:42:57.790 Too many packets buffered for output stream 0:2

When I run ffmpeg from a command prompt with minimal options, it converts fine to mkv.
When I add a delay parameter (-itsoffset), it fails.
It appears to be failing because the french audio stream is empty, see attached log.

    Stream #1:1[0x64](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
    Stream #1:2[0x65](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 96 kb/s
    Stream #1:3[0x66](fre): Audio: ac3 (AC-3 / 0x332D4341), 0 channels, fltp
[matroska @ 000001dd62bef400] sample rate not set
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:3 --

Maybe this is why the Emby conversion is failing on recordings from this channel?

When I have (-itsoffset) parameter and have it only include the eng stream (-map 1:a:1), it converts successfully.

I am just passing along what information I have found so far.

ffmpeg-cmdline-01.txt 4.81 kB · 0 downloads

That could be it, yes. The conversion feature attempts to preserve all audio tracks because that's generally what users have wanted.

  • 3 months later...
Posted

@tcjones5305 please try the conversion again with the upcoming Emby Server 4.6 release. Thanks.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...